Commit Graph
328 Commits
Author SHA1 Message Date
Adrien Toupet e2faedaaa6 Release v2.5.14 - MPS device fix, VRAM swap detection, enforce physical VRAM limit 2025-12-01 00:30:49 -05:00
Adrien Toupet 5775ff0f99 Enforce VRAM limit to physical capacity - OOM instead of silent swap 2025-12-01 00:25:26 -05:00
Adrien Toupet ff937756a3 Add VRAM swap detection - show GPU+swap breakdown in peak stats, warn when swap detected 2025-11-30 23:47:20 -05:00
Adrien Toupet 5848cef05f fix(mps): normalize device strings to prevent unnecessary tensor movements
- Add _device_str() helper to normalize MPS variants (mps:0 → MPS)
- Fix device comparison: mps:0 and mps now correctly identified as same device
- Consistent MPS logging across all memory management functions
2025-11-30 21:03:26 -05:00
Adrien Toupet f5b902b8b0 Merge pull request #341 from AInVFX/main
v2.5.13: Fix triton import error, OOM on long video float32 conversion, macOS CLI watermark
v2.5.13
2025-11-30 09:04:04 -05:00
Adrien Toupet 19825fa9fa Release v2.5.13: Fix triton import, OOM on long videos, macOS watermark 2025-11-30 09:01:53 -05:00
Adrien Toupet 021fc7b70f Fix triton.ops import error by using local VAE types
Fixes #340 - Installation error with PyTorch 2.7+cu126 and triton_windows

Replace diffusers.models.autoencoders.vae imports with local implementations
of DecoderOutput and DiagonalGaussianDistribution to avoid triggering the
bitsandbytes -> triton.ops import chain that fails on newer triton versions.
2025-11-30 08:27:01 -05:00
Adrien Toupet b0ac880a4f Fix OOM crash on float32 conversion for long videos. Gracefully fallback to native dtype if insufficient memory. Fixes #299 2025-11-30 08:03:07 -05:00
Adrien Toupet 6930e0f13a Fix CLI MPS watermark error on macOS (fixes #336) 2025-11-30 07:37:51 -05:00
Adrien Toupet 112275d4e5 Merge pull request #333 from AInVFX/main
release: v2.5.12 - Regression fix
v2.5.12
2025-11-28 17:51:53 -05:00
Adrien Toupet 16508d353d release: v2.5.12 - fix color artifacts regression from in-place transform ops 2025-11-28 17:50:40 -05:00
Adrien Toupet 6f784b1324 Merge pull request #332 from AInVFX/main
v2.5.11: CUDNN attention, streaming VAE decode, LAB artifact fix, MPS/multi-GPU improvements
v2.5.11
2025-11-28 17:09:48 -05:00
Adrien Toupet f791631495 release: v2.5.11 - CUDNN attention, long video memory fix, LAB artifacts fix, MPS/multi-GPU improvements 2025-11-28 16:49:08 -05:00
Adrien Toupet b15982b442 perf: in-place tensor ops to reduce memory allocation overhead
- Use in-place clamp/mul/add in postprocess normalization
- Use in-place clamp and Normalize in video transform pipeline
- Consolidate optimized channel permute functions in performance.py
- Use native permute() instead of einops rearrange in VAE encode/decode
- In-place wavelet decomposition and reconstruction operations
- Remove unused temporal_latent_blending function
2025-11-28 16:40:27 -05:00
Adrien Toupet 849f6b5997 Add peak RAM tracking alongside VRAM in debug summary 2025-11-28 15:32:07 -05:00
Adrien Toupet e34bec76d5 Auto-detect bfloat16 support to fix CUBLAS_STATUS_NOT_SUPPORTED on older GPUs (#314) 2025-11-28 14:30:41 -05:00
Adrien Toupet 70c7f21eb5 docs: clarify multi-GPU frame-level parallelism behavior in README 2025-11-28 14:00:59 -05:00
Adrien Toupet daa13fb4ca Fix BlockSwap logging confusion and CLI worker validation
- BlockSwap: Show effective/total blocks (e.g., 32/32) instead of raw requested value
- CLI: Skip CUDA device validation when CUDA_VISIBLE_DEVICES already set (worker process)
2025-11-28 13:40:07 -05:00
Adrien Toupet 7581e0014f Fix CLI: MPS subprocess allocator error (#290) and multi-GPU distribution (#309)
- Mac: Use direct processing instead of spawning subprocess (MPS allocator fails in child process)
- Multi-GPU: Set CUDA_VISIBLE_DEVICES before spawn so child inherits it before module-level torch import
- Remove redundant env setup in worker (now inherited from parent)
2025-11-28 12:11:42 -05:00
Adrien Toupet be2efd474f fix: use canonical torch.backends.mps.is_available() for reliable MPS detection
Replaces torch.mps.is_available() with torch.backends.mps.is_available()
across all files. The torch.backends API is the official PyTorch method
for MPS detection (since PyTorch 1.12) and works reliably on:
- macOS with Apple Silicon (returns True when MPS available)
- macOS without MPS support (returns False)
- Windows/Linux (hasattr guard prevents AttributeError)
2025-11-28 11:49:43 -05:00
Adrien Toupet bce62382db Fix color correction reference misalignment with temporal overlap 2025-11-28 09:43:46 -05:00
Adrien Toupet f792ca5937 fix: eliminate LAB color correction tile artifacts by preprocessing with wavelet reconstruction
Fixes #324
Fixes https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/discussions/271#discussioncomment-14997355
2025-11-28 00:10:17 -05:00
Adrien Toupet 3ab2c84091 fix: stream VAE decode directly to pre-allocated final_video tensor
Eliminates memory spike for long videos by:
- Pre-allocating final_video in Phase 3 before any batch processing
- Writing VAE-decoded RGB directly to final_video (no batch_samples accumulation)
- For RGBA: allocating 4 channels upfront, writing RGB in Phase 3, alpha in Phase 4
- Processing batches in-place through color correction and normalization
- Moving temporal overlap blending to Phase 3 decode phase

Fixes #130 (DefaultCPUAllocator: not enough memory for long video)
2025-11-27 20:15:42 -05:00
Adrien Toupet 8dd0c3061a feat: Add CUDNN attention backend support with PyTorch 2.3+ API
- Use torch.nn.attention.sdpa_kernel() (new API) with CUDNN_ATTENTION backend
- Fallback to torch.backends.cuda.sdp_kernel() when not available
Thanks to @eadwu for the original PR #317
2025-11-27 15:19:55 -05:00
Adrien Toupet 79e7f41216 Revert "Fix: MPS allocator error in model.to() transfer (#305)"
This reverts commit 9424020687.
2025-11-27 14:52:12 -05:00
Adrien Toupet 9424020687 Fix: MPS allocator error in model.to() transfer (#305)
Add fallback to individual parameter movement when bulk model.to(mps)
fails with allocator errors. Complements safetensors loading fix.
2025-11-14 12:06:13 -05:00
Adrien Toupet 912ab4a5da Merge pull request #298 from AInVFX/main
v2.5.10: Fix determinism, BlockSwap caching, and model path resolution
v2.5.10
2025-11-13 12:04:00 -05:00
Adrien Toupet 65dd29a865 v2.5.10: Fix determinism, BlockSwap caching, and model path resolution
Core Fixes:
- Reset seed per batch to ensure deterministic generation across sessions and batch positions
- Fix temporal overlap logging when automatically reset to prevent incorrect frame counts
- Fix NoneType attribute error in VAE tiled encode/decode at maximum resolution (#296)

BlockSwap & Caching Architecture:
- Move BlockSwap state (_block_swap_config, _blockswap_bypass_protection) from runner to model
- Ensures state survives runner recreation during independent DiT/VAE caching scenarios
- Fix runner template caching to trigger when either DiT or VAE becomes cached (bidirectional)
- Resolves BlockSwap reload failures when only DiT was cached (#297)

Model Discovery:
- Implement case-insensitive YAML path resolution for extra_model_paths.yaml (#289-#295)
- Add debug logging for model discovery (searched paths, validation status, cache hits)
- Support any case variation (seedvr2, SEEDVR2, SeedVR2) in ComfyUI configuration
2025-11-13 12:02:37 -05:00
Adrien Toupet 9f78b30b3d Merge pull request #291 from AInVFX/main
Release v2.5.9: Bug fixes and enhancements
v2.5.9
2025-11-12 14:36:32 -05:00
Adrien Toupet 96b26bb7f7 Update FUNDING.yml 2025-11-12 14:33:43 -05:00
Adrien Toupet 513ab67214 Update FUNDING.yml 2025-11-12 14:33:37 -05:00
Adrien Toupet 19c761522e Update FUNDING.yml 2025-11-12 14:30:39 -05:00
Adrien Toupet 40d37b7248 Release v2.5.9: Bug fixes and enhancements
- Fix: OpenCV memory layout error in tile debug visualization (#283)
- Fix: macOS MPS allocator fallback for safetensors loading (#290)
- Fix: Windows log buffering with flush=True (#278)
- Fix: ComfyUI registry icon URL (raw.githubusercontent)
- Feature: Version display in node name and CLI/ComfyUI header
- Feature: GitHub Sponsors support link
- License: Migrate from MIT to Apache 2.0 to match Bytedance Seed official repo
2025-11-12 14:27:40 -05:00
Adrien Toupet 2a873e2f28 Merge pull request #277 from AInVFX/main
fix(cli): resolve duplicate files, improve output paths, add RGBA support (v2.5.8)
Fix https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/issues/274
v2.5.8
2025-11-10 14:41:59 -05:00
Adrien Toupet fc64968b12 fix(cli): improve output paths and add RGBA support (v2.5.8)
- Improve output folder naming: batch creates {folder}_upscaled/ sibling with original filenames, single file adds _upscaled suffix
- Add RGBA alpha channel detection and preservation (matches ComfyUI)
- Convert all output paths to absolute for clarity in logs
2025-11-10 14:39:33 -05:00
Adrien Toupet b130a33894 fix(cli): resolve Windows duplicate file bug and improve scan perf 2-3x (v2.5.8)
- Replace dual glob loops with single iterdir scan for cross-platform consistency
- Fixes duplicate file processing in batch mode on Windows case-insensitive filesystem
- Improves directory scanning performance 2-3x by reducing filesystem operations
- Add ComfyUI registry logo
2025-11-10 13:39:42 -05:00
Adrien Toupet 3a5916ef0e Merge pull request #276 from AInVFX/main
fix: enhance Conv3d workaround compatibility for PyTorch dev builds and AMD ROCm
Fixes https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/issues/178 and https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/issues/265
2025-11-10 13:06:07 -05:00
Adrien Toupet b64d526bd6 fix: enhance Conv3d workaround compatibility for PyTorch dev builds and AMD ROCm
- Add ROCm/HIP detection to prevent NVIDIA-specific cuDNN workaround on AMD systems
- Add defensive hasattr checks for torch.cuda and cudnn.is_available()
- Add try-except fallback in _conv_forward to handle cuDNN call failures gracefully
- Resolves 'GET was unable to find an engine' errors on PyTorch 2.9+ dev builds
- Resolves 'ATen not compiled with cuDNN support' errors on ROCm platforms
- Bump version to 2.5.7
2025-11-10 13:04:52 -05:00
Adrien Toupet c71138de85 Merge pull request #267 from AInVFX/main
Fix: Restore natural look for 7b model (v2.5.6)
Fixes https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/issues/249
2025-11-09 12:27:06 -05:00
Adrien Toupet a3f98124ca Fix: Restore natural look for 7b model (v2.5.6)
- Replace split-stack-mean with unflatten in unconcat_coalesce
- Corrects computation order to eliminate plastic/high-specular artifacts
- Maintains torch.compile compatibility (no .item() graph breaks)
- Applied to both dit_3b and dit_7b models
2025-11-09 12:26:18 -05:00
Adrien Toupet 668382d076 Merge pull request #260 from AInVFX/main
v2.5.5: Fix RAM leak for long videos via on-demand reconstruction - to address https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler/issues/256
2025-11-09 02:07:43 -05:00
Adrien Toupet b5c40fea9c v2.5.5: Fix RAM leak for long videos via on-demand reconstruction
- Replace all_transformed_videos storage with lightweight batch_metadata indices
- Reconstruct transformed videos on-demand in Phase 4 only when needed
- Add missing cleanup for input_images tensor in postprocess finally block
- Fix release_tensor_memory to handle CPU/CUDA/MPS consistently
- Extract helper functions for batch preparation and 4n+1 padding
- Remove duplicate interrupt_fn key from context initialization
2025-11-09 02:06:16 -05:00
Adrien Toupet 9cea011901 Merge pull request #255 from AInVFX/main
fix: AdaIN color correction and AMD ROCm compatibility (v2.5.4)
2025-11-08 10:12:28 -04:00
Adrien Toupet e86d54ab3b fix: AdaIN color correction and AMD ROCm compatibility (v2.5.4)
- Fix AdaIN non-contiguous tensor error by using reshape() instead of view()
- Add cuDNN availability checks to prevent ROCm 'ATen not compiled with cuDNN' error
2025-11-08 09:11:55 -05:00
Adrien Toupet 80d278ac97 Merge pull request #253 from AInVFX/main
fix: correct MPS device enumeration for Apple Silicon (v2.5.3)
2025-11-08 09:26:52 -04:00
Adrien Toupet 786fb3f688 fix: correct MPS device enumeration for Apple Silicon (v2.5.3) 2025-11-08 08:25:22 -05:00
Adrien Toupet ca37f48349 Merge pull request #248 from AInVFX/main
Fix: torch.mps AttributeError on Windows
2025-11-08 00:39:39 -04:00
Adrien Toupet c41e36458a Updated version number 2025-11-07 23:39:14 -05:00
Adrien Toupet 9715d3e37a Fix: torch.mps AttributeError on Windows
Add defensive checks for torch.mps.is_available() to handle PyTorch versions where the method doesn't exist on non-Mac platforms. Resolves AttributeError: module 'torch.mps' has no attribute 'is_available'
2025-11-07 23:37:35 -05:00
Adrien Toupet b4cd3ce333 Merge pull request #247 from AInVFX/main
pyproject.toml pipeline test
2025-11-07 21:29:58 -04:00