Shima Panel ControlNet Agent
Preprocess, size-match, and queue up multiple ControlNets on one bus
- image
- shima.commonparams
- modelcitizen.bndl
- shima.controlbus
- panelinputs.bndl
- shima.controlbus
- processed_image
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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| control_type | COMBO | canny | 6 options: canny, depth, pose, lineart, scribble, color |
| strength | FLOAT | 1.000–10 | — |
| fit_method | COMBO | crop to fit | 4 options: crop to fit, pad to fit, stretch, skip |
| bypass_preprocessing | BOOLEAN | false | Check this box if your image is already properly formatted for your chosen controlnet. |
| shima.commonparamsopt | DICT | Provides the target latent resolution for auto-sizing. | |
| modelcitizen.bndlopt | BNDL | Fallback bundle to parse commonparams if direct commonparams are unavailable. | |
| shima.controlbusopt | LIST | Daisy-chain previous ControlAgents here. | |
| use_commonparamsopt | BOOLEAN | true | If True, use target resolutions from Shima.Commons or ModelCitizen. |
| allow_external_linkingopt | BOOLEAN | false | Allow connections outside the Island |
| panelinputs.bndlopt | BNDL | Overrides panel settings using an external PanelBNDLer node |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| shima.controlbus | LIST | — |
| processed_image | IMAGE | — |