ComfyUI Extension: ComfyUI-ChunkedSampling
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Custom nodes for chunked batched image-to-image workflows and sequential temporal video cleanup.
Looking for a different extension?
Custom Nodes (0)
README
ComfyUI Chunked Batch Nodes
Custom nodes for chunked batched image-to-image workflows and sequential temporal video cleanup.
Included nodes:
- VAE Encode Batch Chunked
- SamplerCustomAdvanced Chunked
- VAE Decode Batch Chunked
- Flux Video Cleanup Temporal Advanced
Purpose
These nodes let you process large image/frame batches in smaller execution chunks while preserving the normal ComfyUI SamplerCustomAdvanced path as closely as possible.
Typical non-temporal workflow:
IMAGE batch -> VAE Encode Batch Chunked -> SamplerCustomAdvanced Chunked -> VAE Decode Batch Chunked
Typical temporal workflow:
IMAGE batch -> Flux Video Cleanup Temporal Advanced
Architecture
The package now splits the reusable runtime into shared helpers:
core_sampling.pyencode_image_batch_chunked(...)decode_latent_batch_chunked(...)sample_latent_batch_chunked(...)sample_single_latent_temporal(...)
nodes_batch_chunked.py- thin wrappers for the generic chunked batch nodes
nodes_temporal.py- the temporal recurrent video cleanup node
This keeps SamplerCustomAdvanced Chunked as a generic memory-safety node instead of overloading it with frame-to-frame recurrence.
Flux Video Cleanup Temporal Advanced
Supported temporal modes:
off- pure batch path; no recurrence
prev_output_blend- blends the current input frame with the previous cleaned output before VAE encode
external_warped_prev- blends the current input frame with an externally warped previous image batch
internal_flow_warp- computes optical flow internally and warps the previous cleaned output before blending
Important behavior
- In temporal modes, sampling runs one frame at a time so frame
tcan depend on framet-1. sample_chunk_sizeis only used whentemporal_mode=off.reset_every_nandscene_cut_thresholdbreak recurrence explicitly.lock_seed=Truesupports fixed or sequential per-frame seeds based on the incomingNOISE.seed.internal_flow_warpuses OpenCV Farneback flow ifcv2is available in the ComfyUI Python environment.
Notes
SamplerCustomAdvanced Chunkedstill reuses the normalguider.sample(...)path per chunk instead of reimplementing denoising logic.- When the input latent has no
batch_indexand chunking is required, the sampler node synthesizes a sequential internalbatch_indexso chunked random noise generation stays frame-stable across chunks. - Temporal sequential sampling preserves frame-indexed noise variation when
lock_seed=False, and intentionally pins batch index to0whenlock_seed=True. noise_maskbatch slicing supports the common ComfyUI broadcast cases (1mask for the whole batch, or shorter masks that repeat across the full batch).- The sampler node supports OOM fallback by halving the chunk size down to
min_chunk_size. - VAE encode trims extra image channels beyond RGB before calling
vae.encode(...), which preserves compatibility with RGBA-style image batches without changing normal RGB inputs.
Limitations
- The temporal node uses a pixel-space temporal prior before encode. It does not rewrite guider conditioning on a per-frame basis.
lock_seed=Trueassumes theNOISEinput exposes a mutableseedattribute, which matches ComfyUI's standard custom sampler noise objects.internal_flow_warpis a dependency-light built-in flow path, not a RAFT integration.- Nested latent edge cases are still handled conservatively and are not the primary tested path.
Installation
Copy this folder into your ComfyUI custom_nodes directory and restart ComfyUI.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.