Nodes/ComfyUI-SplatKit/Prepare Dataset Upscale (swap originals first)
ComfyUI Node

Prepare Dataset Upscale (swap originals first)

Swap your originals aside before the loop, not after

By mickmumpitz·Created about a month ago·Updated about 20 hours ago· 17
Prepare Dataset Upscale (swap originals first)
    • load_dir
    • canonical_dir
    • frame_count
    dataset_namemy_scene
    dataset_path
    lowres_suffix_lowres

    Save Upscaled Dataset does its originals-preserving rename (imagesimages_lowres) at the end, once it holds the whole batch. That's fine for a single full-batch save, but it's impossible in a frame-by-frame VHS Meta Batch loop: the loader resolves its file paths once on the first iteration and then opens them lazily - rename the folder underneath it mid-loop and every later frame vanishes. Prepare Dataset Upscale exists to do the swap up front, before the loop ever starts, so the loop gets a stable pair of folders it can't break.

    The mechanism is dead simple and idempotent: give it the dataset_name (the SphereSfM output_name), and it moves images/images_lowres/ once, atomically, then recreates a fresh empty images/ for the saver to fill. On a re-run images_lowres already exists, so nothing is renamed - the originals are read from there again and images is simply refilled. If a run crashes halfway, images is left partially written but your originals are untouched; just run it again. The lowres_suffix (default _lowres) must match the suffix the other upscale nodes use.

    Outputs: load_dir (the pristine originals in images_lowres - wire this into your image loader), canonical_dir (the images/ folder COLMAP expects - wire into the streaming saver's out_dir and its source_names_dir to load_dir), and frame_count. That wiring pair is the whole pattern:

    Prepare Dataset Upscale → load_dir → (loader) → upscaler → Save Upscaled Frames (Streaming)
                          └→ canonical_dir ──────────────────────────────┘
    

    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; no model downloads here. The honest footguns: it needs a dataset that already has an images/ folder (a panorama_only SphereSfM dataset uses panoramas/ instead and this node won't help - that's the Resolve Dataset Images path), and the suffix must match everywhere or the saver writes a second folder that COLMAP never sees. And note the shortcut: LoadDatasetImagesOrdered has its own prepare_in_place toggle that does this exact swap before its first read, so you don't need this node for an in-place COLMAP upscale. Reach for Prepare Dataset Upscale when your loop is frame-by-frame and you want the swap done before anything starts.

    CategorySplatKit

    Inputs (3)

    NameTypeDefaultDescription
    dataset_nameSTRINGmy_sceneName of the dataset folder this pack created under ComfyUI/output (e.g. the SphereSfM output_name).
    dataset_pathoptSTRINGOptional explicit path to the dataset root OR directly to an images folder. Overrides dataset_name when set.
    lowres_suffixoptSTRING_lowresOriginals are moved to <images><suffix>. Must match the suffix used by the other upscale nodes.

    Outputs (3)

    NameTypeDescription
    load_dirSTRING
    canonical_dirSTRING
    frame_countINT