Difforum · Live Sampler
Queue Once and Watch It Play Inside the Node
- model
- positive
- negative
- vae
- init_image
- direction
- options
- params
- camera
- strength
- prompts
- depth
- frames
- report
The Feedback Sampler runs to completion and hands you a clip. The Live Sampler does the same loop in real time and shows you the frames while it runs - which changes what the tool is for. It's not a rendering node. It's a performance instrument.
The setup
Pair it with a 1–4 step model - SD-Turbo, SDXL-Turbo, LCM, DMD2 - at around 512 px. The defaults are already that: steps 2, cfg 1.2, sampler_name lcm, scheduler sgm_uniform. Distilled models collapse a 20-step trajectory into two, which is the only reason a per-frame feedback loop can keep up with reality; if you point this at a regular SDXL checkpoint at 20 steps you'll get a slideshow, not a live render.
Required inputs are the usual four (model, positive, negative, vae) plus init_image. run_frames (480) is how many frames to run, and loop_camera (on) repeats the camera when the run is longer than the clip - that's what makes a short move into an endless one for VJ use.
The inputs that make it a live tool
live_source-''off,'0'for webcam, or a video path. It's mixed in before each frame, so the model is re-imagining the live feed continuously. Point it at a webcam and you have a magic mirror; point it at a looping video and you have a per-frame restyle engine.source_blend(0.9) - how much of the live source enters each frame. This is the feedback-vs-live dial. High means the source dominates; lower means the model's own history accumulates and the image drifts away from the input, which is where the interesting artifacts live.stream_dirandspout_name- where the frames go.stream_dirwrites live PNGs to a folder, which any other app can pick up.spout_nameis a Spout sender for Resolume, TouchDesigner or OBS - Windows only, and it needspip install SpoutGL; the node prints a "Spout output disabled" line and carries on if the import fails, which is the right behaviour and also the reason people sometimes think Spout is broken when it's just not installed.target_fps- caps the speed. 0 means as fast as the hardware goes, which on a 4090 with a turbo model is faster than your eyes and warmer than your room.keep_frames(240) andlive_preview- a ring buffer, so a long session doesn't fill RAM with 10,000 frames you'll never look at.framesreturns only the tail.
Outputs
frames (the kept portion - wire it to Save or Video Combine after you stop) and report, which is worth reading once: it tells you the achieved frame rate.
Install
ComfyUI Manager → search "Difforum", or:
cd ComfyUI/custom_nodes && git clone https://github.com/chillithebillis/Difforum.git difforum
Restart. Base install is numpy only; webcam and video-file input need OpenCV (pip install opencv-python) and Spout output needs SpoutGL on Windows. Both are imported lazily, so a machine without them still loads the pack fine - only the features that need them go quiet.
Where people get burned
The model, first and always. A 4-step LCM model at 512 px is the difference between an instrument and a coffee break. Second: run_frames of 480 at 24 fps is 20 seconds, and the node will happily run until it finishes or you interrupt - there's no "keep going until I say stop", so for a long session you re-queue with a large run_frames rather than expecting it to stay open.
And the occasional reminder: a live source mixed at high blend with a strong camera move produces feedback that eats itself into mush within a few seconds. That's the loop, not a bug. Pull source_blend up or dial the energy down when it happens.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The image model (SD1.5 / SDXL / Flux / turbo). MODEL output of your checkpoint or LoRA chain. | |
| positive | CONDITIONING | Positive conditioning (CLIP Text Encode). | |
| negative | CONDITIONING | Negative conditioning (CLIP Text Encode). | |
| vae | VAE | The VAE that matches the model. | |
| init_image | IMAGE | The first frame. Everything grows from this image. | |
| run_frames | INT | 4801–10000000 | How many frames to run (the loop wraps the camera). |
| steps | INT | 21–50 | Steps per frame. Turbo models: 1-4. |
| cfg | FLOAT | 1.20–15 | Prompt strength. Turbo / LCM / DMD2 models want 1-2; regular SDXL 4-7. |
| sampler_name | COMBO | lcm | Sampler. euler / dpmpp_2m for regular models, euler_ancestral or lcm for turbo. |
| scheduler | COMBO | sgm_uniform | Noise schedule. karras / normal for regular models, sgm_uniform for turbo. |
| cadence | INT | 11–12 | Diffuse every Nth frame for speed. |
| target_fps | FLOAT | 0.00–60 | Cap the speed. 0 = as fast as possible. |
| directionopt | DIFFORUM_DIRECTION | The Director's wire: camera, energy curve, scene prompts, keys and look in one cable. | |
| optionsopt | DIFFORUM_OPTIONS | Difforum · Render Options: manual colour, detail, symmetry, depth and chunk settings. Without it the Director's look decides. | |
| paramsopt | DIFFORUM_PARAMS | From Setup: frame count, fps, width and height. Plug the same Setup everywhere. | |
| cameraopt | DIFFORUM_CAMERA | A camera track from Camera (keys), Camera (expressions) or Camera Import. Overrides the Director's camera. | |
| strengthopt | DIFFORUM_SCHEDULE | A schedule for denoise per frame; replaces the Director's energy curve. | |
| promptsopt | DIFFORUM_PROMPT | Prompt travel from Prompt Travel (or the Director with CLIP connected). | |
| depthopt | IMAGE | A depth map (white = near), e.g. Depth Anything V2 on the first frame. Needed for real 3D parallax; without it 3D moves fall back to pseudo-3D. | |
| energyopt | FLOAT | 0.500–1 | Denoise per frame when no Director is connected. |
| loop_cameraopt | BOOLEAN | true | Repeat the camera when the run is longer than the clip. |
| live_sourceopt | STRING | '' = off, '0' = webcam, or a video path: mixed in before each frame. | |
| source_blendopt | FLOAT | 0.900–1 | How much of the live source enters each frame. |
| stream_diropt | STRING | Folder to write live PNG frames to (for another app). | |
| spout_nameopt | STRING | Spout sender name (Windows) for Resolume / TouchDesigner / OBS. | |
| keep_framesopt | INT | 2401–100000 | Frames kept in memory for the output (ring buffer). |
| live_previewopt | BOOLEAN | true | Show the frames inside the node while running. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | — |
| report | STRING | — |