ControlNet Set Union Types (Flux)
Tell your Union model which hat to wear
- control_net
- CONTROL_NET
A ControlNet Union is one big model that contains several ControlNets inside it - Canny, depth, pose, tile and friends all sharing a single weight file. The catch: before you use it, you have to tell it which of its inner ControlNets to act as for this run. That's the entire job of this node. You feed it a Flux Union ControlNet, pick a type from the dropdown, and it stamps the right control code onto the model so the preprocessed image actually does what you expect.
How it works
The mechanism is simple but easy to get wrong if you hand-roll it. The Union model reads an integer control type from the ControlNet's extra arguments at sampling time. This node does that for you:
control_net = control_net.copy()
control_net.set_extra_arg("control_type", [type_number])
It takes the control_net input, copies it (so you never mutate your loaded model - important, because you might want to use the same Union with two different types in one graph), sets the matching type number, and hands the configured copy back out the CONTROL_NET output. The dropdown maps friendly names to the numbers the model expects, based on the FLUX.1-dev-ControlNet-Union-Pro model card:
- canny / lineart / anime_lineart / mlsd (edge family, one code)
- tile, depth, blur, openpose, gray, low quality
Seven entries, and that's the whole menu - which is exactly the state of Flux-era unions in general. The SDXL union covered a dozen conditions; the post-Flux unions generally stop around seven (plus an inpaint mode), and things like QR-code brightness and segmentation never got rebuilt for the new architectures. So don't go hunting for a "reference" option - it's not there.
The inputs that matter
- control_net - your loaded Flux Union ControlNet. Wire it from a ControlNet Loader pointing at the Union Pro safetensors.
- type - the dropdown that picks which inner ControlNet activates.
The CONTROL_NET output goes into a standard ControlNet Apply, which also receives your conditioning and the preprocessed image (Canny edges, depth map, pose skeleton, whatever matches the type you picked). Wire it like any ControlNet - the only difference is that the type was chosen here instead of being baked into a separate model file.
Why this matters for Flux
Flux ControlNet workflows have a specific shape: the model file is one Union, and the whole "which control" question is just an integer. Forget to set it and you get a Union running with no type - which usually means garbage, or guidance that does nothing. A node like this removes the footgun by making the type a named dropdown instead of a magic number. It also plays well with the pack's ControlNet Multi-Switch if you want to flip between several configured types.
Installing it
Part of the RvTools v2 pack - no extra models (the Union Pro weights are a separate download you get from Hugging Face / Civitai). ComfyUI Manager → search RvTools → install ComfyUI-RvTools_v2, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2
Restart and confirm RvTools v2: Version 2.5.x in the console.
Troubleshooting
- Wrong preprocessor for the type. Canny edges into a depth-type run makes no sense. Match your preprocessor output to the dropdown selection.
- "Control type not set" artifacts. If output looks like the ControlNet is being ignored, check the type is set and the ControlNet Apply's strength/start-end aren't at zero - the node sets the type, but the weight and step range live on the Apply node.
- Old v1 RvTools references fail in Manager - the original repo was deleted, and the author has since moved development to ComfyUI_Eclipse, which supersedes this pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| control_net | CONTROL_NET | — | |
| type | COMBO | 7 options: canny/lineart/anime_lineart/mlsd, tile, depth, blur, openpose, gray, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONTROL_NET | CONTROL_NET | — |