FSL / Prompt Compose
FSL / Prompt Compose — one STRING out, with a 'scene lock' so edits don't wander
- prompt
A small prompt-engineering utility with a genuinely useful idea in it. FSLPromptCompose merges a positive, a negative, and an optional scene-lock instruction into one STRING prompt for image-generation nodes. On its own that's a glorified text joiner - the interesting part is lock_scene, which prepends a block of instructions telling the model to freeze composition, subjects, positions, background, lighting, camera angle, clothing, and colors, and only change what you specify.
Why the scene lock exists
The default negative prompt tells the story: studio backdrop, black background, portrait-only, isolation, cropping. This node was built for iterative editing workflows - specifically the "change one thing about an existing image" pattern, the same space the KB's inpainting.md calls out as the remaining reason masked editing survives: whole-image edit models "take the whole image into context and emit a whole new image, so unmasked regions come back close but not identical, and the drift compounds across a chain of edits." A scene lock is the prompt-level attempt to fight exactly that drift. When lock_scene is on, the composed prompt becomes:
Use the provided image as the base. Keep composition, subjects, positions, background,
lighting, camera angle, clothing and colors unchanged. Change only what I specify.
Do not crop; do not isolate a single subject; do not change the background.
<your positive>
NEGATIVE: <your negative>
It's not a hard constraint - Gemini is still free to ignore prose - but it changes the failure mode from "the whole image came back different" to "it mostly held together," which for iterative chains is a real quality win.
The inputs
positive- the change you want, as plain language. Default text is a placeholder: "Describe the change you want…"negative- things to avoid, appended asNEGATIVE: ....lock_scene- boolean, default on. This is the one you'll actually toggle. On for editing an existing image, off when you're composing a fresh prompt from scratch.
Output: prompt, a single STRING ready to feed into FSLGeminiGenerateImage (or any text-driven generator in the pack).
How it fits the pack
This is the manual complement to FSLGeminiChat's automated hook-writing: where the chat agent writes its own technical prompts, Prompt Compose is for when you want to control the wording yourself but keep the anti-drift discipline. Wire it between a text input and the image generator, and it's the difference between "the model wandered" and "the model stayed on brief." Pair it with a real mask and you get both defenses - the scene lock and the untouched-pixel guarantee.
Install & caveats
It ships with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/fredlef/Comfyui_FSL_Nodes
cd Comfyui_FSL_Nodes
pip install -r requirements.txt
or ComfyUI Manager → "ComfyUI FSL Nodes", then restart. No API key, no models, local-only.
The honest caveat: a scene lock is a request, not a promise. Google's image models are prompt-following but not prompt-obeying, and the KB notes they're also heavily safety-filtered - so if an edit still drifts, tightening the positive (say only what changes) usually beats adding more negative. And remember: with lock_scene on, this node assumes there's an input image in the loop. Feed it into a text-to-image node with no image and the lock instructions are just noise.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | STRING | Describe the change you want… | — |
| negative | STRING | studio backdrop, black background, portrait-only, isolation, cropping | — |
| lock_scene | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |