REF] Model Sampling Pred
Tells the model 'your output is the clean image' — the reference sampling convention
- model
- MODEL
RefModelSamplingPred is the quietest node in ComfyUI-RefUNet and the one that answers a question beginners never think to ask: when the reference UNet runs its one-step write pass, what does that single model evaluation even mean? In a normal sampling loop the model predicts noise and the scheduler gradually denoises. But the reference pass isn't denoising anything - it's doing one forward pass and grabbing features. For that to make sense, the model needs to be told: your output is the clean image.
That's exactly what this node does. It's a MODEL → MODEL patch that swaps the model's model_sampling for a custom one (X0Ref) where the model's output is treated directly as the denoised prediction - the "x0" - instead of as the noise to be subtracted. In the pack's example workflow you'll see it applied to the write model's chain (reference UNet → ConfigureRefNet → RefModelSamplingPred), and its sibling sampling setup (ModelSamplingDiscrete) applied to the read model. It's part of making the whole reference technique behave like the original reference-UNet papers expected.
No inputs beyond model, no outputs beyond the patched MODEL, nothing to tune. If you follow a working FYE workflow, this node is just part of the skeleton - you wire it, you forget about it. It's also the easiest node to misidentify as a bug when it's missing: if your reference pass produces garbage or the write seems to capture nothing coherent, a missing sampling patch is a plausible culprit, because the model is now trying to interpret a one-step reference evaluation under the wrong sampling semantics.
Install is the pack-wide step: ComfyUI Manager → search "ComfyUI-RefUNet", or git clone https://github.com/logtd/ComfyUI-RefUNet into custom_nodes/, restart. No Python requirements per the README. The models come from Kijai's FollowYourEmoji safetensors repo (FYE_unet and FYE_referencenet into models/unet/, the motion module into models/animatediff_models/).
One honest caveat: because this patches comfy.model_sampling internals, it's part of why the pack is tied to the ComfyUI version it was built against (mid-2024). If a ComfyUI update changes how model_sampling is constructed or patched, this node is in the blast radius. It's a set-and-forget node, but "forget" works best when you're not also updating ComfyUI weekly. Get a working setup, then treat both this pack and ComfyUI itself as a bundle you don't churn.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |