KSampler (RAVE)
Sample a whole video in one pass — by shuffling the frame grid every step
- model
- positive
- negative
- latent_image
- LATENT
KSampler (RAVE) is the node that makes ComfyUI-RAVE worth installing. It's the sampler you drop in place of the plain KSampler in a noise-inversion vid2vid workflow, and it lets a stock SD 1.5 (or SDXL) checkpoint edit video with no video model at all. No motion modules, no temporal transformers, no video checkpoint to download. Just a deceptively simple trick: pack your frames into a grid, denoise the whole grid as one image, and shuffle the arrangement every step so the model never learns where a given frame lives.
That trick is the RAVE method from the paper, ported to ComfyUI by spacepxl (spacetug on Reddit). It's a niche, mostly-untouched pack from early 2024 - and its best use case is still text-guided editing of an existing video on a card that can't touch AnimateDiff or Wan.
How it works
You feed it a batch of latents, one per video frame (usually VAE-encoded from frames loaded with VideoHelperSuite). Then for each of steps denoising steps:
- Frames are arranged into a
grid_size×grid_sizegrid. - Placement is randomly shuffled, seeded by
noise_seed- incremented every step. - One denoising step runs on the whole grid as a single image.
- The result is un-gridded back into frames, and it repeats.
Because frame positions change every step, the model can't latch onto "this frame is always in the corner" - the whole clip is denoised as a coherent unit, and temporal consistency comes free from the spatial prior. Longer videos split into multiple grids, sampled side by side; the node prints something like RAVE sampling with 24 frames (3 grids) to the console.
Inputs that matter
Most behave like a normal KSampler; here are the ones a beginner actually touches:
- latent_image - a batch of frame latents, ideally straight from an Unsampler fed with your VAE-encoded source video.
- grid_size (2–8, default 3) - cells per side. 3×3 handles 9 frames and is the sweet spot at 512px; drop to 2×2 for speed.
- noise_seed - drives both the initial noise and the per-step shuffle.
- add_noise (default False) - RAVE assumes your latents already contain the source video's noise, so it's off by default; only switch it on if you're starting from clean latents.
- pad_grid - adds a 1px latent border between cells; keep it consistent with the decompose side.
- steps, cfg, sampler_name, scheduler, positive, negative, start_at_step, end_at_step - behave like the stock KSampler's.
ControlNet and masks are handled for you: if your conditioning carries a ControlNet, the node grids the control hint images (and masks) too, so a depth or pose pass lines up frame-by-frame. Latent noise masks and condition masks work as well - that's how you edit only part of each frame, and it's what the pack's last commit fixed.
Output
A single LATENT, same batch size as the input. VAE decode it and feed the frames to a VHS_VideoCombine to get video back.
Installing it
The pack has no requirements.txt and no model files - RAVE is a method, not a model, and the code only uses torch/torchvision/numpy that ComfyUI already ships. Install via ComfyUI Manager (search "ComfyUI-RAVE") or:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-RAVE
then restart ComfyUI. You'll also want BlenderNeko's Unsampler (ComfyUI_Noise) - the README calls it required for noise inversion - and VideoHelperSuite (VHS) to load and save video. The repo ships a ready-to-run workflow/RAVE_basic_workflow.json (the cupcake-train example from the paper) with source videos included, so drag it in and drop in your own clip.
Common issues
- Static frame / leftover noise. The classic. Your Unsampler and this sampler must mirror each other - total steps,
start_at_step/end_at_step, sampler and scheduler all need to match. The author's own advice: "check that the settings match between unsampler and ksampler." - It's slow. You're sampling at
grid_size× your frame resolution - a 3×3 grid of 512px frames is 1536×1536 per step. Start with a short clip and a 2×2 grid to sanity-check. - SDXL works but looks worse. SD 1.5 is the intended model; the author's guess is SDXL's multi-resolution training reduces the tiling effect the grid method relies on.
- Grids at high resolution tile. Nine 512px frames make a 1536×1536 image, past SD's native res, so expect repeated patterns. Keep frames small.
- New-ComfyUI drift. Last commit is January 2024 and it imports internals like
latent_preview; an import error on startup means it's drifted from your ComfyUI - look for a maintained fork.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| grid_size | INT | 32–8 | — |
| pad_grid | BOOLEAN | false | — |
| noise_seed | INT | 00–18446744073709550000 | — |
| add_noise | BOOLEAN | false | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 7.00–100 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |