ComfyUI Node

LASED Animate

LASED Animate turns the swarm into frames

By MushroomFleet·Created 3 months ago·Updated 3 months ago· 0
LASED Animate
  • image
  • frames
seed_x0
seed_y0
frames60
tolerance40.0
ants250
steps600
color_spacergb
handboth
beta4.0
epsilon0.05
seed0
modemasking
mask_threshold0.15
sticky_threshold0.20
freeze_after0
no_decayfalse
max_side512

An edge map tells you where the contour ended up. LASED Animate shows you how it got there - the swarm spawning, wandering, latching onto the boundary, and the contour emerging over the run, captured as an IMAGE frame batch you can feed to a video-combine or preview-animation node.

Under the hood it's the same swarm simulation as Swarm Edge, but with a hook that captures an overlay frame at regular intervals while the run plays out. Every steps / frames ticks it grabs a frame, and it always appends the final state, so you get roughly frames evenly-spaced snapshots plus the finished contour. You can see the ants converge on the boundary in a few seconds instead of reading a gray field and hoping.

The inputs that matter

  • image, seed_x, seed_y - same as the rest of the family: the source image and the click point in input-image pixels. Note the node uses only the first image of a batch, so feed it a single image and keep batches for elsewhere.
  • frames - how many overlay frames to capture across the run, default 60, range 2–600. More frames = smoother video, not a longer simulation - the simulation cost is set by steps, not frames. There's no point cranking frames if your steps count is low; you'll just get near-duplicate frames.
  • Everything else is the standard LASED swarm set: tolerance, color_space, ants, steps, hand, beta, epsilon, seed, mode, max_side.

The output is a single frames IMAGE batch. The natural sink is anything that turns a batch into a video - a video-combine node, or SaveAnimatedWEBP/GIF, which is exactly what workflows/lased_animate.json does.

The honest use case

Yes, it's a demo toy - a glowing contour assembling itself is a satisfying thing to watch and a nice workflow to share. But the genuinely useful reading is diagnostic. One animated run tells you in a glance what a dozen static edge maps won't: whether the swarm is converging on your region's boundary or wandering around it. If the ants spend most of the run circling a neighboring blob and only settle on yours at the end, you'll see it immediately - and then you know tolerance is too high (or your seed point is too close to a border). Static output would just show you a messy field and make you guess.

A couple of things worth knowing: the contour's completeness tracks steps - short runs freeze mid-convergence, so don't animate a 200-tick run and expect a finished boundary. And since everything is seeded, the same parameters animate identically every time, which makes it a genuinely reproducible way to compare tolerance settings side by side.

Install

Nothing special - the pack installs as one unit. ComfyUI Manager search for ComfyUI-LASED-mask, or git clone https://github.com/MushroomFleet/ComfyUI-LASED-mask into custom_nodes and restart. No model downloads; the core is numpy-only with optional scipy. If the animation is your first stop, open workflows/lased_animate.json, point the loader at any image, set the seed coordinates inside a color region, and queue.

CategoryLASED

Inputs (18)

NameTypeDefaultDescription
imageIMAGE
seed_xINT00–16384
seed_yINT00–16384
framesINT602–600Number of overlay frames captured across the run.
toleranceFLOAT40.01–250Colour tolerance (tau). Lower = tighter region. Lab distances run smaller; try 10-25 there.
antsINT2501–5000
stepsINT6001–20000Simulation ticks. More steps = cleaner, more complete contours.
color_spaceCOMBOrgb3 options: rgb, weighted, lab
handCOMBObothWall-following handedness; 'both' splits the swarm into clockwise and counter-clockwise cohorts.
betaFLOAT4.00.1–12Softmax temperature. Higher = greedier edge following.
epsilonFLOAT0.050–0.5Random-move floor; prevents the swarm freezing.
seedINT00–18446744073709550000
modeCOMBOmaskingclassic: MASK = thresholded edge pheromone. masking (Stage 2): MASK = sticky-latched, gap-closed, despeckled contour.
mask_thresholdFLOAT0.150.01–0.95classic mode only: threshold on the normalised edge map for the MASK output.
sticky_thresholdFLOAT0.200.05–0.6masking mode: latch a cell when its edge pheromone crosses this fraction of the field maximum.
freeze_afterINT00–20000masking mode: freeze (and clean) the mask after this many ticks. 0 = run all steps, then freeze.
no_decayBOOLEANfalsemasking mode: stop edge-pheromone evaporation entirely.
max_sideINT5120–4096Downsample the longest side to this for simulation (0 = full resolution). Outputs are resampled back.

Outputs (1)

NameTypeDescription
framesIMAGE