Load PFG node
An image as your entire prompt
- positive
- negative
- image
- CONDITIONING
- CONDITIONING
The Load PFG node is the ComfyUI port of Prompt Free Generation (PFG), a 2023 idea from laksjdjf - the same person behind Perp-Neg and Attention Couple, both of which got way more famous than this one. It lets you generate images guided by a reference image alone, with little or no prompt text. Drop in a picture of a red-haired knight in fog, and the sampler steers toward that mood and subject without you typing "red-haired knight in fog." Think of it as the image side of a character-consistency trick: the reference becomes part of the conditioning instead of just a vibe for img2img.
Worth knowing before you get excited: this is a deep-cut experiment, not a mainstream tool. The community signal is nearly nonexistent - the phrase "prompt free generation" shows up exactly once in years of reddit threads, and it's from March 2023. It's a fun toy on SD 1.5 and an interesting footnote from the guy who wrote Perp-Neg. Set your expectations accordingly.
How it works
The mechanism is genuinely neat and it all happens inside this one node. Internally the pack bundles a wd14 ViT tagger (auto-downloaded, more on that below) that turns your reference image into a 768-dim feature vector - the output of the last pooling layer, not the tag logits. A pretrained linear head from the .pt model you select maps that vector up to num_tokens × text_dim, which for the n10 models means ten tokens' worth of embedding. The node then concatenates those image-derived tokens onto the end of your positive conditioning, and pads the negative side with zero vectors of the same shape. The sampler ends up seeing your normal text embedding plus an image-derived block, so the picture literally becomes part of the prompt.
Two things follow. It only works on CLIP-family text encoders - SD 1.5 or SDXL - because there's no CLIP hidden state to splice into on a Flux or any of the LLM-encoded models. And while you can run it with an empty prompt, most people keep their text prompt and use PFG as an extra layer of image-grounded guidance.
The inputs that matter
- positive and negative (CONDITIONING) - from your CLIP Text Encode node. These get the image tokens appended, so wire your prompt in here.
- image (IMAGE) - your reference. Anything the Load Image node outputs.
- pfg_scale - strength of the image guidance, 0 to 2 with a default of 1. 0 means no effect, so if you see zero change, that's your dial to check.
- model_name - a dropdown listing the
.ptfiles you've put in the pack'smodelsfolder. Empty dropdown means you skipped the download.
Outputs are two CONDITIONING sockets, one for positive and one for negative. The README's whole usage section is: connect them from the Prompt to the Sampler. That's it - nothing else wires anywhere.
How to install it
Via ComfyUI Manager, search for "pfg-ComfyUI" and install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/pfg-ComfyUI
Then grab a model from huggingface.co/furusu/PFG and drop it into pfg-ComfyUI/models/:
pfg-wd14-n10.pt- SD 1.5 (768-dim text encoder). This is the one you want.pfg-wd15beta2-n10.pt- the 1024-dim SDXL text encoder.pfg-novel-n10.pt- the NovelAI-era weights.
The first time the node loads, it also auto-downloads the wd-v1-4-vit-tagger-v2.ckpt checkpoint into the pack folder - that's around a gigabyte, so don't panic at the hang. There's no requirements.txt in this pack; it relies on opencv (cv2), huggingface_hub, and the usual torch/numpy stack already sitting in your ComfyUI environment.
Where people get burned
- Empty model dropdown - the list only shows what's actually in
pfg-ComfyUI/models, and the pack ships aput_models_here.txtplaceholder. No.pt, no choices. - Wrong dimension model - the node reads the text-embedding dimension off your conditioning at runtime, so a mismatch surfaces as a shape error, not a crash-free silent failure. Use the wd14 file on SD 1.5.
- The tagger is hardcoded to wd14 - unlike the original webui extension, the ComfyUI port doesn't let you pick a tagger. If you select a wd15beta2 model, its features were trained against a different tagger than the one this node always runs.
- Dead on modern models - no CLIP encoder, no PFG. This is strictly an SD 1.5/SDXL thing.
One tip carried over from the original webui: it behaves better with a higher CFG scale than usual, so push CFG up before you blame pfg_scale. It's a niche node - but for poking around with image-grounded generation on SD 1.5, it's a genuinely interesting two-minute experiment.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| pfg_scale | FLOAT | 1.000–2 | — |
| image | IMAGE | — | |
| model_name | COMBO | 0 options: |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |
| CONDITIONING | CONDITIONING | — |