LoadTrainingDataset was the only torch.load call in the codebase without
weights_only=True; comfy/utils.py and comfy/sd1_clip.py already pass it.
Recent PyTorch defaults to weights_only=True, so this is defense-in-depth
for installs pinned to older PyTorch. Verified a typical shard (latents +
standard conditioning) round-trips cleanly under weights_only=True.
Create Video gets a bit_depth option (8-bit/10-bit); the selected depth is carried by the video and applied when it gets encoded. Save Video and Video Slice now keep the source bit depth instead of always quantizing to 8-bit, so 10-bit videos stay 10-bit. 10-bit uses h264 with the yuv420p10le pixel format,so there's no new codec or container.
Signed-off-by: bigcat88 <bigcat88@icloud.com>
Apply the same naming convention the image nodes adopted, per
@alexisrolland's review on PR #13588:
- Load Video (from Folder), Load Video-Text (from Folder): category
"video", add search_aliases + description.
- Sample Video Frame (was "Video Frame Sample"): category "video".
- Crop Video (Temporal) / Crop Video (Temporal Random): category
"video/transform", verb-first names, search_aliases + description.
- Shuffle Videos List (was "Shuffle Video Dataset"): category
"video/batch".
- Shuffle Pairs of Video-Text: category "dataset/video".
All video schemas now carry search_aliases and description to match the
image-node conventions.
Resolved review threads on PR #13588. Two comments were outdated and
intentionally skipped:
- CodeRabbit container-leak on load_video_frames(): the function was
replaced by _decode_selected_frames() using `with av.open(...)`.
- "category=cls.category" on ShuffleVideoDataset: the node is no longer
an ImageProcessingNode subclass, so category is set directly.
Brings the master-side refactor of the dataset nodes into the video
branch. Conflicts were all in comfy_extras/nodes_dataset.py and resolved
to keep both sides' intent:
- ImageProcessingNode base class: kept master's _ensure_image_list group
normalization AND the branch's per-frame video loop (per_frame_process)
for individual _process nodes, so spatial transforms still auto-apply
per video frame while group nodes use the new list handling.
- AdjustBrightness / AdjustContrast: kept master's category
("image/adjustments") and descriptions plus the branch's
per_frame_process = False (pure tensor math runs on the whole batch).
- save_images_to_folder: took master's signature with the new
overwrite/increment support; kept the branch's video loader nodes that
were inserted just above it.
nodes_train.py auto-merged: branch's generic repeat(num_images,
*[1]*(ndim-1)) (needed for 5D video latents) is preserved while master's
category renames (model/training, model/loaders) are applied.
- Replace eager load_video_frames() with _decode_selected_frames() that
opens the container with `with av.open(...)` (no resource leak) and
decodes only the requested frame indices.
- Video loader nodes now emit lazy VideoFromFile references; sampling and
temporal-crop nodes operate lazily / decode only selected frames.