Fooocus ImagePrompt
Reference images and FaceSwap, built as a condition
- image
- image_prompt
This is the node behind Fooocus's Image Prompt and FaceSwap tabs, and it does one job: turn a reference image into a condition the model can be steered by. A photo for style transfer. A face for a swap. A character sheet for consistency. Whatever the intent, it all comes out of this node as an IMAGE_PROMPT - and then you have to actually apply it, which is the part people keep forgetting. The Fooocus ApplyImagePrompt node is what fuses this into the model.
The two modes
ip_type switches the whole behaviour:
- ImagePrompt - the reference-image mode. The model uses the image's content to steer style or composition during sampling. Weight it low (0.6 is the default) for a vibe, higher for a hard reference.
- FaceSwap - the sharp edge. Feeds the reference face so the output adopts the facial identity. This is the mode that needs InsightFace under the hood, the one real outside dependency in the whole pack, and it's the reason FaceSwap is the finicky mode: insightface has its own licence baggage and setup quirks, and it's the first thing that breaks on a fresh install.
The knobs
- image - the reference image. Required.
- ip_type - ImagePrompt or FaceSwap.
- ip_weight - 0.0–2.0, default 0.6. How hard the reference pushes. For FaceSwap you'll usually go higher than the default.
- ip_stop - default 0.5. When the condition stops applying, as a fraction of sampling. Same idea as ControlNet start/stop: let it steer composition early, then back off so detail stays the model's own.
- skip_cn_preprocess - default off. Leave it off unless you're feeding a pre-prepared condition.
Output: image_prompt (type IMAGE_PROMPT) - one of up to four you can wire into an ApplyImagePrompt node.
Installing
Pack install, standard: ComfyUI Manager → "Fooocus Nodes", or clone the repo. No model download for ImagePrompt mode itself. FaceSwap mode is the exception - it needs insightface, which means pip install insightface (or whatever your manager resolves) and the model weights it expects, and this is the step where a lot of Windows users stall. If FaceSwap errors out, it's almost always insightface missing or a version mismatch, not this node.
The workflow shape
The canonical chain: Loader → ImagePrompt (build condition) → ApplyImagePrompt (fuse it in) → PreKSampler → KSampler. Skip the ApplyImagePrompt step and your reference silently does nothing - the most common bug in this pack by a mile. And if you're after consistency across a whole set of images rather than a single generation, this node is the right tool, but it rewards small ip_weight values; cranking it up gives you a photo of the reference, not a variation of it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| ip_type | COMBO | ImagePrompt | 2 options: ImagePrompt, FaceSwap |
| ip_stop | FLOAT | 0.500–1 | — |
| ip_weight | FLOAT | 0.600–2 | — |
| skip_cn_preprocess | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_prompt | IMAGE_PROMPT | — |