Easy Background Change with the New Flux ControlNet Depth Model! (Workflow Included)

preview_player
Показать описание
Welcome back, it's Wei here! In today’s tutorial, I’m diving into a simplified and streamlined method for swapping backgrounds using the Flux ControlNet Depth model. If you’ve struggled with complex workflows or slow rendering times, this video is for you! I’ll show you how to set up a background replacement workflow in ComfyUI that only requires around 30 nodes and runs much faster.

Related Videos:

Related Workflow:

Models:

Nodes:

Chapters:

0:00 - Introduction & Overview

1:33 - Setting Up the Model & Workflow

2:37 - Workflow Group 1: Image Rescaling & Background Removal

4:20 - Workflow Group 2: Generating the Depth Map and the New Background

5:30 - Workflow Group 3: Final Image Composition
Рекомендации по теме
Комментарии
Автор

This is great, but could you make the subject blend more into the background? Right now, it does not look natural, more like a cutoff to the different background. Is there an option to let Comfy change the subject a bit but swap the original face back in the final nodes? :)

AI_mazing
Автор

Nice useful workflow, keep them coming 👍 Looking forward for the updated version!

RenjithRS
Автор

Always top quality videos from you Wei!

superlucky
Автор

Thanks for another helpful video and interesting conversation! ))

Alex_Niko_Y
Автор

You always have great tutorials thanks. On this one the backround stay's black. I have the subject

philippeheritier
Автор

Thank you for your tutorial! Is there a way to combine it with ic-light?

LUQILING
Автор

SInce the depth controlnet is not precise, it generates extra edges/objects (i.e not according to depth map).Removing those objects with llamma mostly results in unwanted marks(especially if there is color contrast between the extra edge and background) on the final image even after final foreground restore.

anilsathyan
Автор

This workflow doesn't do relight does it ?

victormustin
Автор

great tutorial! By the way, does anyone have the same problem when loading the controlnet? The workflow shows the following error

Error occurred when executing ControlNetLoader:

MMDiT.__init__() got an unexpected keyword argument 'image_model'

File "/data/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/data/ComfyUI/execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/data/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/data/ComfyUI/nodes.py", line 747, in load_controlnet
controlnet =
File "/data/ComfyUI/comfy/controlnet.py", line 507, in load_controlnet
return
File "/data/ComfyUI/comfy/controlnet.py", line 413, in load_controlnet_mmdit
control_model = comfy.cldm.mmdit.ControlNet(num_blocks=num_blocks, operations=operations, device=load_device, dtype=unet_dtype, **model_config.unet_config)
File "/data/ComfyUI/comfy/cldm/mmdit.py", line 14, in __init__
super().__init__(dtype=dtype, device=device, operations=operations, final_layer=False, num_blocks=num_blocks, **kwargs)

ganliu