[GH-ISSUE #3867] [Issue]: Parts of negative prompt leak into the positive one in Z-Image Style #2090

Closed
opened 2026-10-21 05:45:17 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @JurijPietrowicz on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3867

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Z-Image Turbo NPC portrait prompts can leak deterministic artifact-avoidance terms into the positive prompt. The compiler moves only the first item after a leading Avoid instruction into the negative prompt, leaving the remaining terms as positive instructions.

Expected behavior

Every item in the deterministic avoid-list should remain negative, and none of those artifact terms should appear in the positive prompt.

Actual behavior

A prompt such as:

Avoid text, letters, captions, UI, watermarks, logos, ...

is split into fragments. Only Avoid text is recognized as negative; terms such as letters, UI, watermarks, logos, and collage can be sent positively to the image provider.

Steps to reproduce

  1. Run Marinara Engine from source with the Z-Image Turbo Narrative image style profile selected for Game image generation.
  2. Generate an NPC portrait using the deterministic prompt path, with Dynamic Prompt Director disabled if necessary.
  3. Enable prompt review or inspect the generated provider prompt.
  4. Check the final positive prompt for terms such as letters, UI, watermarks, logos, speech bubbles, collage, or multiple portraits.

Environment

  • Marinara Engine version: 2.3.3
  • Install type: source
  • OS + version: Fedora 44
  • Browser or app shell: Firefox 152

Logs, screenshots, or video

No logs or screenshots currently available.

Example observed positive output:

letters. UI. watermarks. logos. signatures. speech bubbles. split panels. collage. contact sheet. multiple portraits. duplicated faces. and four-image grids

Additional context

The shared compiler intentionally limits inline negations such as no makeup, holding flowers to the directly negated clause. The fix must preserve that behavior while correctly handling standalone generated avoid-lists.

Related historical issue: #3054, which fixed the inverse negation bug.

The same parser pattern also affects generated character avatar prompts, where some leaked terms are not present in a separate hard-negative prompt.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @JurijPietrowicz on GitHub (Jul 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3867 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Z-Image Turbo NPC portrait prompts can leak deterministic artifact-avoidance terms into the positive prompt. The compiler moves only the first item after a leading `Avoid` instruction into the negative prompt, leaving the remaining terms as positive instructions. ## Expected behavior Every item in the deterministic avoid-list should remain negative, and none of those artifact terms should appear in the positive prompt. ## Actual behavior A prompt such as: ```text Avoid text, letters, captions, UI, watermarks, logos, ... ``` is split into fragments. Only `Avoid text` is recognized as negative; terms such as `letters`, `UI`, `watermarks`, `logos`, and `collage` can be sent positively to the image provider. ## Steps to reproduce 1. Run Marinara Engine from source with the Z-Image Turbo Narrative image style profile selected for Game image generation. 2. Generate an NPC portrait using the deterministic prompt path, with Dynamic Prompt Director disabled if necessary. 3. Enable prompt review or inspect the generated provider prompt. 4. Check the final positive prompt for terms such as `letters`, `UI`, `watermarks`, `logos`, `speech bubbles`, `collage`, or `multiple portraits`. ## Environment - Marinara Engine version: 2.3.3 - Install type: source - OS + version: Fedora 44 - Browser or app shell: Firefox 152 ## Logs, screenshots, or video No logs or screenshots currently available. Example observed positive output: ```text letters. UI. watermarks. logos. signatures. speech bubbles. split panels. collage. contact sheet. multiple portraits. duplicated faces. and four-image grids ``` ## Additional context The shared compiler intentionally limits inline negations such as `no makeup, holding flowers` to the directly negated clause. The fix must preserve that behavior while correctly handling standalone generated avoid-lists. Related historical issue: [#3054](https://github.com/Pasta-Devs/Marinara-Engine/issues/3054), which fixed the inverse negation bug. The same parser pattern also affects generated character avatar prompts, where some leaked terms are not present in a separate hard-negative prompt. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:17 +07:00
Author
Owner

@JurijPietrowicz commented on GitHub (Jul 20, 2026):

Claiming this issue for implementation on the staging lane. I will preserve the inline-negation behavior from #3054 while fixing standalone generated avoid-lists in the shared image prompt compiler.

<!-- gh-comment-id:5023228548 --> @JurijPietrowicz commented on GitHub (Jul 20, 2026): Claiming this issue for implementation on the staging lane. I will preserve the inline-negation behavior from #3054 while fixing standalone generated avoid-lists in the shared image prompt compiler.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2090
No description provided.