A node-based pipeline on Melius that splits any complex scene into seven candidate layers (background, middle ground, foreground, up to four subjects), regenerates each one on chroma green, then recomposes them. Clone the public canvas and try it on your own image.
When you iterate on an AI-generated scene by re-prompting, you destroy it.
Ask the model to "move the figure left and remove the truck" and the entire scene shifts: different lighting, different building geometry, different snow. Anything the original seed did not pin gets re-rolled. The bake you liked is gone.
Photographers do not work this way. Concept artists do not work this way. They hold the layers and move them.
This is a Melius canvas that holds the layers.
Public link (Melius, free to test):
Open it, drop your own image into the input node, run the canvas. The exact system prompts on every node are visible inside, read them, fork them, change them. The rest of this post is the architectural reasoning so you know what to change and why.
I built this for the Melius "Anything You Can Imagine" challenge. The 30-second walkthrough video is on the post page (and on my X feed, @IgorGridel).
The pipeline runs in five stages on one canvas.
Stage 1: Analyze. One LLM node reads the input image and emits a structured JSON object with up to seven slots: background, middleGround, foreground, subject1 through subject4. For every slot, the analyzer writes an "isolation prompt", the prompt that, paired with the original image as reference, will regenerate just that element. Slots without a plausible candidate are returned as null.
Stage 2: Extract, in parallel. Melius LLM nodes return one string per node. They do not fan a single JSON object into seven downstream branches. So Stage 2 is seven cheap extractor nodes running in parallel, each pulling one slot key out of the analyzer's JSON. Same universal extractor prompt template across all seven, only the slot key differs. Null slots fall back to a literal green-screen prompt.
Stage 3: Regenerate on chroma green. Seven NanoBanana Pro nodes, one per slot. Input to each: the extractor's isolation prompt plus the original image as visual reference. Output: one image at the source aspect ratio with only that element visible, everything else replaced by chroma green (#00FF00). The original image is required as reference, without it the model invents the geometry behind the elements.
Stage 4: Strip the green. Seven background-removal nodes turn each chroma-green image into a transparent PNG. Dedicated keyer nodes pull cleaner edges than asking the image model to "produce on transparent background." Fringes are obvious in image-model alpha output; a keyer is not.
Stage 5: Recompose. One final NanoBanana Pro pass receives all seven transparent layers, accepts new positions for any of them, and renders one unified scene. This is where rearrangement happens. Drop a layer to remove an element. Move a layer to shift the element. The recomposer resolves lighting, edge integration, and shadow handoff into a single coherent image rather than an obvious cut-and-paste composite.
Why decompose at all. Inpainting and reference conditioning are partial fixes for compositional iteration, but the model still has to invent what was behind the thing you moved. Move the truck and the snow underneath has to be hallucinated. Decomposition pushes that "what is behind it" question to Stage 3, when the model only has to handle one element on chroma green, not the whole scene.
Why a separate JSON-emitting analyzer and not direct prompting. A single LLM call cannot emit seven separate strings into seven downstream nodes on Melius. The analyzer-then-extractors split is a workaround that turns a one-to-many fan-out into seven parallel one-string-out calls reading from the same shared blob.
Why chroma green and not "transparent background." Image models hallucinate at alpha edges. A solid color the keyer is tuned for is more reliable than "produce alpha." #00FF00 is the keyer's natural pivot.
Why "preserve original lighting" on the isolation prompt. Without that clause, the regenerator re-lights each element for a generic neutral background, which then fights the lighting of the final composition. The final pass has to undo work that should not have happened.
Why a final NanoBanana Pro recomposition instead of just alpha-compositing. Direct compositing produces obvious cut-and-paste edges. A regenerative final pass reads all the layers as a single prompt and resolves the seams.
Why up to seven and not, say, sixteen. Seven matches the canonical depth split (BG / MG / FG) plus four subjects, which empirically covers most scene compositions without leaving too many null slots. The pipeline is robust to fewer than seven via the null-to-green fallback, and you could extend the slot count by adding extractor+regenerator+key node pairs.
It is not a one-click magic button. It is a node graph that runs every stage explicitly, and each stage is visible and editable. The analyzer prompt, the extractor template, the isolation prompt patterns, the chroma color, the recomposer prompt, they are all readable on the canvas. Fork the canvas and tune any of them.
It is not a video generator. The output is a single recomposed still image per run.
It is not free to run forever. NanoBanana Pro is credit-gated on Melius like every image model. The beta-promo pricing on Melius is generous enough at the time of writing that iteration is not painful, but it is not zero.
Open the canvas:
Drop in your own input image, run it, then start tearing nodes apart. If you ship a variant, tag me on X (@IgorGridel). I want to see what other slot taxonomies people land on.