← All Tools

The Hidden Bug That Only Affects the DALL-E Mode of an Image Prompt Generator

Guide · Last verified Aug 19, 2026

If a tool automatically builds prompts for three models — Midjourney, DALL-E, Stable Diffusion — it's easy to assume all three assemble their values the same way. But dig into the actual source and only DALL-E mode uses a completely different assembly method, and because of that difference there's both a visible spacing bug and a more dangerous, invisible negative-prompt-loss bug. This guide quotes the tool's actual JS code to explain exactly where and why the two bugs arise.

1. Assembly differs by model

The tool collects the values the user picked — style, mood, lighting, camera, quality tags — into an array called parts. The problem is that the way this array becomes the final prompt string differs by model. Midjourney and Stable Diffusion modes join the array directly, like this:

prompt = parts.join(', ');
Just one comma+space goes between each element, so no problem arises no matter how many values there are, or if some are empty.

DALL-E mode, by contrast, doesn't use the array — it inserts values directly into a sentence template literal.

prompt = `A ${mood?mood+' ':''} ${style?style+' image of ':''} ${subject}`;

2. Doubled-space bug: ternary operator vs. template's fixed spaces

Look closely at the code above and the problem is doubled up. First, the mood?mood+' ':'' part already appends one space (+' ') directly after the mood value when it exists. Second, the template literal itself still has fixed spaces between the ${...} slots. So when a value exists, "the space the value appended" and "the space the template already had" overlap, putting two spaces between words.

The more noticeable problem is when a value is absent. Don't select mood or style and the ternary returns only an empty string (''), but the template's fixed spaces around that slot stay regardless of the ternary. As a result, selecting no style or mood and entering only the subject "a cat" produces this actual output:

Actual output: "A   a cat" — 3 spaces between "A" and "a cat".
With both style and mood selected: "A dramatic  photorealistic image of  a cat" — 2 spaces between words every time.

3. The bug where the negative prompt silently disappears

The more serious problem is the negative prompt (elements you want to exclude). The tool always shows a negative-prompt input field regardless of model selection and accepts input normally. But the code that actually applies that value to the final prompt splits completely by model.

ModelNegative prompt handling code
Midjourneyif(negative)prompt+=` --no ${negative}`; — applied correctly
Stable Diffusionif(negative)prompt+=`\nNegative prompt: ${negative}`; — applied correctly
DALL-ENot a single line in the entire branch references the negative variable

So even if the user enters a negative prompt like "blurry, low quality, text" in DALL-E mode, that value is used nowhere when they hit the generate button and is silently discarded. No error, no warning — since the input field stays active, the user easily believes their input was applied.

4. Is this a bug, or a DALL-E limitation?

There's an important distinction to make here. It's true that the official DALL-E API itself doesn't support a "negative prompt" concept like Midjourney's --no parameter or Stable Diffusion's negative prompt. That's not unique to this tool — it's an actual design characteristic of the OpenAI DALL-E API. But separately from that fact, the tool leaving the negative-prompt input field enabled in DALL-E mode with no note or explanation is purely a UX/implementation bug. If the API doesn't support it, the tool should at least tell the user that — and it doesn't.

5. Practical approach: what to use instead of a negative prompt in DALL-E

When building a prompt for DALL-E, know that you can't use an "exclusion" concept at all, and work around it by turning unwanted elements into positive statements woven into the body. For example, instead of an exclusion directive "no text," describe it positively in the body prompt itself, like "a clean image with no visible text or lettering." This isn't perfect, but it actually affects the result — unlike sending a value down a channel that doesn't even exist in the DALL-E API.

Frequently Asked Questions

Q. Is the doubled-space bug actually reproducible?

A. Yes. Run the real code (prompt=`A ${mood?mood+' ':''} ${style?style+' image of ':''} ${subject}`) as-is and with style/mood unselected you get 3 spaces between "A" and the subject; with them selected you get 2 spaces between every word.

Q. I entered a negative prompt, so why isn't it reflected in the DALL-E result?

A. Because the DALL-E branch of the code has no line referencing the negative variable at all. Only the Midjourney and Stable Diffusion branches have the code to apply it; the DALL-E branch ignores the input value entirely.

Q. Do the Midjourney and Stable Diffusion modes have the same space problem?

A. No. Both modes join the array with parts.join(', '), so exactly one comma goes between each value no matter how many there are, and they're unaffected by this bug. The problem is only in the DALL-E branch's template-literal assembly.

Q. Doesn't DALL-E just not support negative prompts?

A. Correct. The DALL-E API itself doesn't officially support this concept. But the fact that this tool keeps showing an active negative-prompt input field in DALL-E mode is a UX flaw separate from the API constraint.