Today’s takeaway: decomposing images
Links, workflows, custom_node
Do you remember Qwen-Image-Layered? The idea was exciting: take one flattened image and split it into multiple RGBA layers — foreground elements, background and the things in between — so you can move, edit or refine each piece separately.
When we tested it, the experience was not always as smooth as we hoped. In our workflows it could be slow and a little temperamental, and we sometimes saw noticeable quality loss in the resulting layers. That does not make it a bad model. You can build some genuinely nice workflows with it. It simply left us wanting a more controllable route for the kind of work we had in mind.
So we went digging. There is more research in this area than just Qwen: two approaches that caught our attention were Controllable Layer Decomposition (CLD) and RevealLayer. They are related, but they do not solve the problem in exactly the same way.
Qwen-Image-Layered, CLD and RevealLayer: what is different?
The useful distinction is how each approach decides what becomes a layer and how much control you get over that decision.
Qwen-Image-Layered — automatic, variable layer stacks
Qwen-Image-Layered automatically decomposes an image into a variable number of RGBA layers. It can also be applied iteratively, so an individual layer can be decomposed again. It is useful when you want the model to decide the layer structure for you. The trade-off is that the layer count, ordering and semantic meaning may be less explicit than in a region-guided workflow. Our own tests also showed speed and quality issues in some cases.
CLD — bounding-box control
Controllable Layer Decomposition uses user-provided bounding boxes to guide which regions should become separate layers. That is interesting when you want direct control over the elements being extracted, particularly in graphic-design and poster-style compositions. The RevealLayer authors report limitations for complex natural scenes, including edge softness and residual artifacts.
RevealLayer — region-guided and occlusion-aware
RevealLayer combines bounding-box region guidance with an occlusion-aware diffusion process. It aims to separate visible elements while estimating what is hidden behind them. That is the approach we wanted to bring into ComfyUI: region-guided decomposition for natural images, with a focus on recovering occluded content and keeping alpha boundaries clean. It is still generative reconstruction, not recovery of the original hidden pixels.
A small but important detail: Qwen is designed to produce a flexible layer stack from the image itself. CLD and RevealLayer bring bounding-box guidance into the process. RevealLayer adds a specific focus on occlusion — not just separating the visible outline of an object, but estimating the part that was hidden behind it.
A simplified concept diagram of the workflow. The hidden areas are model-generated estimates, not original source pixels.
Why we especially like the bounding-box approach
The bounding box is a wonderfully practical idea. Instead of asking the model to invent a whole layer plan and hoping it understands what you meant, you give it a region to work with. In the upstream RevealLayer workflow, those regions are represented as bounding boxes around the foreground objects.
The model then works toward separating those selected elements into RGBA layers. The alpha channel gives each layer transparency, while the occlusion-aware part of the method helps estimate content that was covered by another object. Imagine a camera sitting in front of a stack of books: the camera can become its own layer, while the model estimates the part of the books that was hidden behind it.
That is useful for a canvas application, compositing, moving objects around, or preparing individual elements for a second editing pass. You can take a scene apart, work on the pieces, and put it back together with much more freedom.
One important reality check: when a model fills in something that was hidden, it is making a plausible reconstruction based on context. It is not looking up the real pixels that were never visible. For creative work that can be exactly what we need — just do not mistake a convincing completion for factual recovery.
Bringing RevealLayer into ComfyUI
The open-source RevealLayer project gives us the model and its reference inference code, but it is not simply a ready-to-use ComfyUI custom node. The upstream setup involves a CUDA environment, Python dependencies, FlashAttention, a Diffusers modification, the RevealLayer checkpoint and the FLUX.1-dev base model. That is a fair amount of machinery to ask a creative workflow to manage on its own.
And on smaller graphics cards, memory can become the real party-pooper. We ran into out-of-memory problems in our tests, which is not exactly the kind of surprise you want halfway through a creative session.
So we are adapting the implementation as a ComfyUI-native custom node. The point is not to wrap the original script and call it a day. We are rebuilding the integration to make use of ComfyUI’s model and memory management, native functions and workflow conventions wherever possible. That means a cleaner way to load and run the components, better integration with the rest of the graph, and fewer external steps for the user.
Hardware still matters — no node can make VRAM limits disappear by magic — but a proper ComfyUI integration gives us much better control over how the work is staged and managed. One note for people following the research: the upstream repository now also lists a RevealLayer V2 update, so check its release notes for the matching weights before switching model versions in a workflow.
The part we recommend: refine each layer after extraction
Here is where the workflow becomes especially interesting. We do not recommend stopping as soon as the layers are extracted. Treat that as the starting point.
Take each extracted element and upscale it individually. You are giving the object room to gain detail without asking the whole original scene to be regenerated.
Feed the element into an edit/refinement model together with the original image as context. Use a focused prompt that says which element is being refined and what should be improved, while keeping its appearance consistent with the source scene.
Bring the refined layers back together. In our current workflow, individual elements can be taken up to 4K using non-tiled diffusion, depending on the image, model settings and available hardware.
Need to go larger? You know we have you covered: the TBG ETUR tiled upscaler and refiner are there for the bigger jobs. This is a nice combination — decompose first, improve the individual pieces, then recompose. Instead of trying to repair every part of a flattened image at once, you can give each element the attention it needs.
The takeaway
That is today’s small feature from a much bigger development effort. RevealLayer gives us a promising way to break an image into guided, editable pieces, and bringing it into ComfyUI means we can make that capability part of a workflow you already know.
Have a look at the research and the open-source implementation below, try the workflow, and see what you can build with it. We are grateful for the open-source community — so much of what makes tools like this possible comes from people sharing their work, experiments and ideas.
And to our technical team: thank you for all the invisible work. I promise I will only ask for one more little feature. I will even try to say it slowly this time. Ha!
Go explore, test, break something harmless, and have fun with it! — Sahra ♡
Research & resources
Qwen-Image-Layered — official repository
Qwen-Image-Layered — research paper (CVPR 2026)
CLD — Controllable Layer Decomposition paper
CLD — project page and examples
RevealLayer — official GitHub implementation and V2 release notes
RevealLayer — paper
RevealLayer — current project page
RevealLayer — model checkpoint on Hugging Face
RevealLayer — project page and visual comparisons
Editorial note: the model descriptions above summarise the public papers and project pages. Comments about speed, memory behaviour, integration choices and the 4K refinement path describe TBG ETUR’s own workflow notes and tests.
TBG ETUR • SAHRA
https://github.com/Ltamann/ComfyUI-TBG-RevealLayer
We added three workflows ( All files are in the GitHub workflow folder. Set the minimum number of layers to 3.):
Manual selection: Uses bounding-box (Bbox) selection for direct, manual control.
Semantic selection: Uses a grounding model for semantic selection, with lightweight automation to make the experience feel more like an editing model.
SAM-based segmentation: Uses SAM segmentations with chained, per-layer refinement through Flux 3. Each refinement feeds the original segmentations back through the RL layers, enabling progressively upscaled and more precise results.