docs(qwen-image-layered): document the layers widget and the layers + 1 output - #1357
Conversation
… 1 output The tutorial had no section on the `layers` widget and said nothing about what a generation actually produces, so a reader has no way to know that the first decoded image is not a layer. Add a Layers and output section covering: - the model regenerates the full image as well as the layers, so a generation decodes to layers + 1 images - the first image is that full image and should be discarded when only the layers are wanted; layers=0 is valid and yields it on its own - compositing all the layers recreates the full image, which makes a usable correctness check - the layers ride the temporal axis of the 5D latent, LatentCutToBatch with dim=t moves it into the batch dimension, and a layer's z-order is therefore just its batch index; there is no z-index field and no per-layer metadata - the layered VAE decodes to 4 channels, so layers carry alpha zh/ja/ko regenerated with the repo's translate pipeline, then hand checked and repunctuated to match the surrounding pages.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 26 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Comment |
Problem
tutorials/image/qwen/qwen-image-layered.mdxhas no section on thelayerswidget and never says what a generation produces. A reader following the template gets three images out of alayers = 2run and has no way to know that the first one is not a layer.These semantics are not written down anywhere: not in core, not on docs.comfy.org, not on the Hugging Face model card. A core maintainer could not work them out from the code and had to ask.
What is actually true
comfyanonymous, on this model:
Verified against source:
comfy_extras/nodes_qwen.py:109-130:EmptyQwenImageLayeredLatentImageallocatestorch.zeros([batch_size, 16, layers + 1, height // 8, width // 8]), andlayershasmin=0.comfy_extras/nodes_latent.py:217-256:LatentCutToBatchwithdim="t"reshapes the temporal axis into the batch dimension, so the decoded z-order is purely the batch index. Nothing else carries it.comfy/sd.py:791setsoutput_channelsfromencoder.conv1.weight; the Qwen-Image-Layered VAE ships that as[96, 4, 3, 3, 3], so it decodes to 4 channels.templates/image_qwen_image_layered.jsonwiresEmptyQwenImageLayeredLatentImage(layers = 2) intoLatentCutToBatch(dim="t")intoVAEDecodeintoSaveImage, which is why the default run saves 3 images.Change
A new
## Layers and outputsection on the English page and its zh / ja / ko mirrors, covering:layers + 1output count, with a small table for0/2/5layers = 0is valid and yields that image aloneNo screenshots needed: this page embeds none, and it stated no output count that is now contradicted.
Translations
zh / ja / ko were regenerated with the repo's own pipeline (
pnpm translateon the new block only, incremental), then read back and repunctuated by hand so the new section matches the fullwidth punctuation and latin spacing of the surrounding text on each page.pnpm translate:check-truncationreports no issues for this page.Related, not fixed here
comfyanonymous also said "our qwen layered template is slightly wrong", meaning the template saves the duplicate first image. That is a fix in
Comfy-Org/workflow_templates, not here.