Nodes/Difforum/Difforum · Live Sampler
ComfyUI Node

Difforum · Live Sampler

Realtime Difforum: queue once and watch it play inside the node. Pair with a 1-4 step model (SD-Turbo, SDXL-Turbo, LCM, DMD2) at ~512 px. `live_source` turns it into a magic mirror (webcam "0" or a video path); `stream_dir` / `spout_name` feed OBS, Resolume or TouchDesigner. Only the last `keep_frames` frames are returned, so long sessions do not fill RAM.

By chillithebillis·Created 3 months ago·Updated about 7 hours ago· 8
Difforum · Live Sampler
  • model
  • positive
  • negative
  • vae
  • init_image
  • direction
  • options
  • params
  • camera
  • strength
  • prompts
  • depth
  • frames
  • report
◄run_frames480►
◄steps2►
◄cfg1.2►
◄sampler_namelcm►
◄schedulersgm_uniform►
◄cadence1►
◄target_fps0.0►
◄energy0.50►
◄loop_cameratrue►
◄live_source►
◄source_blend0.90►
◄stream_dir►
◄spout_name►
◄keep_frames240►
◄live_previewtrue►
CategoryDifforum/4 · Render

Inputs (27)

NameTypeDefaultDescription
modelMODELThe image model (SD1.5 / SDXL / Flux / turbo). MODEL output of your checkpoint or LoRA chain.
positiveCONDITIONINGPositive conditioning (CLIP Text Encode).
negativeCONDITIONINGNegative conditioning (CLIP Text Encode).
vaeVAEThe VAE that matches the model.
init_imageIMAGEThe first frame. Everything grows from this image.
run_framesINT4801–10000000How many frames to run (the loop wraps the camera).
stepsINT21–50Steps per frame. Turbo models: 1-4.
cfgFLOAT1.20–15Prompt strength. Turbo / LCM / DMD2 models want 1-2; regular SDXL 4-7.
sampler_nameCOMBOlcmSampler. euler / dpmpp_2m for regular models, euler_ancestral or lcm for turbo.
schedulerCOMBOsgm_uniformNoise schedule. karras / normal for regular models, sgm_uniform for turbo.
cadenceINT11–12Diffuse every Nth frame for speed.
target_fpsFLOAT0.00–60Cap the speed. 0 = as fast as possible.
directionoptDIFFORUM_DIRECTIONThe Director's wire: camera, energy curve, scene prompts, keys and look in one cable.
optionsoptDIFFORUM_OPTIONSDifforum · Render Options: manual colour, detail, symmetry, depth and chunk settings. Without it the Director's look decides.
paramsoptDIFFORUM_PARAMSFrom Setup: frame count, fps, width and height. Plug the same Setup everywhere.
cameraoptDIFFORUM_CAMERAA camera track from Camera (keys), Camera (expressions) or Camera Import. Overrides the Director's camera.
strengthoptDIFFORUM_SCHEDULEA schedule for denoise per frame; replaces the Director's energy curve.
promptsoptDIFFORUM_PROMPTPrompt travel from Prompt Travel (or the Director with CLIP connected).
depthoptIMAGEA 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.
energyoptFLOAT0.500–1Denoise per frame when no Director is connected.
loop_cameraoptBOOLEANtrueRepeat the camera when the run is longer than the clip.
live_sourceoptSTRING'' = off, '0' = webcam, or a video path: mixed in before each frame.
source_blendoptFLOAT0.900–1How much of the live source enters each frame.
stream_diroptSTRINGFolder to write live PNG frames to (for another app).
spout_nameoptSTRINGSpout sender name (Windows) for Resolume / TouchDesigner / OBS.
keep_framesoptINT2401–100000Frames kept in memory for the output (ring buffer).
live_previewoptBOOLEANtrueShow the frames inside the node while running.

Outputs (2)

NameTypeDescription
framesIMAGE—
reportSTRING—