Nodes/Shima/Shima Panel ControlNet Agent
ComfyUI Node

Shima Panel ControlNet Agent

Preprocess, size-match, and queue up multiple ControlNets on one bus

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Panel ControlNet Agent
  • image
  • shima.commonparams
  • modelcitizen.bndl
  • shima.controlbus
  • panelinputs.bndl
  • shima.controlbus
  • processed_image
control_typecanny
strength1.00
fit_methodcrop to fit
bypass_preprocessingfalse
use_commonparamstrue
allow_external_linkingfalse

Shima Panel ControlNet Agent is how Shima does ControlNet, and it bundles the three fiddliest parts of the workflow into one node: preprocessing the hint image, matching its size to your latent, and queueing it with your conditioning. The panelized variant lives in Shima/Panels and hands its results to the Panel Master Prompt, which is where the actual ControlNet application happens.

The pitch is "stop hand-wiring ControlNet." In vanilla ComfyUI, applying ControlNet means: pick a preprocessor, run it, size-match the result, load the ControlNet model, wire it into a Conditioning (Set Area/Apply), set strength and start/end percent. This node collapses the first two steps and formalizes the handoff. You give it a reference image, pick a control_type (canny, depth, pose, lineart, scribble, color), set a strength, and it produces a processed image plus a shima.controlbus instruction bundle that the Master Prompt reads to apply the control.

The killer feature is the control bus daisy-chain. Wire one agent's shima.controlbus output into the next agent's shima.controlbus input and you stack multiple controls - pose for composition, canny for edges - that all get applied in one pass at the Master Prompt. The bus is a list, so it accumulates agents rather than overwriting them.

How it works

Two jobs, in order. First, it resolves the target dimensions - it reads the latent size from shima.commonparams (or falls back to the Model Citizen bundle) and resizes the hint image to match, with a fit_method of crop-to-fit, pad-to-fit, stretch, or skip (skip is for when you've already prepared a perfectly-sized control map - the node reference calls it the "Skip" fit method, and it's the one you want when you've run a heavy preprocessor yourself). Then it preprocesses the image for the chosen control_type using built-in processors - depth and lineart come from the pack's Nikosis-compatible layer with auto model download, and if you have bypass_preprocessing checked it trusts your image as-is.

The strength semantics follow the usual ControlNet guidance: lower strength (0.3–0.7) for loose guidance, higher for strict adherence - and remember the start_percent/end_percent wisdom from the wider ecosystem: releasing the condition partway through denoising often gives better results than holding it the whole sample.

The inputs and outputs that matter

Required: image, control_type, strength, fit_method, bypass_preprocessing. Optional: shima.commonparams, modelcitizen.bndl (fallback for dimensions), shima.controlbus (the daisy-chain input), use_commonparams, allow_external_linking, and panelinputs.bndl (external override from a Panel BNDLer). Outputs: shima.controlbus (LIST) and processed_image (IMAGE) - the sized, preprocessed control map you can preview to verify the preprocessor did its job.

How to install it

In the Shima pack - ComfyUI Manager, search "Shima", or:

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima

restart. Depth/lineart processors download small models from HuggingFace on first use, and huggingface_hub needs to be present (it usually is in modern ComfyUI installs). cv2 is used when available for the classic preprocessors.

Common issues & troubleshooting

Control has no visible effect. First check strength - below ~0.4 it's whisper-quiet. Then check fit_method: stretch on an image with a wildly different aspect ratio can smear the control map and make the result worse than no control. crop to fit is the safer default.

Preprocessor downloads are slow or fail. Depth/lineart models come from HuggingFace on first run. If it hangs, check your network, or preprocess the hint yourself and flip bypass_preprocessing on - with skip fit and bypass checked, the node becomes pure sizing + bus.

CategoryShima/Panels

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
control_typeCOMBOcanny6 options: canny, depth, pose, lineart, scribble, color
strengthFLOAT1.000–10
fit_methodCOMBOcrop to fit4 options: crop to fit, pad to fit, stretch, skip
bypass_preprocessingBOOLEANfalseCheck this box if your image is already properly formatted for your chosen controlnet.
shima.commonparamsoptDICTProvides the target latent resolution for auto-sizing.
modelcitizen.bndloptBNDLFallback bundle to parse commonparams if direct commonparams are unavailable.
shima.controlbusoptLISTDaisy-chain previous ControlAgents here.
use_commonparamsoptBOOLEANtrueIf True, use target resolutions from Shima.Commons or ModelCitizen.
allow_external_linkingoptBOOLEANfalseAllow connections outside the Island
panelinputs.bndloptBNDLOverrides panel settings using an external PanelBNDLer node

Outputs (2)

NameTypeDescription
shima.controlbusLIST
processed_imageIMAGE