cd /news/artificial-intelligence/how-i-decompose-any-image-into-recom… · home topics artificial-intelligence article
[ARTICLE · art-2311] src=dev.to pub= topic=artificial-intelligence verified=true sentiment=↑ positive

How I Decompose Any Image Into Recomposable Layers on Melius

A method for decomposing AI-generated images into seven independent layers (background, middle ground, foreground, and up to four subjects) using a Melius node graph and multiple LLMs. This approach allows users to move, scale, or swap individual layers before recomposing the final image, avoiding the destruction of details that occurs when re-prompting a single-pass generation. The author provides the full workflow, prompts, and a video demo on their X feed.

read2 min views5 publishedMay 20, 2026

When you iterate on an AI-generated image by re-prompting, you destroy it. You ask the model to "move the figure left and remove the truck," and the entire scene shifts: different lighting, different building geometry, different snow texture. Anything that wasn't pinned by the original seed gets re-rolled. You lose the bake you liked. Photographers don't work this way. Concept artists don't work this way. They hold the layers and move them. I wanted that. So I built it. One Melius canvas. An analyzer LLM reads any input image and outputs a JSON blueprint of seven candidate layers: background, middle ground, foreground, and up to four subjects. Seven parallel extractor LLMs pull each layer's isolation prompt out of the JSON. Seven NanoBanana Pro nodes regenerate each layer on chroma green, preserving original position, scale, and lighting. Background-removal nodes strip the green. A final NanoBanana Pro pass takes all seven transparent layers and renders a unified, lighting-coherent composition. You can move, scale, drop, or swap any layer before the final pass. Single-pass generation treats an image as one indivisible thing. Inpainting and reference conditioning are partial fixes, but the model still guesses at occluded regions. Move the truck and the snow underneath has to be invented from nothing. The fix is to never bake the image to begin with. Treat the original as a brief, decompose it into stacked elements, and only recompose at the end, after the elements are arranged the way you want them. That requires a real pipeline. A node graph is the right shape for a real pipeline. Melius gave me the canvas that can hold one. I wrote the full workflow on Scopeful Pro: every node, both system prompts (the analyzer and the universal extractor template), the mistakes I made first, and the things I'd change in v2. If you want the prompts, the node-by-node walkthrough, and the canvas itself, here is the full version: How I Decompose Any Image Into Recomposable Layers on Melius The video demo (14 seconds, the layer explode shot) is on my X feed (@igorgridel).

── more in #artificial-intelligence 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-decompose-any-…] indexed:0 read:2min 2026-05-20 ·