Nodes/ComfyUI-SplatKit/Write Back Repaired Frame
ComfyUI Node

Write Back Repaired Frame

Write repaired frames back into the dataset without breaking COLMAP

By mickmumpitz·Created about a month ago·Updated about 10 hours ago· 18
Write Back Repaired Frame
  • repaired
  • written_path
  • report
frame_name
job
write_modebackup_and_replace
out_subdirrepaired_frames

A splat dataset is a COLMAP folder, and a COLMAP folder is fussy about its images/ directory. If you've ever tried to hand-edit splat training data you know the trap: replace a frame with one of a different size and you've silently invalidated the camera intrinsics for that view, and your next training run quietly learns a warped scene. Write Back Repaired Frame is the terminal node of SplatKit's frame-repair workflow, and its whole reason to exist is to do that write-back safely - under the original filename, resized to the original's exact dimensions, so the camera stays valid.

It pairs with Prepare Repair Batch, which feeds damaged cube faces from the dataset one at a time into a Qwen-Image-Edit repair graph (with a pose-matched pristine reference), then through SeedVR2 back to native size. The repaired image lands here, gets written to disk, and the frame is marked done so Prepare advances to the next one. Drive the whole loop with ComfyUI's batch count and it walks the dataset frame by frame.

How it works

Three required inputs: repaired (the repaired frame - the tooltip says SeedVR2 output), frame_name, and job, both wired from Prepare Repair Batch. The job string carries the dataset paths; frame_name identifies which frame this repair belongs to. Two details make it robust:

  • An empty frame_name means the queue is drained - the node writes nothing and reports "queue drained," which is how the loop knows to stop instead of erroring past the end.
  • The image is resized to the original's exact dimensions before writing, because the COLMAP camera was calibrated at that size. Size drift is exactly what would otherwise corrupt the dataset.

write_mode chooses what "write back" means:

  • backup_and_replace (default) - copies the original into images_repair_backup/ once, then overwrites images/<name>. The dataset stays train-ready and the originals are always recoverable.
  • folder_only - writes to <dataset>/<out_subdir>/ and leaves the dataset untouched. Give each backend its own subfolder (repaired_qwen, repaired_seedvr2, repaired_supir) and you can A/B repair approaches without them overwriting each other.

Outputs are written_path and a report string with the mode, done-count, and remaining count. The node marks itself always-changed so it executes every time, and it pushes progress to the browser so the pack's JS can auto-queue the next frame.

Install

Same pack install - it's one of the nineteen nodes in ComfyUI-SplatKit:

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 ComfyUI and it appears under SplatKit. The repair workflow itself needs the Qwen-Image-Edit checkpoint, the Gaussian-Splash LoRA, and SeedVR2 - those are yours to supply, and they're the heavy part of the graph, not the node.

Common issues

  • "job is missing dataset paths" - frame_name is wired but job isn't. Both must come from Prepare Repair Batch.
  • Nothing happens on some runs - that's the drained queue speaking. Empty frame_name is the stop signal, not a bug.
  • You can't find the originals - they're in images_repair_backup/ (default mode), which is the point: the write-back is destructive-looking but reversible.
  • Different-size frames still sneaking in - the node resizes to the original's dimensions, so if something still looks off, check the repair backend is actually producing a full frame and not a cropped patch; folder_only mode is the safe way to compare backends before you let any of them touch the live dataset.

Mid-run crash? Re-queue and it continues from where it left off - the selection state lives in <dataset>/_frame_repair/manifest.json and done.json, not in memory.

CategorySplatKit

Inputs (5)

NameTypeDefaultDescription
repairedIMAGEThe repaired frame (SeedVR2 output).
frame_nameSTRINGWire Prepare Repair Batch -> frame_name. Empty = queue drained, this node does nothing.
jobSTRINGWire Prepare Repair Batch -> job (carries the dataset paths).
write_modeoptCOMBObackup_and_replacebackup_and_replace: overwrite images/<name>, keeping the original in images_repair_backup/. folder_only: write to <dataset>/<out_subdir>/ and leave the dataset alone.
out_subdiroptSTRINGrepaired_framesfolder_only mode: subfolder under the dataset to write into. Give each backend its own (repaired_qwen / repaired_seedvr2 / repaired_supir) to A/B them without overwriting each other.

Outputs (2)

NameTypeDescription
written_pathSTRING
reportSTRING