Slit Scan
Slit-scan time smearing for your image sequences
- images
- masks
- images
Slit-scan is the old analog technique - a camera exposing a single slit of light while the subject or film moves - and it produces those stretched, time-smeared images where one axis is space and the other is time. Slit Scan brings that to ComfyUI in a flexible form: it takes a sequence of images plus masks, and for every output pixel decides which frame of the sequence to pull from, based on the mask's brightness. The result is a dreamy, glitchy, motion-smeared version of your footage where different parts of the frame are frozen at different moments.
It's a time-manipulation node, not a spatial filter - which makes it a genuinely different tool from the pack's temporal blur. Temporal Blur averages nearby frames; this selects different frames per pixel. If you've got a video sequence and want the "time in a can" aesthetic, this is the effect.
How it works
The core idea: each mask value is mapped to a frame index. A mask value of 0.0 pulls from the first frame, 1.0 pulls from the last, and everything between picks (with blending) from the frames in between. Then three parameters shape that mapping:
time_depthscales the mask values - how much of the timeline each mask's range covers.t_offsetshifts the mapping globally in time.mask_time_factoradds a per-frame ramp: as the output frame index grows, the mask values drift, which is what creates the scanning motion across the sequence (it's added asframe_index / total_frames * mask_time_factor).
wrap_t decides what happens outside the 0–1 range - wrap around the timeline (looping, default) or clamp at the ends. And blend_power controls the transition between adjacent frames: 1.0 gives a smooth linear blend, higher values sharpen the transitions into a more "stepped" slit-scan look.
If mask dimensions don't match the images, they're resized with bicubic interpolation to fit. Output is a sequence of the same length as your input frames.
The inputs that matter
images- your frame sequence.masks- one mask per frame (or a single mask reused). Brighter mask = later frame in time.mask_time_factor- the scanning speed. 1.0 means the mask values sweep the full timeline across your frame range. This is the "how much smear" dial.t_offset- shift the whole effect in time.time_depth- compress or expand the range of time each mask covers.blend_power- transition sharpness between sampled frames.wrap_t- loop (on) or clamp (off).
One output: images.
Install
From the Quasimondo pack. ComfyUI Manager → search ComfyUI-QuasimondoNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Quasimondo/ComfyUI-QuasimondoNodes
cd ComfyUI-QuasimondoNodes
pip install -r requirements.txt
Pure torch - no models. (Note the pack's opencv-contrib-python dep isn't used by this node.)
Where people get burned
It processes each output frame by scanning the whole input range with per-frame torch operations (a loop over frames, with a nested scan over the frame count), so it's the least performant node in this pack. Long sequences at high resolution will churn - keep the frame count and res reasonable while you dial in the look, then render full.
Second, the effect is completely dependent on your masks. A flat, uniform mask gives a boring result (every pixel pulls the same frame); you want masks with variation across space - gradients, blobs, moving objects - so different regions of the frame sample different times. That's the whole aesthetic, so don't expect magic from a constant mask.
And remember the blend: blend_power at 1.0 interpolates between adjacent frames, which smooths the smear; crank it up if you want hard, glitchy frame jumps instead.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| masks | MASK | — | |
| mask_time_factor | FLOAT | 1.000–256 | — |
| t_offset | FLOAT | 0.00-100000–100000 | — |
| time_depth | FLOAT | 1.000–256 | — |
| blend_power | FLOAT | 1.01–32 | — |
| wrap_t | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |