Prompt Studio Structure Input
One Node That Prepares Your Pose, Depth, Edge or Sketch Guide
- source
- edit_mask
- guide
- strength
- inpaint_image
- inpaint_mask
This is the front half of the ControlNet story. Apply Qwen Structure applies the patch; Structure Input decides what the guide actually is - which photo, which condition, what framing, how strong, and whether the background outside your edit is allowed to move.
What it is
PS_StructureInput prepares one optional structure guide, independently of the image model. It takes width and height (the generation canvas, normally wired from Prompt Slot's width/height outputs) and returns four things:
guide- a prepared IMAGE at the requested dimensions. This one does not apply conditioning by itself; it's a map, and something downstream has to consume it.strength- a FLOAT from 0 to 1. Zero means disabled.inpaint_imageandinpaint_mask- the source image and a reviewed mask, only populated in the pose-preservation case.
Wire guide and strength into Apply Qwen Structure (or your model family's own application node), and send inpaint_image/inpaint_mask into Apply Qwen Structure's optional pair with the same mask also feeding PS_EditMask. One Structure Input per workflow.
How it works
The Studio fills this node's reference_json widget with the guide's configuration - the selected image, guide type, strength, framing, targeting and any edited pose joints. Then it branches, and the branches are worth knowing before you debug:
- No
reference_json→ returns(None, 0.0, None, None). No guide, nothing loaded, no error. - Strength 0 → the same no-op. This is why "my ControlNet does nothing" is so often not a ControlNet problem.
- Photo input → it runs a real extractor: DWPose for pose, Depth Anything V2 Small for depth, lineart for sketch, ComfyUI's built-in Canny for edges. Edges need no extra download; the rest come from Fannovel16's ControlNet Auxiliary Preprocessors pack.
- Prepared input → no extraction, just fit and framing. Hand it a map you made elsewhere and it will resize and place it, nothing more.
- Pose edits → if the guide is a pose and you edited the joints, it uses the edited pose image instead of the photo, and marks the targeting as already applied.
The filter at the bottom is the interesting one. If source is connected, the guide is a pose, and preservation is on, it produces the inpaint pair: the original source plus a mask that has to match the source dimensions exactly (Inpainting mask must match the source dimensions). You can either hand it a plain MASK on the optional edit_mask input, or let it pull the Studio's reviewed mask record - in which case it validates that the record belongs to this source image and refuses otherwise. Turn preservation off and both inpaint outputs go empty, because there's nothing to preserve.
The inputs worth understanding
width/height- the guide's dimensions; these must match the generation latents and the Studio's framing, and they're where "the pose is in the wrong place" bugs live.source- the original image being edited. Only meaningful for pose + preservation.preserve_background- on by default. Turning it off allows scene changes; it doesn't remove the background. That's what a Background Removal workflow is for.edit_mask- the manual path for canvas users. White regenerates, black preserves.
Why you'd reach for it
Qwen-Image-Edit absorbed most of what OpenPose-plus-ControlNet used to do, and consumes control maps natively rather than through a checkpoint. What it didn't absorb is the case where several things must land in specified places - and masks are still the only way to guarantee that pixels outside a change stay put.
Install
Part of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio
Restart ComfyUI. For depth, sketch and pose extraction, Settings → Setup wizard → Run setup installs the extractor weights and, through ComfyUI Manager, the ControlNet Auxiliary Preprocessors node pack - which needs its own restart. The Qwen union patch is under the Qwen Research License and requires acceptance; the pack adds no pip requirements.
Common issues
- "Install pose extraction in Settings > Setup, then restart ComfyUI." The weights or preprocessor nodes are missing; setup installs them per guide type.
- Guide comes back None and strength is 0. No
reference_jsonwas set, or strength is literally zero. In Studio that means the guide card is empty or disabled; on the canvas it means you didn't populate the widget. - "Inpainting mask must match the source dimensions." Your
edit_maskmask is at a different resolution than the source. Re-estimate or repaint it at source resolution. - "Preserve background needs an enabled edit mask…" You turned preservation on but there's no Studio mask record for this source. Either review and apply a background mask in the Studio, or turn preservation off and accept that the scene may change.
- Guide applies but it's misaligned. Usually
fitversuscrop, or width/height not matching the guide card. A prepared map gets placed, not reinterpreted, so crop it first if its framing differs.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–8192 | Prepared guide width in pixels. Usually connect Prompt Slot's width output so the guide matches the generation canvas. |
| height | INT | 102464–8192 | Prepared guide height in pixels. Usually connect Prompt Slot's height output. Framing, crop and target placement are taken from the Studio guide settings. |
| reference_jsonopt | STRING | Filled by Studio with the selected image, guide type, strength, framing, targeting and edited pose data. Normally leave empty. Empty or zero strength disables the guide. For manual canvas use, supply a saved Studio guide entry. | |
| sourceopt | IMAGE | — | |
| preserve_backgroundopt | BOOLEAN | true | Pose edits require a reviewed mask when enabled. Off allows scene changes; it does not remove the background. |
| edit_maskopt | MASK | Manual canvas mask: white regenerates, black preserves. Otherwise uses Studio's reviewed mask. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| guide | IMAGE | Prepared guide IMAGE at the requested dimensions, including Studio's framing and targeting. None when no guide is active. This output does not apply conditioning by itself. |
| strength | FLOAT | Studio guide strength from 0 to 1. Zero means disabled; wire to a compatible application node that passes the model through when inactive. |
| inpaint_image | IMAGE | Source image for native pose inpainting, or None when disabled. |
| inpaint_mask | MASK | Reviewed mask for Apply Qwen Structure and Edit Mask. White regenerates; black preserves. |