In this chapter, we will introduce how to use Flux Depth Control to generate images with similar content position depth to the original image.
This image is generated by AI
/models/diffusion_models/
folder. However, because this model includes the Flux Dev model, it is quite large, about 24GB. But the good thing is that you only need to load one model when loading the model.models/loras/
folder. This model file is only about 1.24GB.models/controlnet/
folder. Also, note that this file can be renamed when downloading, renamed as instantx_flux_depth.safetensors
, to facilitate subsequent use.models/controlnet/
folder.flux Canny
in the ① Diffusion node group with the Depth model, and then replace the Canny
node with any Depth
node (you can use any Depth node you are familiar with) (Figure ②). Finally, connect the Depth
node and the Load Image
node. If you want to preview the effect of the Depth node, you can connect the Depth
node and the Preview Image
node, so you can see the depth map output by the Depth node.
LoraLoaderModelOnly
node (Figure ②) after the Load Diffusion Model
node (Figure ①). Then replace the flux dev depth
model in the Diffusion node group with flux dev
, and then select the Flux Depth LoRA model you downloaded in the LoraLoaderModelOnly
node.
The effect of the two will basically not be too different.
Apply ControlNet with VAE
node (as shown in Figure ①). Then connect it with Load VAE
(Figure ②), Load ControlNet Model
(Figure ②) and any Depth
node (Figure ③).Load ControlNet Model
node.Get Image Size
node (Figure ④), and then connected it with the SD3LatentImage
node (Figure ⑤). So the generated image size is the same as the input Depth map size.Load VAE
and DualCLIPLoader
nodes, and replace them with the Load Checkpoint
node. Then select the FP8 version of the Flux model.
Figure | Description |
---|---|
① | Replace the KSampler node with the Xlabs Sampler node. You can see that this node has an additional controlnet_condition input. |
② | I replaced the CLIPTextEncode node with the CLIPTextEncodeFlux node. You don’t need to modify it. I just want to tell you that there are other Flux CLIP nodes. This node can control Clip l and t5xxl separately. |
③ | Replace the Apply ControlNet VAE node with the Apply Flux ControlNet node. |
④ | Replace the Load ControlNet Model node with the Load Flux ControlNet node. And select the downloaded Flux Depth Controlnet model. |
⑤ | I replaced a Depth node. You can use any Depth node you are familiar with. |
⑥ | SD3LatentImage node I also used the Empty Latent Image node. This is also to show that this node can be used with the most basic version besides the SD3 version. |