Prompt Chain Ideogram Sampler (auto-retry)
Catch the grey refusal frame before you do
- noise
- guider
- sampler
- sigmas
- latent_image
- vae
- IMAGE
Ideogram 4 has a safety filter trained directly into its weights, and when it decides a prompt is unsafe it doesn't just refuse - it generates a specific flat grey image and hands that back as if it were your result. Even prompting correctly through the JSON caption format doesn't get the false-block rate to zero - community reports after the model's June 2026 release range from "basically fine once you use the documented format" to at least one user complaining of hitting the grey frame repeatedly per usable image. This sampler exists to catch that automatically, instead of you noticing three images into a batch that one of them came back grey.
How it works
It's a drop-in replacement for ComfyUI's own advanced sampler chain - same five core inputs as SamplerCustomAdvanced (noise, guider, sampler, sigmas, latent_image), plus a vae, because it needs to decode the result inside the node to inspect it before deciding whether to hand it back to you. After sampling, it decodes and measures the pixel standard deviation of the output. A real image has a lot of pixel-value variance; Ideogram's blocked frame is close to flat grey and has almost none. If the decoded result's std falls below the threshold, the node treats it as blocked, re-samples, and repeats - up to a cap - before finally handing you whatever it landed on.
The inputs and outputs that matter
The six required plumbing inputs (noise, guider, sampler, sigmas, latent_image, vae) match ComfyUI's advanced-sampling primitives exactly - if you're not already building your graph with a RandomNoise/CFGGuider/KSamplerSelect/BasicScheduler-style chain rather than a plain KSampler, you'll need to switch to that shape to use this node at all.
The two fields actually worth tuning: max_retries (default 4, 0–16) is how many free re-rolls you're willing to spend chasing a clean frame - it only costs the extra compute when a retry is actually needed, so there's little downside to leaving it generous. block_std (default 0.08, 0–1) is the pixel-variance threshold a decoded frame has to fall below to get flagged as blocked. Lower it if genuinely dark, flat, or minimal-contrast images (a night scene, a solid-color background you actually wanted) are getting falsely re-rolled as if they were refusals; raise it if a partially-washed-out or low-contrast blocked frame is slipping through as "fine" when it shouldn't.
Single IMAGE output - already decoded, so this node also saves you a separate VAEDecode step in your graph.
How to install it
Manager: search ComfyUI-PromptChain. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/mobcat40/ComfyUI-PromptChain.git
Same as Ideogram Caption, this is only useful with Ideogram 4 actually in your graph, and it expects the advanced-sampler node shape described above rather than a plain KSampler.
Common issues & troubleshooting
Still occasionally getting a grey result even with retries enabled. Raise max_retries - the default of 4 is a reasonable balance of compute versus reliability, not a hard ceiling, and if your prompt sits close to the filter's boundary you may need more rolls than that to clear it. Pairing this with PromptChain_IdeogramCaption in caption mode addresses the more common cause of triggering the filter in the first place - prose prompting rather than the documented JSON format - so the two nodes are meant to work together, not either alone.
A legitimately dark or minimal image keeps getting rejected and re-rolled. That's block_std catching a false positive. Lower it a bit; the default 0.08 assumes a "normal" image's pixel variance, and content that's intentionally low-contrast can dip under that by design rather than because it was blocked.
The node won't accept your model/positive/negative/seed setup. It doesn't take that shape at all - it wants noise/guider/sampler/sigmas from ComfyUI's advanced sampling nodes, not a plain KSampler's inputs. Build (or copy) that chain first.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | — | |
| guider | GUIDER | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| latent_image | LATENT | — | |
| vae | VAE | — | |
| max_retries | INT | 40–16 | Extra re-rolls if the model returns its gray 'Image blocked by safety filter' frame. |
| block_std | FLOAT | 0.0800–1 | Pixel-std threshold below which a decoded image is treated as a blocked/refusal frame (0-1 scale). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |