Nodes/ComfyUI-ForgeAPI/Forge ControlNet Stack
ComfyUI Node

Forge ControlNet Stack

Twenty ControlNet slots, preprocessed on Forge's side — the adapter that keeps pose and edge control in your graph

By kreonxv·Created 7 months ago·Updated 7 months ago· 0
Forge ControlNet Stack
  • cn_1_image
  • cn_2_image
  • cn_3_image
  • cn_4_image
  • cn_5_image
  • cn_6_image
  • cn_7_image
  • cn_8_image
  • cn_9_image
  • cn_10_image
  • cn_11_image
  • cn_12_image
  • cn_13_image
  • cn_14_image
  • cn_15_image
  • cn_16_image
  • cn_17_image
  • cn_18_image
  • cn_19_image
  • cn_20_image
  • cn_stack
  • cn_1_preview
  • cn_2_preview
  • cn_3_preview
  • cn_4_preview
  • cn_5_preview
  • cn_6_preview
  • cn_7_preview
  • cn_8_preview
  • cn_9_preview
  • cn_10_preview
  • cn_11_preview
  • cn_12_preview
  • cn_13_preview
  • cn_14_preview
  • cn_15_preview
  • cn_16_preview
  • cn_17_preview
  • cn_18_preview
  • cn_19_preview
  • cn_20_preview
forge_urlhttp://127.0.0.1:7860
enabledtrue
cn_1_model
cn_1_preprocessor
cn_1_weight1.00
cn_1_start0.00
cn_1_end1.00
cn_1_resolution512
cn_1_threshold_a100
cn_1_threshold_b200
cn_1_control_modeBalanced
cn_1_resize_modeCrop and Resize
cn_2_model
cn_2_preprocessor
cn_2_weight1.00
cn_2_start0.00
cn_2_end1.00
cn_2_resolution512
cn_2_threshold_a100
cn_2_threshold_b200
cn_2_control_modeBalanced
cn_2_resize_modeCrop and Resize
cn_3_model
cn_3_preprocessor
cn_3_weight1.00
cn_3_start0.00
cn_3_end1.00
cn_3_resolution512
cn_3_threshold_a100
cn_3_threshold_b200
cn_3_control_modeBalanced
cn_3_resize_modeCrop and Resize
cn_4_model
cn_4_preprocessor
cn_4_weight1.00
cn_4_start0.00
cn_4_end1.00
cn_4_resolution512
cn_4_threshold_a100
cn_4_threshold_b200
cn_4_control_modeBalanced
cn_4_resize_modeCrop and Resize
cn_5_model
cn_5_preprocessor
cn_5_weight1.00
cn_5_start0.00
cn_5_end1.00
cn_5_resolution512
cn_5_threshold_a100
cn_5_threshold_b200
cn_5_control_modeBalanced
cn_5_resize_modeCrop and Resize
cn_6_model
cn_6_preprocessor
cn_6_weight1.00
cn_6_start0.00
cn_6_end1.00
cn_6_resolution512
cn_6_threshold_a100
cn_6_threshold_b200
cn_6_control_modeBalanced
cn_6_resize_modeCrop and Resize
cn_7_model
cn_7_preprocessor
cn_7_weight1.00
cn_7_start0.00
cn_7_end1.00
cn_7_resolution512
cn_7_threshold_a100
cn_7_threshold_b200
cn_7_control_modeBalanced
cn_7_resize_modeCrop and Resize
cn_8_model
cn_8_preprocessor
cn_8_weight1.00
cn_8_start0.00
cn_8_end1.00
cn_8_resolution512
cn_8_threshold_a100
cn_8_threshold_b200
cn_8_control_modeBalanced
cn_8_resize_modeCrop and Resize
cn_9_model
cn_9_preprocessor
cn_9_weight1.00
cn_9_start0.00
cn_9_end1.00
cn_9_resolution512
cn_9_threshold_a100
cn_9_threshold_b200
cn_9_control_modeBalanced
cn_9_resize_modeCrop and Resize
cn_10_model
cn_10_preprocessor
cn_10_weight1.00
cn_10_start0.00
cn_10_end1.00
cn_10_resolution512
cn_10_threshold_a100
cn_10_threshold_b200
cn_10_control_modeBalanced
cn_10_resize_modeCrop and Resize
cn_11_model
cn_11_preprocessor
cn_11_weight1.00
cn_11_start0.00
cn_11_end1.00
cn_11_resolution512
cn_11_threshold_a100
cn_11_threshold_b200
cn_11_control_modeBalanced
cn_11_resize_modeCrop and Resize
cn_12_model
cn_12_preprocessor
cn_12_weight1.00
cn_12_start0.00
cn_12_end1.00
cn_12_resolution512
cn_12_threshold_a100
cn_12_threshold_b200
cn_12_control_modeBalanced
cn_12_resize_modeCrop and Resize
cn_13_model
cn_13_preprocessor
cn_13_weight1.00
cn_13_start0.00
cn_13_end1.00
cn_13_resolution512
cn_13_threshold_a100
cn_13_threshold_b200
cn_13_control_modeBalanced
cn_13_resize_modeCrop and Resize
cn_14_model
cn_14_preprocessor
cn_14_weight1.00
cn_14_start0.00
cn_14_end1.00
cn_14_resolution512
cn_14_threshold_a100
cn_14_threshold_b200
cn_14_control_modeBalanced
cn_14_resize_modeCrop and Resize
cn_15_model
cn_15_preprocessor
cn_15_weight1.00
cn_15_start0.00
cn_15_end1.00
cn_15_resolution512
cn_15_threshold_a100
cn_15_threshold_b200
cn_15_control_modeBalanced
cn_15_resize_modeCrop and Resize
cn_16_model
cn_16_preprocessor
cn_16_weight1.00
cn_16_start0.00
cn_16_end1.00
cn_16_resolution512
cn_16_threshold_a100
cn_16_threshold_b200
cn_16_control_modeBalanced
cn_16_resize_modeCrop and Resize
cn_17_model
cn_17_preprocessor
cn_17_weight1.00
cn_17_start0.00
cn_17_end1.00
cn_17_resolution512
cn_17_threshold_a100
cn_17_threshold_b200
cn_17_control_modeBalanced
cn_17_resize_modeCrop and Resize
cn_18_model
cn_18_preprocessor
cn_18_weight1.00
cn_18_start0.00
cn_18_end1.00
cn_18_resolution512
cn_18_threshold_a100
cn_18_threshold_b200
cn_18_control_modeBalanced
cn_18_resize_modeCrop and Resize
cn_19_model
cn_19_preprocessor
cn_19_weight1.00
cn_19_start0.00
cn_19_end1.00
cn_19_resolution512
cn_19_threshold_a100
cn_19_threshold_b200
cn_19_control_modeBalanced
cn_19_resize_modeCrop and Resize
cn_20_model
cn_20_preprocessor
cn_20_weight1.00
cn_20_start0.00
cn_20_end1.00
cn_20_resolution512
cn_20_threshold_a100
cn_20_threshold_b200
cn_20_control_modeBalanced
cn_20_resize_modeCrop and Resize

ControlNet is how you tell the model where things go - pose, edges, depth - while the prompt decides what they are. If you're building a ComfyUI graph that actually renders on SD WebUI Forge (through the ForgeSampler node in this same pack), you can't use ComfyUI's native ControlNet nodes; Forge never sees them. This node is the matching adapter: it turns your images and settings into a CN_STACK that ForgeSampler injects into Forge's ControlNet handler when it fires the generation call.

The headline feature is capacity. It exposes twenty units, cn_1 through cn_20, and every one carries the full A1111-era ControlNet toolkit: image, model, preprocessor, weight, start/end guidance, resolution, thresholds, control mode, and resize mode. You'll rarely use more than two or three at once, but the headroom is nice for stacked pose + depth + canny compositions - which is exactly the setup ControlNet was famous for enabling.

How it works. When the node loads, it asks Forge for its model list (/controlnet/model_list) and preprocessor list (/controlnet/module_list) to fill the dropdowns. For each slot that has both an image and a model, it runs the preprocessor on Forge's side: it POSTs your image to Forge's /controlnet/detect endpoint, which returns the processed map (line drawing, depth map, whatever the module produces). Then it packages a per-unit dict - model, weight, the base64 image, processor_res, thresholds, guidance_start/guidance_end, control mode, resize mode - into the stack. ForgeSampler drops that into alwayson_scripts.ControlNet.args on the API call, and Forge does all the ControlNet math. ComfyUI is the remote control, not the engine.

The inputs that matter per slot:

  • cn_N_image and cn_N_model - the only two you must set for a unit to activate. No image plus model, no unit, no effect.
  • cn_N_preprocessor - default "none". Set it when you're feeding a raw photo and need pose/canny/depth detected; leave it at "none" when you're feeding a ready-made map.
  • cn_N_weight - 0 to 2, default 1.0. This is your main dial; if a condition is fighting the prompt, it's usually this.
  • cn_N_start / cn_N_end - when during sampling the condition applies (0 to 1). Useful for letting the prompt take over in the final steps.

The rest you can ignore until they bite: resolution (512, the preprocessor's working resolution), threshold_a/threshold_b (100/200 - meaningful mainly for threshold-style modules like canny), control_mode (Balanced / prompt-more-important / ControlNet-more-important), and resize_mode ("Crop and Resize" is the sane default).

Outputs are cn_stack (into ForgeSampler's cn_stack input) plus cn_1_preview through cn_20_preview images of the processed maps. Wire a couple of those into a PreviewImage node. It's free, and it's the best debugging habit in ControlNet: the canny preview should look like an actual line drawing before you spend 30 steps hoping.

Install & gotchas. Same pack, same install - ComfyUI Manager ("ComfyUI-ForgeAPI") or git clone https://github.com/kreonxv/ComfyUI-ForgeAPI into custom_nodes, then restart. No model downloads: the ControlNet models are the ones already in Forge's folder.

Two gotchas worth flagging. First, the /controlnet/* endpoints only exist if Forge actually has ControlNet available (the sd-webui-controlnet extension, which Forge can run). Without it you get empty model lists, and detect fails - the code then silently passes your original image through instead of preprocessing it, so a "none" model with no map does nothing useful. Second, same rule as every node in this pack: Forge must be running and reachable when ComfyUI boots, or the dropdowns come up empty. Start Forge, restart ComfyUI, then build your stack.

CategoryForgeUI

Inputs (222)

NameTypeDefaultDescription
forge_urlSTRINGhttp://127.0.0.1:7860
enabledBOOLEANtrue
cn_1_imageoptIMAGE
cn_1_modeloptCOMBO1 options: None
cn_1_preprocessoroptCOMBO1 options: none
cn_1_weightoptFLOAT1.000–2
cn_1_startoptFLOAT0.000–1
cn_1_endoptFLOAT1.000–1
cn_1_resolutionoptINT51264–2048
cn_1_threshold_aoptFLOAT1000–255
cn_1_threshold_boptFLOAT2000–255
cn_1_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_1_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_2_imageoptIMAGE
cn_2_modeloptCOMBO1 options: None
cn_2_preprocessoroptCOMBO1 options: none
cn_2_weightoptFLOAT1.000–2
cn_2_startoptFLOAT0.000–1
cn_2_endoptFLOAT1.000–1
cn_2_resolutionoptINT51264–2048
cn_2_threshold_aoptFLOAT1000–255
cn_2_threshold_boptFLOAT2000–255
cn_2_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_2_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_3_imageoptIMAGE
cn_3_modeloptCOMBO1 options: None
cn_3_preprocessoroptCOMBO1 options: none
cn_3_weightoptFLOAT1.000–2
cn_3_startoptFLOAT0.000–1
cn_3_endoptFLOAT1.000–1
cn_3_resolutionoptINT51264–2048
cn_3_threshold_aoptFLOAT1000–255
cn_3_threshold_boptFLOAT2000–255
cn_3_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_3_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_4_imageoptIMAGE
cn_4_modeloptCOMBO1 options: None
cn_4_preprocessoroptCOMBO1 options: none
cn_4_weightoptFLOAT1.000–2
cn_4_startoptFLOAT0.000–1
cn_4_endoptFLOAT1.000–1
cn_4_resolutionoptINT51264–2048
cn_4_threshold_aoptFLOAT1000–255
cn_4_threshold_boptFLOAT2000–255
cn_4_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_4_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_5_imageoptIMAGE
cn_5_modeloptCOMBO1 options: None
cn_5_preprocessoroptCOMBO1 options: none
cn_5_weightoptFLOAT1.000–2
cn_5_startoptFLOAT0.000–1
cn_5_endoptFLOAT1.000–1
cn_5_resolutionoptINT51264–2048
cn_5_threshold_aoptFLOAT1000–255
cn_5_threshold_boptFLOAT2000–255
cn_5_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_5_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_6_imageoptIMAGE
cn_6_modeloptCOMBO1 options: None
cn_6_preprocessoroptCOMBO1 options: none
cn_6_weightoptFLOAT1.000–2
cn_6_startoptFLOAT0.000–1
cn_6_endoptFLOAT1.000–1
cn_6_resolutionoptINT51264–2048
cn_6_threshold_aoptFLOAT1000–255
cn_6_threshold_boptFLOAT2000–255
cn_6_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_6_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_7_imageoptIMAGE
cn_7_modeloptCOMBO1 options: None
cn_7_preprocessoroptCOMBO1 options: none
cn_7_weightoptFLOAT1.000–2
cn_7_startoptFLOAT0.000–1
cn_7_endoptFLOAT1.000–1
cn_7_resolutionoptINT51264–2048
cn_7_threshold_aoptFLOAT1000–255
cn_7_threshold_boptFLOAT2000–255
cn_7_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_7_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_8_imageoptIMAGE
cn_8_modeloptCOMBO1 options: None
cn_8_preprocessoroptCOMBO1 options: none
cn_8_weightoptFLOAT1.000–2
cn_8_startoptFLOAT0.000–1
cn_8_endoptFLOAT1.000–1
cn_8_resolutionoptINT51264–2048
cn_8_threshold_aoptFLOAT1000–255
cn_8_threshold_boptFLOAT2000–255
cn_8_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_8_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_9_imageoptIMAGE
cn_9_modeloptCOMBO1 options: None
cn_9_preprocessoroptCOMBO1 options: none
cn_9_weightoptFLOAT1.000–2
cn_9_startoptFLOAT0.000–1
cn_9_endoptFLOAT1.000–1
cn_9_resolutionoptINT51264–2048
cn_9_threshold_aoptFLOAT1000–255
cn_9_threshold_boptFLOAT2000–255
cn_9_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_9_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_10_imageoptIMAGE
cn_10_modeloptCOMBO1 options: None
cn_10_preprocessoroptCOMBO1 options: none
cn_10_weightoptFLOAT1.000–2
cn_10_startoptFLOAT0.000–1
cn_10_endoptFLOAT1.000–1
cn_10_resolutionoptINT51264–2048
cn_10_threshold_aoptFLOAT1000–255
cn_10_threshold_boptFLOAT2000–255
cn_10_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_10_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_11_imageoptIMAGE
cn_11_modeloptCOMBO1 options: None
cn_11_preprocessoroptCOMBO1 options: none
cn_11_weightoptFLOAT1.000–2
cn_11_startoptFLOAT0.000–1
cn_11_endoptFLOAT1.000–1
cn_11_resolutionoptINT51264–2048
cn_11_threshold_aoptFLOAT1000–255
cn_11_threshold_boptFLOAT2000–255
cn_11_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_11_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_12_imageoptIMAGE
cn_12_modeloptCOMBO1 options: None
cn_12_preprocessoroptCOMBO1 options: none
cn_12_weightoptFLOAT1.000–2
cn_12_startoptFLOAT0.000–1
cn_12_endoptFLOAT1.000–1
cn_12_resolutionoptINT51264–2048
cn_12_threshold_aoptFLOAT1000–255
cn_12_threshold_boptFLOAT2000–255
cn_12_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_12_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_13_imageoptIMAGE
cn_13_modeloptCOMBO1 options: None
cn_13_preprocessoroptCOMBO1 options: none
cn_13_weightoptFLOAT1.000–2
cn_13_startoptFLOAT0.000–1
cn_13_endoptFLOAT1.000–1
cn_13_resolutionoptINT51264–2048
cn_13_threshold_aoptFLOAT1000–255
cn_13_threshold_boptFLOAT2000–255
cn_13_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_13_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_14_imageoptIMAGE
cn_14_modeloptCOMBO1 options: None
cn_14_preprocessoroptCOMBO1 options: none
cn_14_weightoptFLOAT1.000–2
cn_14_startoptFLOAT0.000–1
cn_14_endoptFLOAT1.000–1
cn_14_resolutionoptINT51264–2048
cn_14_threshold_aoptFLOAT1000–255
cn_14_threshold_boptFLOAT2000–255
cn_14_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_14_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_15_imageoptIMAGE
cn_15_modeloptCOMBO1 options: None
cn_15_preprocessoroptCOMBO1 options: none
cn_15_weightoptFLOAT1.000–2
cn_15_startoptFLOAT0.000–1
cn_15_endoptFLOAT1.000–1
cn_15_resolutionoptINT51264–2048
cn_15_threshold_aoptFLOAT1000–255
cn_15_threshold_boptFLOAT2000–255
cn_15_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_15_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_16_imageoptIMAGE
cn_16_modeloptCOMBO1 options: None
cn_16_preprocessoroptCOMBO1 options: none
cn_16_weightoptFLOAT1.000–2
cn_16_startoptFLOAT0.000–1
cn_16_endoptFLOAT1.000–1
cn_16_resolutionoptINT51264–2048
cn_16_threshold_aoptFLOAT1000–255
cn_16_threshold_boptFLOAT2000–255
cn_16_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_16_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_17_imageoptIMAGE
cn_17_modeloptCOMBO1 options: None
cn_17_preprocessoroptCOMBO1 options: none
cn_17_weightoptFLOAT1.000–2
cn_17_startoptFLOAT0.000–1
cn_17_endoptFLOAT1.000–1
cn_17_resolutionoptINT51264–2048
cn_17_threshold_aoptFLOAT1000–255
cn_17_threshold_boptFLOAT2000–255
cn_17_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_17_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_18_imageoptIMAGE
cn_18_modeloptCOMBO1 options: None
cn_18_preprocessoroptCOMBO1 options: none
cn_18_weightoptFLOAT1.000–2
cn_18_startoptFLOAT0.000–1
cn_18_endoptFLOAT1.000–1
cn_18_resolutionoptINT51264–2048
cn_18_threshold_aoptFLOAT1000–255
cn_18_threshold_boptFLOAT2000–255
cn_18_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_18_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_19_imageoptIMAGE
cn_19_modeloptCOMBO1 options: None
cn_19_preprocessoroptCOMBO1 options: none
cn_19_weightoptFLOAT1.000–2
cn_19_startoptFLOAT0.000–1
cn_19_endoptFLOAT1.000–1
cn_19_resolutionoptINT51264–2048
cn_19_threshold_aoptFLOAT1000–255
cn_19_threshold_boptFLOAT2000–255
cn_19_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_19_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill
cn_20_imageoptIMAGE
cn_20_modeloptCOMBO1 options: None
cn_20_preprocessoroptCOMBO1 options: none
cn_20_weightoptFLOAT1.000–2
cn_20_startoptFLOAT0.000–1
cn_20_endoptFLOAT1.000–1
cn_20_resolutionoptINT51264–2048
cn_20_threshold_aoptFLOAT1000–255
cn_20_threshold_boptFLOAT2000–255
cn_20_control_modeoptCOMBOBalanced3 options: Balanced, My prompt is more important, ControlNet is more important
cn_20_resize_modeoptCOMBOCrop and Resize3 options: Just Resize, Crop and Resize, Resize and Fill

Outputs (21)

NameTypeDescription
cn_stackCN_STACK
cn_1_previewIMAGE
cn_2_previewIMAGE
cn_3_previewIMAGE
cn_4_previewIMAGE
cn_5_previewIMAGE
cn_6_previewIMAGE
cn_7_previewIMAGE
cn_8_previewIMAGE
cn_9_previewIMAGE
cn_10_previewIMAGE
cn_11_previewIMAGE
cn_12_previewIMAGE
cn_13_previewIMAGE
cn_14_previewIMAGE
cn_15_previewIMAGE
cn_16_previewIMAGE
cn_17_previewIMAGE
cn_18_previewIMAGE
cn_19_previewIMAGE
cn_20_previewIMAGE