Attn2 Prompt Injection (simple)
One block, one prompt, one dropdown
- model
- conditioning
- MODEL
If "Attn2 Prompt Injection" is the kitchen-sink version of this pack, "Attn2 Prompt Injection (simple)" is the one you actually reach for when you're trying to understand something. One dropdown, one conditioning, done. It's the same attention surgery as the big node, but it patches exactly one UNet block at a time - which makes it perfect for the classic "what does this layer actually do?" experiment.
How it works
Identical mechanism to the parent node: it clones your model and installs an attn2 (cross-attention) patch via set_model_attn2_patch. While sampling, if the current block matches the one you picked, the node swaps in the embeddings from your injection conditioning, scaled by weight, gated by the start_at/end_at window. Same guts, smaller interface.
The block dropdown lists the eleven SDXL text-attention blocks:
input:4 input:5 input:7 input:8 middle:0
output:0 output:1 output:2 output:3 output:4 output:5
That's the same list the big node exposes, minus the all/per-block wiring - here you just pick one.
Inputs and outputs
model(required) - from your checkpoint loader.block- which UNet block to patch.conditioning- the prompt (via CLIP Text Encode) to inject into that block.weight(default 1.0, range -2 to 5) - injection strength; go negative to push against whatever that block wants to draw.start_at/end_at(default 0→1) - fraction of the denoise where the patch is active.
Output: a patched MODEL for your KSampler, same as the parent node.
Why you'd pick this over the others
Because it's the fastest way to isolate one variable. Wire it to output:0 with "white cat", render, then switch to middle:0 with the same injection and render again. Each run changes exactly one thing, and you learn which blocks actually hold composition versus subject appearance for your checkpoint. That's a genuinely fun afternoon, and it's the intended use - the pack's whole pitch is that this content/style split is worth poking at.
It's also the node to keep in a finished workflow when you only want one targeted override. If you're only ever swapping a single block, the simple node reads better than the multi-port one and can't accidentally patch a block you forgot about.
Installing
Same pack as everything else. ComfyUI Manager → search "Prompt Injection", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DataCTE/prompt_injection
then restart ComfyUI. No dependencies beyond torch and ComfyUI core, no model files to download.
Gotchas
- No conditioning connected = silent no-op. The node passes the model straight through, and you get the normal image with no error telling you why.
- It patches only the selected block. Everything else uses the base prompt from the sampler - that's the point, but it means per-block effects are often subtle. That's the mechanism doing its job, not a bug. Start at
weight1.0 and nudge up before you conclude it's broken. - SDXL-only. Same silent-no-op story on Flux and other DiT architectures where those block names don't exist.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| blockopt | COMBO | 11 options: input:4, input:5, input:7, input:8, middle:0, output:0, +5 | |
| conditioningopt | CONDITIONING | — | |
| weightopt | FLOAT | 1.00-2–5 | — |
| start_atopt | FLOAT | 0.0000–1 | — |
| end_atopt | FLOAT | 1.0000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |