IF Stage II
A ComfyUI node in Zuellni/IF with 7 inputs and 1 output.
- model
- positive
- negative
- images
- IMAGES
If IF Stage I hands you a 64×64 thumbnail and you squint at it wondering what went wrong, this is the node that fixes the joke: IF Stage II upscales it 4× to 256×256 - and it does it with the same prompt embeddings, so the detail it invents matches what you asked for. It's img2img at its most literal: a diffusion pass that takes your image as the starting noise and re-renders it at higher resolution.
What it is
IF Stage II takes four things: the S2_MODEL from IF Load Stage II, the POSITIVE/NEGATIVE embeddings from IF Encode, and the images from Stage I (or anywhere else). It runs a full diffusion pass - steps and cfg included - and returns a 4×-bigger IMAGES tensor.
Notice what's not there: no width, height, or batch_size. Output size is derived from your input - the node computes height / 8 * 8 * 4, i.e. exactly 4× each side, snapped to multiples of 8. Feed it 64×64 and get 256×256; feed it 128×128 and get 512×512. You don't get to choose, which keeps the pipeline honest.
The inputs that matter
images- your Stage I output. This is the input that decides everything downstream, since output resolution derives from it.steps(20) andcfg(8.0) - same philosophy as Stage I: 20 steps is a floor, 7–8 CFG is the DeepFloyd sweet spot. Stage II can tolerate slightly higher CFG without burning, but don't push it.seed- standard. Change it and the upscale detail changes.
The one input people wire wrong is positive/negative: these are the embeds from IF Encode, not strings. If you try to drag a text field in, the socket won't take it. If you have a batch of images, the node repeats the embeddings to match batch size automatically - so feeding Stage I's whole batch through at once works fine.
How it works
Under the hood it calls the diffusers pipeline in image-to-image mode: your input image becomes the starting point, the model denoises toward a 4× upscale guided by the same T5 embeddings that produced the original. That's the key to DeepFloyd's coherent detail - Stage II doesn't re-imagine the composition, it re-renders your thumbnail faithfully larger. It's a genuinely different approach from the "hi-res fix" pattern of upscaling latents and re-sampling, which is why IF images have that particular clean look.
Workflow reality
Stage II is the second of three full diffusion passes (Stage I → II → III), so it's slow and it eats VRAM. The whole cascade takes minutes per image on mid-range hardware. If your GPU is marginal, this is where OOMs show up first - the medium model and offloading (empty device on the loader) are your safety valves.
Install and the usual IF caveats
Part of Zuellni/ComfyUI-Custom-Nodes - Manager (search "Zuellni") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Zuellni/ComfyUI-Custom-Nodes
Gated model: accept DeepFloyd's terms on HuggingFace and huggingface-cli login. Requirements: diffusers, accelerate, transformers, sentencepiece, bitsandbytes. And the pack is archived - it works, it's how people ran DeepFloyd in ComfyUI, but you're on your own if diffusers drifts under it.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | S2_MODEL | — | |
| positive | POSITIVE | — | |
| negative | NEGATIVE | — | |
| images | IMAGE | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGES | IMAGE | — |