[GH-ISSUE #2929] [Issue]: [BUG] Illustrator prompts get over-distilled in danbooru/tagged mode after #1506

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

Originally created by @SpicyMarinara on GitHub (Jun 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2929

Summary

Imported from the Discord thread "[BUG] Illustrator prompts get over-distilled in danbooru/tagged mode after".

Expected behavior

Not provided in the Discord context.

Actual behavior

See the Discord context transcript below.

Steps to reproduce

  1. Not provided in the Discord context.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

See any attachment links and screenshots in the context below.

Additional context

This issue was created automatically from Discord support context.

Discord thread: [BUG] Illustrator prompts get over-distilled in danbooru/tagged mode after
Discord thread link: https://discord.com/channels/1417099416812392641/1520879569643634759
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-06-28T19:52:25.979Z] PlaySeeke: Win 10 - exe - 2.0.6
Roleplay mode.

Images created through the Illustrate agent suddenly show alot less tags mostly only those concerning the persona tags, disregarding most context and character tracker info/tags.
There is a big difference in prompts generated by agent and the one show in ME image.

Bug report made by Prof Mari.

Summary
Illustrator-generated image prompts in danbooru/tagged style profiles are aggressively distilled and compacted, losing most detail tags. This worked correctly before — illustrations were exempted from compaction/distillation.
Reproduction
Use a danbooru or illustrious style profile
Have the Illustrator agent generate a detailed danbooru-style prompt (e.g. 60+ tags)
Observe the compiled prompt shown in ME's image description — it's reduced to ~20 generic tags, stripping niche detail tags like military-straight posture, coiled whip-blade at hip, bare breasts, slight smirk, etc.
Root Cause
Commit a9fdae82 correctly exempted illustrations from compaction:
typescript// WORKING — from a9fdae82
const preserveGeneratedPrompt = input.kind === "illustration" || input.kind === "background" || input.kind === "selfie";
const compactTags = !preserveGeneratedPrompt && (promptMode === "tagged" || promptMode === "danbooru");

Commit ecda7e83 ("Fix issue sweep regressions") changed this to:
typescript// BROKEN — from ecda7e83 (current)
const taggedPromptMode = promptMode === "tagged" || promptMode === "danbooru";
const preserveGeneratedPrompt =
  !taggedPromptMode && (input.kind === "illustration" || input.kind === "background" || input.kind === "selfie");
const compactTags = taggedPromptMode;

Since taggedPromptMode is true for danbooru/illustrious profiles, preserveGeneratedPrompt now evaluates to false for illustrations. This means:
compactTags is now always true for tagged/danbooru modes — no illustration exemption
distillTaggedPromptSource runs on illustration prompts, filtering out tags that don't match hardcoded hasVisualCue / distillVisualPhrases patterns
compactPromptFragments enforces a ~75 token budget, dropping low-priority tags that exceed 80% of the budget

The !taggedPromptMode condition should be removed from preserveGeneratedPrompt, or the illustration/background/selfie exemption should be restored independently.
Expected Fix
Restore the illustration/background/selfie exemption from compaction regardless of prompt mode:
typescriptconst preserveScenePrompt = input.kind === "illustration" || input.kind === "background" || input.kind === "selfie";
const compactTags = !preserveScenePrompt && (promptMode === "tagged" || promptMode === "danbooru");

And restore the distillation guard in the fragment loop:
typescriptconst shouldDistill = part.sourcePrompt && !preserveScenePrompt;
Affected File
packages/shared/src/utils/image-prompt-compiler.ts, lines ~41-47
Affected Commits
Regression introduced by: ecda7e83 ("Fix issue sweep regressions")
Previously working in: a9fdae82 ("A lot of stuff, actually")

[attached image 1: https://cdn.discordapp.com/attachments/1520879569643634759/1520881028783280359/prompt_local.jpg?ex=6a42ce55&is=6a417cd5&hm=acd23ba37bb3852d469ed467400b53f18dc5320b186eb4ae3dc85d7e9904e3fe&]
[attached image 2: https://cdn.discordapp.com/attachments/1520879569643634759/1520881029228007606/prompt_me.jpg?ex=6a42ce55&is=6a417cd5&hm=44ab2c27bb1d0a31e9d4be087485be7dbf05c2694140f3efd2d87a383d388f1f&]
[Discord message: https://discord.com/channels/1417099416812392641/1520879569643634759/1520879569643634759]

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 @SpicyMarinara on GitHub (Jun 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2929 ## Summary Imported from the Discord thread "[BUG] Illustrator prompts get over-distilled in danbooru/tagged mode after". ## Expected behavior Not provided in the Discord context. ## Actual behavior See the Discord context transcript below. ## Steps to reproduce 1. Not provided in the Discord context. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video See any attachment links and screenshots in the context below. ## Additional context This issue was created automatically from Discord support context. Discord thread: [BUG] Illustrator prompts get over-distilled in danbooru/tagged mode after Discord thread link: https://discord.com/channels/1417099416812392641/1520879569643634759 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-06-28T19:52:25.979Z] PlaySeeke: Win 10 - exe - 2.0.6 Roleplay mode. Images created through the Illustrate agent suddenly show alot less tags mostly only those concerning the persona tags, disregarding most context and character tracker info/tags. There is a big difference in prompts generated by agent and the one show in ME image. Bug report made by Prof Mari. Summary Illustrator-generated image prompts in danbooru/tagged style profiles are aggressively distilled and compacted, losing most detail tags. This worked correctly before — illustrations were exempted from compaction/distillation. Reproduction Use a danbooru or illustrious style profile Have the Illustrator agent generate a detailed danbooru-style prompt (e.g. 60+ tags) Observe the compiled prompt shown in ME's image description — it's reduced to ~20 generic tags, stripping niche detail tags like military-straight posture, coiled whip-blade at hip, bare breasts, slight smirk, etc. Root Cause Commit a9fdae82 correctly exempted illustrations from compaction: typescript// WORKING — from a9fdae82 const preserveGeneratedPrompt = input.kind === "illustration" || input.kind === "background" || input.kind === "selfie"; const compactTags = !preserveGeneratedPrompt && (promptMode === "tagged" || promptMode === "danbooru"); Commit ecda7e83 ("Fix issue sweep regressions") changed this to: typescript// BROKEN — from ecda7e83 (current) const taggedPromptMode = promptMode === "tagged" || promptMode === "danbooru"; const preserveGeneratedPrompt = !taggedPromptMode && (input.kind === "illustration" || input.kind === "background" || input.kind === "selfie"); const compactTags = taggedPromptMode; Since taggedPromptMode is true for danbooru/illustrious profiles, preserveGeneratedPrompt now evaluates to false for illustrations. This means: compactTags is now always true for tagged/danbooru modes — no illustration exemption distillTaggedPromptSource runs on illustration prompts, filtering out tags that don't match hardcoded hasVisualCue / distillVisualPhrases patterns compactPromptFragments enforces a ~75 token budget, dropping low-priority tags that exceed 80% of the budget The !taggedPromptMode condition should be removed from preserveGeneratedPrompt, or the illustration/background/selfie exemption should be restored independently. Expected Fix Restore the illustration/background/selfie exemption from compaction regardless of prompt mode: typescriptconst preserveScenePrompt = input.kind === "illustration" || input.kind === "background" || input.kind === "selfie"; const compactTags = !preserveScenePrompt && (promptMode === "tagged" || promptMode === "danbooru"); And restore the distillation guard in the fragment loop: typescriptconst shouldDistill = part.sourcePrompt && !preserveScenePrompt; Affected File packages/shared/src/utils/image-prompt-compiler.ts, lines ~41-47 Affected Commits Regression introduced by: ecda7e83 ("Fix issue sweep regressions") Previously working in: a9fdae82 ("A lot of stuff, actually") [attached image 1: https://cdn.discordapp.com/attachments/1520879569643634759/1520881028783280359/prompt_local.jpg?ex=6a42ce55&is=6a417cd5&hm=acd23ba37bb3852d469ed467400b53f18dc5320b186eb4ae3dc85d7e9904e3fe&] [attached image 2: https://cdn.discordapp.com/attachments/1520879569643634759/1520881029228007606/prompt_me.jpg?ex=6a42ce55&is=6a417cd5&hm=44ab2c27bb1d0a31e9d4be087485be7dbf05c2694140f3efd2d87a383d388f1f&] [Discord message: https://discord.com/channels/1417099416812392641/1520879569643634759/1520879569643634759] ``` </details> ## 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:37:30 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jun 28, 2026):

Fixed in the staging workspace. Tagged/danbooru image prompt compaction now preserves generated scene prompts for illustration, background, and selfie requests, so Illustrator output is no longer distilled down like portrait/avatar prompts. Added a prompt regression that preserves niche danbooru tags in illustration prompts.\n\nVerified with:\n- pnpm regression:prompt\n- pnpm check

<!-- gh-comment-id:4827289130 --> @SpicyMarinara commented on GitHub (Jun 28, 2026): Fixed in the staging workspace. Tagged/danbooru image prompt compaction now preserves generated scene prompts for illustration, background, and selfie requests, so Illustrator output is no longer distilled down like portrait/avatar prompts. Added a prompt regression that preserves niche danbooru tags in illustration prompts.\n\nVerified with:\n- pnpm regression:prompt\n- pnpm check
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#1506
No description provided.