From 3D render to final image with ComfyUI: depth maps, ControlNet and look development
From clay render to depth map to dozens of light and material variations with Qwen-Image and the InstantX ControlNet Union in ComfyUI, while shape and framing stay yours.
In this article
- What you need
- 1. Set up the Blender scene around the final framing
- 2. Export a proper depth map (Mist or Z)
- 3. Alternative: estimate depth inside ComfyUI
- 4. Open the template and plug in your depth
- 5. Tune the ControlNet
- 6. Write the prompt like a look-dev brief
- 7. Batch variations with seeds
- 8. Targeted fixes with Qwen-Image-Edit (optional)
- 9. Bring the results back into your 3D work
- Recommended videos
- Common problems
- Transparency and credits
- Next step
- Sources
From a Blender blockout or clay render, export a depth map with near objects in white and far ones in black. Then feed it to ComfyUI’s official Qwen-Image InstantX Union ControlNet template. Shape and framing stay locked to your scene, and the prompt and seed decide light, materials and mood. You get dozens of look-development options to use as reference, not as final renders, with an all-Apache 2.0 stack.
- Depth maps and ControlNet for look dev
- Image editing with Qwen-Image-Edit
- Image-to-3D with TRELLIS.2
What you need
- An up-to-date ComfyUI (Desktop, portable or manual install).
- Blender (Cycles or EEVEE) and a simple scene: a blockout or a clay render.
- Qwen-Image by Alibaba/Qwen, Apache 2.0 licence (commercial use allowed). Comfy-Org repackaged files (
Comfy-Org/Qwen-Image_ComfyUIon Hugging Face):qwen_image_fp8_e4m3fn.safetensors(about 19 GB) inmodels/diffusion_models/qwen_2.5_vl_7b_fp8_scaled.safetensors(about 8.7 GB, text encoder) inmodels/text_encoders/qwen_image_vae.safetensorsinmodels/vae/
- InstantX Qwen-Image ControlNet Union, Apache 2.0, as stated on InstantX’s model card and on the Comfy-Org repository. It is one ControlNet for canny, soft edge, depth and pose. File:
Qwen-Image-InstantX-ControlNet-Union.safetensors(about 3.3 GB) fromComfy-Org/Qwen-Image-InstantX-ControlNets, inmodels/controlnet/. - Qwen-Image-Lightning by lightx2v, Apache 2.0 (optional but recommended). It is a LoRA for 4-step generation:
Qwen-Image-Lightning-4steps-V1.0.safetensorsinmodels/loras/. - Depth estimation (optional), if you don’t export depth from Blender:
- the template already includes Lotus Depth:
lotus-depth-d-v1-1.safetensors, Apache 2.0, inmodels/diffusion_models/, plus the SD1.5 VAEvae-ft-mse-840000-ema-pruned.safetensors, MIT licence; - alternatively, Depth Anything 3, native in ComfyUI, with Comfy-Org weights in
models/geometry_estimation/. The four variants Comfy-Org ships (small, base, mono_large, metric_large) are Apache 2.0. The “any-view” Large and Giant variants in the original repo are CC BY-NC 4.0, which means non-commercial; - or the comfyui_controlnet_aux node pack (Apache 2.0). Note that each preprocessor model has its own licence. Depth Anything V2 Small is Apache 2.0, while Base and Large are CC BY-NC 4.0.
- the template already includes Lotus Depth:
- Qwen-Image-Edit-2511 (Apache 2.0, optional) for the targeted edits in step 8.
- VRAM: the official docs measure the basic fp8 workflow on a 24 GB RTX 4090D at about 86% VRAM usage, and the ControlNet adds 3.3 GB. Treat 24 GB as the comfortable setup. With less, ComfyUI offloads to system RAM and slows down. Community quantisations (GGUF, Nunchaku) exist for 12–16 GB cards, but we don’t cover them here.
1. Set up the Blender scene around the final framing
The depth map locks composition and volumes, so settle the shot first: focal length, camera height, subject placement. You don’t need any shading. A flat grey material or the View Layer material override is enough.
The tricky part is resolution. In the official template the image goes through the FluxKontextImageScale node. That node snaps the image to the closest of a fixed list of roughly one-megapixel resolutions and centre-crops whatever doesn’t fit. A true 16:9 frame (1920×1080), for example, becomes 1392×752 and loses a strip at the top and bottom. To avoid surprises, render in Blender at one of these sizes:
1:1 1024 × 1024
3:2 1248 × 832 (portrait 832 × 1248)
~16:9 1392 × 752 (portrait 752 × 1392)
~5:3 1328 × 800
~4:3 1104 × 944 / 1184 × 880
Alternatively, delete that node and use sides that are multiples of 16 (the Qwen-Image model card lists 1328×1328 and 1664×928 for 16:9 as native). Either way, depth, any line art and the clay render must have exactly the same dimensions, or they won’t line up when you compare them later.
2. Export a proper depth map (Mist or Z)
The ControlNet expects the preprocessor convention: near = white, far = black, using the full grey range across the scene. Blender doesn’t give you that out of the box, but there are two ways to get there.
Mist pass (recommended). Enable it under View Layer Properties › Passes › Data › Mist. The Blender manual describes it as the distance to visible surfaces mapped to the 0–1 range, where 0 is near the camera and 1 is far. In the World properties, Mist Pass section, set Start just in front of the nearest object and Depth so the range ends just past the furthest element you care about. Keep Falloff on Linear. In the Compositor, route the Mist output through an Invert Color node to the output.
Z pass. It stores distance in scene units, so values like 3.7 or 120, which display as pure white. You have to normalise it: Z (called Depth in some versions) → Normalize → Invert Color → output. If the background is empty, its “infinite” distance crushes the scene towards black: use Map Range with From Min/Max set to your real distances instead (also better for sequences, where Normalize makes tones flicker).
Three rules for the export:
Color Management › View Transform: Standard (not AgX / Filmic)
Look: None, Exposure 0, Gamma 1
Output: PNG, BW, Color Depth 16
AgX or Filmic tone-maps the depth and flattens the mid planes. 16-bit avoids banding on sloped surfaces. Also save the clay render at the same resolution for comparisons. Menu names are from Blender 4.x; in Blender 5’s Compositor some items may live elsewhere.
Line art (optional). A Freestyle or Line Art render, white lines on black or the other way round depending on your setup, helps lock in hard edges that depth alone describes poorly. We use it in step 4. Normal maps are not among InstantX Union’s four control types. The Qwen-Image Union Control template (a DiffSynth LoRA) lists normal support, but we don’t cover it here.
3. Alternative: estimate depth inside ComfyUI
If all you have is a beauty render or a viewport screenshot, you can estimate depth instead. There are two official routes:
- Lotus, already inside the template. The Image to Depth Map (Lotus) subgraph produces depth and inverts it with an
ImageInvertnode (“Invert Image Colors”), so it already comes out near = white. - Depth Anything 3, via the Depth Estimation: Depth Anything 3 template. In the Render Depth Anything 3 node, the
depthoutput withv2_style(default) ormin_maxnormalisation is already near = white. Start withdepth_anything_3_mono_largeand raiseresolution(default 504) in Run Depth Anything 3 for more detail.
Estimated depth is often good, but depth exported from Blender is geometrically exact, which is why we prefer it.
4. Open the template and plug in your depth
In ComfyUI, open the Template Library and search for Qwen-Image InstantX Union ControlNet (file image_qwen_image_instantx_controlnet.json). The template has two subgraphs:
- Image to Depth Map (Lotus), which estimates depth from the loaded image;
- ControlNet (Qwen-Image InstantX Union), which holds the loaders,
Apply ControlNet(ControlNetApplyAdvanced), the Lightning LoRA and theKSampler.
If you exported depth from Blender, load it in the Load Image node and connect it straight to the ControlNet subgraph’s input, skipping the Lotus subgraph. The same image also feeds a VAEEncode which, at denoise 1, only gives the output the depth’s resolution.
To add line art, create a second Apply ControlNet with the same Union model and chain it after the first one (positive and negative come out of the first and go into the second). It isn’t in the official template; InstantX says the model works “just as a normal ControlNet”, with no mode selector.
5. Tune the ControlNet
The template’s defaults are strength 1, start 0 and end 1, with 4 steps, CFG 1, the euler sampler and the simple scheduler thanks to the 4-step Lightning LoRA. InstantX’s model card recommends a conditioning scale of 0.8–1.0 for every control type. From there, for look development:
| Parameter | Where | Starting value | Effect |
|---|---|---|---|
strength |
Apply ControlNet | 0.8–1.0 | Above 1, shapes get rigid and surfaces look plasticky. Below 0.6, the model starts reinterpreting volumes. |
start_percent |
Apply ControlNet | 0 | Keep it at 0: the first steps set the composition. |
end_percent |
Apply ControlNet | 0.7–1.0 | Lowering it frees the last steps, where texture and micro-detail happen, and gives richer materials without touching the shape. With only 4 steps the changes come in coarse jumps, so try 0.75 and 0.5. |
| line art (2nd ControlNet) | Apply ControlNet | 0.4–0.6, end 0.5 | Holds hard edges without forcing every line. |
| steps / cfg | KSampler | 4 / 1.0 with Lightning; 20 / 2.5 without | These are the values from the template note. Without Lightning it’s slower but follows the prompt more closely. |
| shift | ModelSamplingAuraFlow | 3.1 | The template note says to raise it if images come out dark or blurry, and lower it for more detail. |
The line-art strength and end values are our own starting points, not official guidance. The template also warns that the distilled model and the Lightning LoRA don’t seem to work well together, so use one or the other.
6. Write the prompt like a look-dev brief
Depth says where things are. The prompt says what they’re made of and how they’re lit. Qwen-Image does well with long, descriptive prompts, and InstantX’s card recommends detailed ones. Structure the text in blocks, in the same order you’d think through shading and lighting:
[subject & scale] interior of a small ceramics studio, workbench in the centre
[materials] oiled oak worktop with scratches, raw unglazed stoneware vases,
lime-plaster walls, worn terracotta floor tiles
[light] low late-afternoon sun raking in from a window on the left,
long soft shadows, cool skylight fill
[camera] 35 mm lens, eye level, shallow depth of field
[rendering] realistic interior photography, natural colours, fine grain
Then change one block at a time. Keep subject and camera fixed and try “cold neon at night”, “flat overcast light”, “backlight with dust in the air”. Or lock the light and switch between oak, painted metal and terrazzo. If the scene contains text, the model card suggests spelling it out in the prompt. At CFG 1 the negative prompt has no effect.
7. Batch variations with seeds
In the KSampler, control after generate is set to randomize, so every run uses a new seed. Here’s the method we use:
- Explore: keep the seed on randomize and raise the run count next to the Run button (8, say).
- Pick: find the seed of the best image in the history (Queue/Assets). Dragging the PNG into ComfyUI reopens the workflow with that seed.
- Refine: set the seed to
fixedand change only the prompt, strength and end_percent.
For several images in one pass, add a Repeat Latent Batch node between VAEEncode and the KSampler (it costs VRAM).
8. Targeted fixes with Qwen-Image-Edit (optional)
If only the floor is wrong, don’t regenerate everything: the official Qwen Image Edit 2511 – Material Replacement template takes your image plus a reference image of the material and applies a text instruction, such as “replace the terracotta floor in image 1 with the terrazzo from image 2”. The text node is Text Encode Qwen Image Edit Plus. The files are qwen_image_edit_2511 (bf16 in the docs, fp8mixed in the template) in models/diffusion_models/, plus the same text encoder and VAE as before. There’s also an optional 4-step Lightning LoRA (Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors). The template’s reference settings are 40 steps at CFG 4 (or 20 steps), and 4 steps at CFG 1 with the LoRA. Edits can shift the image slightly, so recheck alignment.
9. Bring the results back into your 3D work
These images are concept and look reference, not frames to deliver as renders:
- Lighting: put the chosen image next to the viewport (a reference image or a second window in Blender is fine) and rebuild the direction, colour temperature and key/fill ratio with real lights.
- Materials: sample the dominant colours to set albedo and palette, but rebuild roughness and detail with your own textures and shaders or with clearly licensed libraries.
- Comparison: overlay the clay render on the generated image (same resolution, remember?) to see where the model “cheated” on geometry by adding objects or changing silhouettes.
- Presentation: a board of 6–9 labelled variants (prompt, seed, strength) helps agree a look with a client or art director, as long as it’s presented for what it is.
Recommended videos
Two videos from the official ComfyUI channel: the first explains ControlNets from scratch, the second is the livestream on ControlNets for Qwen-Image (covering the DiffSynth variant, an alternative to InstantX).
ComfyUI Tutorial for Beginners: LoRAs, Style Transfer & ControlNets (2026) – ComfyUI
Qwen-Image ControlNet in ComfyUI – DiffSynth – ComfyUI
Common problems
- Inverted depth (near = black): the background “pops” towards the camera and volumes flip. Invert the depth.
- Flat grey depth: the AgX/Filmic view transform is on, or Mist Start/Depth is too wide for the scene. Switch to Standard and tighten the range.
- Cropped or shifted frame:
FluxKontextImageScalecropped an unexpected aspect ratio. Use the sizes from step 1. - Stepped banding on surfaces: the depth is 8-bit. Export at 16-bit.
- Plastic look, little detail: strength is too high or end_percent is at 1. Drop to 0.8 and try end 0.7.
- Invented objects or lost silhouettes: depth can’t hold thin details (cables, chair legs, railings). Add line art through a second ControlNet at low strength.
- Missing nodes or out of memory: update ComfyUI; for memory, go down towards one megapixel and avoid large batches.
Transparency and credits
In line with 3DArt’s AI manifesto: if you publish or present these images, state that they are AI-generated from your own 3D scene, and don’t pass them off as renders. Credit the tools with links to their original pages: Qwen-Image (Qwen/Alibaba), InstantX ControlNet Union, Qwen-Image-Lightning (lightx2v), Lotus or Depth Anything 3, ComfyUI. Before commercial use, check the licence of every file, preprocessors included. Don’t put living artists’ names in the prompt to imitate their style. In 3DArt’s mixed contests the 3D base must be yours and AI use must be declared.
Next step
In the fourth tutorial of the series we go the other way: from an image to a 3D model with TRELLIS.2, turning a concept into a starting mesh to refine in Blender.
Sources
- ComfyUI Docs – Qwen-Image (ControlNet section, models and folders)
- Comfy.org – “Qwen-Image InstantX Union ControlNet” workflow
- GitHub – Comfy-Org/workflow_templates
- Hugging Face – InstantX/Qwen-Image-ControlNet-Union (Apache 2.0)
- Hugging Face – Comfy-Org/Qwen-Image-InstantX-ControlNets
- Hugging Face – Qwen/Qwen-Image (Apache 2.0)
- Hugging Face – lightx2v/Qwen-Image-Lightning (Apache 2.0)
- Hugging Face – Lotus Depth v1.1 (Apache 2.0)
- ComfyUI Docs – Depth Anything 3
- Hugging Face – Comfy-Org/Depth-Anything-3
- GitHub – ByteDance-Seed/Depth-Anything-3 (licence per variant)
- GitHub – comfyui_controlnet_aux (Apache 2.0)
- ComfyUI Docs – Qwen-Image-Edit-2511
- Hugging Face – Qwen/Qwen-Image-Edit-2511 (Apache 2.0)
- Blender Manual – Render Passes