Fooocus PreKSampler
The secret sauce, unpacked into a node
- pipe
- image_to_latent
- latent
- fooocus_inpaint
- fooocus_styles
- pipe
- model
- clip
- vae
- CONDITIONING+
- CONDITIONING-
People spent a year arguing about why Fooocus made the same SDXL models look better than A1111 or plain ComfyUI. This node is the answer, laid out as a property panel. The Fooocus PreKSampler is where the pack's "it just works" reputation actually happens - everything else is plumbing around it.
What it's doing
The Fooocus Loader gives you a pipe full of raw parts: model, clip, vae, conditioning. The PreKSampler takes that pipe and applies the tuned sampling setup Fooocus hid behind its UI, then hands the result to the pack's Fooocus KSampler for the actual denoising pass. The defaults you see here aren't random - they're the specific tricks from the Fooocus README: negative ADM guidance that restores CFG contrast at SDXL's top resolution level, a tuned sharpness term that kills plastic skin, adaptive CFG, and the dpmpp_2m_sde_gpu + karras pairing the project settled on.
What a beginner actually sets
Most of the panel is "leave it". The ones that matter:
- steps - 30 default. This is your quality/ speed dial.
- cfg - 4 default. Fooocus ran low CFG on purpose; SDXL responds well to 3–6.
- sampler_name - defaults to
dpmpp_2m_sde_gpu, which you should not feel obliged to change. - scheduler -
karrasdefault. Fine. - seed - the reproducibility knob.
- denoise - 1.0 for text-to-image. Drop it when you're doing img2img (feed image_to_latent) or paired with the Inpaint node.
Then the things people tweak once they're curious: sharpness (2, the skin-killer), adaptive_cfg (7), freeu_enabled (off - it's the U-Net free-U trick if you want sharper high-frequency detail at a cost). The adm_scaler_positive / adm_scaler_negative / adm_scaler_end cluster is advanced; the community's standard advice is to leave ADM scaling alone until you've got a specific complaint.
settings - Simple or Advanced. Simple hides the scaler cluster; pick Advanced when you want to see every knob.
What comes out
Besides a pipe, it also outputs model, clip, vae, and positive/negative CONDITIONING. That's the escape hatch: wire those into standard ComfyUI nodes if you want to step outside the pack's pipe flow mid-graph. The optional fooocus_inpaint and fooocus_styles inputs are how the Inpaint and Styles nodes plug in - this is the only node that consumes them.
Installing and notes
Part of the pack: ComfyUI Manager → "Fooocus Nodes", or clone the repo. The pack is SDXL-only, frozen in spirit - it reproduces Fooocus, and Fooocus never moved past SDXL. If you're on Flux or newer, this whole pipeline is the wrong tool; this node is for people who want that specific SDXL look. And remember: it prepares the conditions - without the Fooocus KSampler after it, nothing gets sampled.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | PIPE_LINE | — | |
| steps | INT | 301–10000 | — |
| cfg | FLOAT | 4.00–100 | — |
| sampler_name | COMBO | dpmpp_2m_sde_gpu | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 |
| scheduler | COMBO | karras | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 |
| seed | INT | 00–9223372036854776000 | — |
| denoise | FLOAT | 1.000–1 | — |
| settings | COMBO | Simple | 2 options: Simple, Advanced |
| sharpness | FLOAT | 2.000–100 | — |
| adaptive_cfg | FLOAT | 7.000–100 | — |
| adm_scaler_positive | FLOAT | 1.50–3 | — |
| adm_scaler_negative | FLOAT | 0.80–3 | — |
| adm_scaler_end | FLOAT | 0.30–1 | — |
| controlnet_softness | FLOAT | 0.250–1 | — |
| freeu_enabled | BOOLEAN | false | — |
| image_to_latentopt | IMAGE | — | |
| latentopt | LATENT | — | |
| fooocus_inpaintopt | FOOOCUS_INPAINT | — | |
| fooocus_stylesopt | FOOOCUS_STYLES | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| pipe | PIPE_LINE | — |
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |
| CONDITIONING+ | CONDITIONING | — |
| CONDITIONING- | CONDITIONING | — |