Nodes/ComfyUI-SplatKit/Dataset Upscale Plan (batch sizes, no cycle)
ComfyUI Node

Dataset Upscale Plan (batch sizes, no cycle)

The batch-number node that breaks the dependency cycle

By mickmumpitz·Created about a month ago·Updated about 19 hours ago· 17
Dataset Upscale Plan (batch sizes, no cycle)
    • frames_per_view
    • suggested_batch_size
    • num_views
    • total_frames
    • plan
    • select_every_nth
    • drop_partial_stride
    dataset_namemy_scene
    dataset_path
    lowres_suffix_lowres
    camera_index-1
    select_every_nth1
    drop_partial_stridefalse
    max_batch_size0

    This node exists to solve a ComfyUI wiring problem, and it's a good example of a pack author thinking about their own UX. The obvious way to size an upscale loop - wire the loader's suggested_batch_size into the Meta Batch Manager, and back into the loader - is a dependency cycle, and ComfyUI refuses it with "Dependency cycle detected." Dataset Upscale Plan sidesteps that by reading the dataset marker straight off disk, so it depends on nothing in the loop. Its outputs are numbers you wire forward: frames_per_view into the Batch Manager's frames_per_batch, suggested_batch_size into SeedVR2's batch_size. No cycle, because nothing in the loop feeds back.

    The rule it encodes is worth understanding because it's what makes SeedVR2 behave on camera-major datasets. Give the meta-batch a whole view (fewest requeues), and let SeedVR2 chunk that view internally with a batch size that is 4n+1 AND divides the view length - so no internal chunk straddles a view boundary and the temporal context stays intact. max_batch_size is your VRAM ceiling: set it once to the biggest batch your card handles (the tooltip suggests 9 for a 7B fp16 model at resolution 1024), and the node always returns a legal batch at or below it. Without a cap, an 81-frame view yields 81.

    Inputs and outputs

    Inputs mirror the loader so the numbers describe what it will actually emit: dataset_name, optional dataset_path (wire Prepare Dataset Upscale → load_dir here to be certain both nodes describe the same folder), lowres_suffix, camera_index, select_every_nth, drop_partial_stride - all with the "must match the loader" tooltip, because mismatches silently produce wrong batch shapes - and max_batch_size.

    Outputs: frames_per_view, suggested_batch_size, num_views, total_frames, plus a human-readable plan STRING and echoes of select_every_nth / drop_partial_stride - the stride can be set in one place here and driven into the loader, since Plan → loader is acyclic.

    Install & gotchas

    cd ComfyUI/custom_nodes
    git clone https://github.com/mickmumpitz/ComfyUI-SplatKit
    python_embeded\python.exe -m pip install -r ComfyUI-SplatKit/requirements.txt
    

    Restart, done - no model downloads. The footgun the tooltip warns about: drop_partial_stride can collapse suggested_batch_size to 1 (81 frames at N=5 leaves one leftover; keep it and you get 17 per view, a clean 4n+1 batch - omit it and 16's only 4n+1 divisor is 1). Change it, check the printed batch size, and keep tools/stride_dataset.py --drop-partial in sync, or your temporal context silently disappears.

    CategorySplatKit

    Inputs (7)

    NameTypeDefaultDescription
    dataset_nameSTRINGmy_sceneSame dataset the loader reads.
    dataset_pathoptSTRINGOptional explicit path; overrides dataset_name. Wire Prepare Dataset Upscale -> load_dir here to be certain both nodes describe the same folder.
    lowres_suffixoptSTRING_lowres
    camera_indexoptINT-1-1–4096Must match the loader's camera_index.
    select_every_nthoptINT11–1000Must match the loader's select_every_nth.
    drop_partial_strideoptBOOLEANfalseMust match the loader's drop_partial_stride.
    max_batch_sizeoptINT00–16384VRAM ceiling for SeedVR2's batch_size. 0 = no cap (take the largest legal value). Set it once to the biggest batch your card handles -- 9 for a 7B fp16 model at resolution 1024 -- and the node always returns a legal batch at or below it.

    Outputs (7)

    NameTypeDescription
    frames_per_viewINT
    suggested_batch_sizeINT
    num_viewsINT
    total_framesINT
    planSTRING
    select_every_nthINT
    drop_partial_strideBOOLEAN