ComfyUI
Custom nodes for running FastGen teacher and distilled-student image and video generation inside ComfyUI.
Setup
-
Install ComfyUI following the official instructions.
-
Set
FASTGEN_REPOand symlink:Note:
FASTGEN_REPOmust be set every time you start ComfyUI (add it to your shell profile or launch script). -
Install FastGen’s dependencies with ComfyUI’s Python (3.10–3.12; this installs PyTorch 2.10), unless ComfyUI runs in a FastGen environment such as the Docker container:
-
Start ComfyUI:
Security Note:
--listen 127.0.0.1binds to localhost only.--listen 0.0.0.0exposes ComfyUI on all network interfaces — only use it when you have proper firewall rules and authentication in place.
Nodes
Use ComfyUI’s string, Load Image, and Load Video nodes as raw inputs.
FastGen Preprocess is the only node that produces FASTGEN_CONDITIONING,
and either sampler consumes that finalized object directly. For vision-language
prompt expansion, connect the same image to both FastGen Prompt Expand and
FastGen Preprocess; the expanded string feeds the preprocess prompt input.
Config Overrides
The Config Loader, Teacher Sample, and Student Sample nodes accept a config_overrides string input of
dotted key=value lines. The Config Loader applies them permanently with Hydra, like the command line of train.py
(see Command-Line Arguments). The sampling nodes apply them
for one run only, setting each value as a Python literal, so a quoted dict replaces the whole dict. For example,
on a sampling node:
Example Workflows
Saved workflows are in the workflows/ subdirectory. Load them via ComfyUI’s Load button or drag-and-drop the JSON file onto the canvas.