Commit Graph
215 Commits
Author SHA1 Message Date
Meisoft a875f536da Merge pull request #98 from Meisoftcoltd/perf-concurrent-image-loading-13430517007901480050
⚡ [Performance] Concurrent image loading in Video Stitcher
2026-04-30 16:56:44 +02:00
Meisoftcoltd 12a55c7fd6 ⚡ [Performance] Concurrent image loading in Video Stitcher
Introduced concurrent image loading and processing in the Video Stitcher node
using ThreadPoolExecutor. This optimizes the transition from disk-cached PNGs
to the final video tensor by parallelizing I/O and color conversion.

- Replaced sequential loop with ThreadPoolExecutor.map
- Wrapped executor.map in list() to ensure exception propagation
- Verified ~85% speedup in mocked I/O-bound benchmarks
2026-04-30 14:55:12 +00:00
Meisoft 119626a20f Merge pull request #97 from Meisoftcoltd/add-tts-calculator-and-audio-stitcher-15540597175344943849
Support text-driven sequential looping and audio stitching
2026-04-28 19:29:57 +02:00
Meisoftcoltd b854a90bf9 feat: add AutoLoopCalculatorTTS and update IncrementalVideoStitcher for audio caching
- Registered `AutoLoopCalculatorTTS` in `NODE_DISPLAY_NAME_MAPPINGS`.
- Added `AutoLoopCalculatorTTS` class to `video.py` to allow looping through text paragraphs instead of video frames.
- Replaced the implementation of `IncrementalVideoStitcher` to cache audio tensors as `.pt` files and concatenate them along the time axis on the final cycle.
2026-04-28 17:26:50 +00:00
Meisoft e1181c468c Merge pull request #96 from Meisoftcoltd/ffmpeg-audio-standardizer-5748644544721797280
Fix VHS audio bug by physically cloning video with standardized limits
2026-04-25 21:12:26 +02:00
Meisoftcoltd e4f53ca75a feat(video): add conditional FFmpeg audio standardizer for VHS safety
- Introduced `standardize_video_file` helper in `video.py`.
- The helper creates a physical video clone via FFmpeg, copying the video stream exactly to retain quality while limiting the audio stream.
- Audio limits are conditionally applied using `torchaudio.info` (<=44100Hz and <=2 Channels) to avoid unnecessary processing.
- Implemented a "Fail-Fast" approach with `raise Exception` if the FFmpeg cloning process fails, preventing silent downstream crashes.
- Injected the helper directly into `VideoAnalyzerFaceDetector` and `VideoAnalyzerSceneDetector` to secure the path passed down to VHS.
2026-04-25 18:50:46 +00:00
Meisoft 16604f101c Merge pull request #95 from Meisoftcoltd/refactor/standardize-audio-extraction-7105937645850785286
Standardize audio to 44100Hz/Stereo and cleanup residual files
2026-04-25 15:57:42 +02:00
Meisoftcoltd de0797ddb9 Refactor audio extraction and clean up residual files
- Created `extract_and_standardize_audio` helper in `video.py` to standardize audio to 44100Hz and Stereo format.
- Refactored `VideoAnalyzerFaceDetector` and `VideoAnalyzerSceneDetector` to use the new helper function.
- Permanently deleted `modify_facedetector.py`, `modify_facedetector2.py`, and `modify_facedetector3.py` residual scripts.
2026-04-25 13:46:36 +00:00
Meisoft 771f4bf709 Merge pull request #94 from Meisoftcoltd/feat/scene-cuts-priority-1402347662369726826
Refactor scene cuts priority in loop calculators
2026-04-25 14:23:15 +02:00
Meisoftcoltd d660a6b41b Refactor loop calculators to prioritize scene cuts over face cuts\n\n* Added SCENE_CUTS type to VideoAnalyzerSceneDetector.\n* Replaced "safe_faces_list" usage in loop calculators with "scene_cuts_list" as priority.\n* Removed dead code/scripts: update_video.py, fix_newlines.py, fix_tqdm.py, add_scenedetector.py. 2026-04-25 12:20:48 +00:00
Meisoft 0805acb114 Merge pull request #93 from Meisoftcoltd/video-scene-detector-2048273577937433579
feat(video): add scene detector node and caching for sequential batcher
2026-04-25 08:39:27 +02:00
Meisoftcoltd 5983ff65b4 feat: rename video analyzer to face detector, add global cache, and introduce scene detector node
- Renamed `VideoAnalyzerWithAudio` to `VideoAnalyzerFaceDetector`.
- Introduced `VIDEO_ANALYSIS_CACHE` and `current_loop_index` for cycle caching.
- Created `VideoAnalyzerSceneDetector` to detect scene changes via pixel difference.
- Added dynamic reference frame preview functionality outside the caching logic.
- Registered nodes with proper display names in `__init__.py`.
2026-04-24 21:29:55 +00:00
Meisoft d4e507af7c Merge pull request #91 from Meisoftcoltd/fix-lazy-session-cache-8902851697963122458
Fix aggressive Lazy Evaluation in LazySessionCache
2026-04-22 19:34:37 +02:00
Meisoftcoltd 863154901b fix(switch_node): implement aggressive lazy evaluation for LazySessionCache
- Moved `value_in` to the `optional` group to allow ComfyUI to defer its evaluation.
- Updated `check_lazy_status` to return an empty list `[]` for loops > 0, completely cutting off upstream execution.
- Retained the `GLOBAL_SESSION_CACHE` logic scoped by `unique_id`.
- Removed `@register_node` decorator to prevent duplicate registry issues since mapping is handled in `__init__.py`.
2026-04-22 17:34:09 +00:00
Meisoft 6479883f6d Merge pull request #90 from Meisoftcoltd/feat-primitive-delay-12488753207120426735
Add PrimitiveDelay Tool Node
2026-04-21 23:04:10 +02:00
Meisoftcoltd 89a5f767d7 feat: add PrimitiveDelay tool node for timeline control
Adds a PrimitiveDelay custom node to tools.py that blocks execution for a user-configurable number of seconds, acting as a passthrough using the global `AnyType` wildcard connection. This allows users to throttle rapid API requests, wait for IO tasks to complete, or generally space out ComfyUI execution times in sequential batcher workflows. Re-uses the existing AnyType instance from switch_node.py to adhere to DRY principles.
2026-04-21 21:01:56 +00:00
Meisoft fb35df1526 Merge pull request #89 from Meisoftcoltd/feature/lazy-session-cache-8805062770877095561
Add LazySessionCache node with lazy evaluation
2026-04-21 08:59:51 +02:00
Meisoftcoltd 2551cd5832 feat: add LazySessionCache to prevent redundant input node executions
Adds the LazySessionCache node to `switch_node.py` with lazy evaluation.
It intercepts and stores the input value in cycle 0 and bypasses upstream
evaluation in subsequent loops. Updates `__init__.py` to map the class
and register its display name cleanly.
2026-04-21 06:25:30 +00:00
Meisoft 3eb5dcb7ae Merge pull request #88 from Meisoftcoltd/feat/add-logs-and-rename-debug-9893747542349634290
feat: add log string outputs to all nodes and rename debug prefix
2026-04-19 15:35:51 +02:00
Meisoftcoltd ce6041da4a feat: rename [DEBUG] to [Secuencial Batcher] and add STRING log outputs to all nodes
This commit addresses two primary requests:
1. Replaces all console log prefixes `[DEBUG]` (and variations) with `[Secuencial Batcher]`.
2. Extends the `RETURN_TYPES` and `RETURN_NAMES` of all nodes to output a `log` string containing exactly the text emitted via `print()`. This string is constructed by intercepting `print()` calls inside node methods using a local wrapper and appending the texts to a list, which is then returned joined by newlines.
2026-04-19 13:33:52 +00:00
Meisoft 7d266f818c Merge pull request #87 from Meisoftcoltd/feat/vhs-path-selector-dual-output-1840554855603352002
feat: update VHS_Path_Selector outputs and category
2026-04-18 12:40:45 +02:00
Meisoftcoltd 798d791593 feat(tools): enhance VHS_Path_Selector with dual outputs and reordering
- Added `VHS_FILENAMES` to output alongside `STRING` to allow better integration with downstream nodes (like Telegram).
- Implemented list reordering to place the selected file at index 0, tricking default downstream behavior.
- Moved `VHS_Path_Selector` category to "🔁 Sequential Batcher/Tools" for better organization.
- Added `__pycache__/` to `.gitignore` to prevent tracking compiled binaries.
2026-04-18 09:45:16 +00:00
Meisoft 41d752577c Merge pull request #86 from Meisoftcoltd/add-vhs-path-selector-5637212873751470347
Add VHS Path Selector node
2026-04-17 23:08:36 +02:00
Meisoftcoltd 5be95e32ab Add robust VHS_Path_Selector custom node to tools.py
Added a new versatile custom node, VHS_Path_Selector, that intelligently processes the output of the VHS Video Combine node (VHS_FILENAMES). It features a robust "armored" mode to gracefully handle unexpected inputs (None, missing lists, or invalid types) without crashing the workflow. It allows users to select a specific path (video with audio, muted video, or png thumbnail) via a dropdown, with smart fallbacks to ensure downstream nodes like Telegram bots always receive a valid file path. Debug logs and print statements are maintained in Spanish for consistency.
2026-04-17 20:12:03 +00:00
Meisoft 3cf6c13d17 Merge pull request #85 from Meisoftcoltd/feat/wanvideo-4n-plus-1-rule-2198541111553782481
feat: enforce 4n+1 frame rule for WanVideo VAE padding and calculations
2026-04-12 21:12:33 +02:00
Meisoftcoltd 7187f783b4 feat: enforce 4n+1 frame rule for WanVideo VAE padding and calculations
Replaces the previous "multiple of 4" rule with the `4n + 1` logic across
the AutoLoopCalculatorWan and VAESafeFramePadder nodes. This prevents frame
loss / truncation inside the VAE and ensures absolute consistency for
long generation runs and video reconstruction. Mention of "múltiplo de 4"
in the primary README has also been updated to "regla de 4n + 1".
2026-04-12 19:02:40 +00:00
Meisoft 10e0affe28 Merge pull request #84 from Meisoftcoltd/fix-vae-frame-loss-and-png-cache-15856296271751515989
Fix VAE Frame Loss and Optimize RAM via PNG Cache
2026-04-12 18:16:03 +02:00
Meisoftcoltd 444b6c6513 Fix VAE frame loss by forcing timeline completion on final chunk and optimize stitcher RAM via lightweight PNG caching. 2026-04-12 16:10:56 +00:00
Meisoft 490e3322d7 Merge pull request #83 from Meisoftcoltd/fix/incremental-video-stitcher-overwrite-13565695973057979585
fix(video): blindar el IncrementalVideoStitcher contra bugs de caché y sobreescritura
2026-04-12 16:30:00 +02:00
Meisoftcoltd 8dc273ff16 fix: blindar IncrementalVideoStitcher para evitar sobreescritura de frames
- Se introduce la subcarpeta `meisoft_video_cache`.
- Se guardan los lotes con un timestamp en milisegundos para evitar sobreescrituras en caso de que falle el `current_loop_index`.
- Se incorpora `@classmethod def IS_CHANGED` con `time.time()` para obligar a ComfyUI a ejecutar siempre el nodo e ignorar el cache.
- El directorio temporal se limpia correctamente en el ciclo 0 y se destruye tras ensamblar el vídeo completo.
2026-04-12 14:26:43 +00:00
Meisoft 4c5d15567b Merge pull request #82 from Meisoftcoltd/fix-vram-allocation-and-sync-3903827223534401494
Optimize VRAM Defragmenter execution order and eliminate allocation conflicts
2026-04-12 14:46:51 +02:00
Meisoftcoltd 242ff772a5 fix: optimize VRAM purge order and remove conflicting environment variable
- Removed `PYTORCH_CUDA_ALLOC_CONF` from `__init__.py` to allow elastic VRAM expansion via `expandable_segments:True`.
- Swapped `torch.cuda.empty_cache()` and `torch.cuda.synchronize()` order in `vram_node.py` to ensure pending operations finish before purging cache.
- Added critical warnings in `README.md` and `README_EN.md` discouraging the use of `--highvram` flag when starting ComfyUI to prevent VRAM Defragmenter sabotage.
2026-04-12 12:46:33 +00:00
Meisoft e49056c835 Merge pull request #81 from Meisoftcoltd/fix/timeline-overflow-padding-7170942151912358163
fix: decouple timeline from frame padding to prevent EOF crashes
2026-04-12 12:53:57 +02:00
Meisoftcoltd 0d794fc10e fix: decouple timeline from frame padding to prevent EOF crashes
Replaced artificial safe limit in AutoLoopCalculatorWan (video.py) and
AutoLoopCalculatorLTX (loop.py) with actual physical source frame limit.
This prevents trigger nodes from falsely requesting frames past the EOF
which resulted in "RuntimeError: No frames generated".
2026-04-12 10:26:08 +00:00
Meisoft 55cab6c11b Merge pull request #80 from Meisoftcoltd/update-readme-v1-6-0-8587778050238850121
docs: Update READMEs and bump version to 1.6.0
2026-04-12 12:00:40 +02:00
Meisoftcoltd 74238937dc docs: update README to version 1.6.0 with English translation
Updated README.md with the newly provided v1.6.0 presentation text.
Translated the updated text and updated README_EN.md accordingly.
Bumped __version__ in __init__.py to "1.6.0".
2026-04-12 02:38:05 +00:00
Meisoft f26a7ef983 Merge pull request #79 from Meisoftcoltd/vae-safe-frame-padder-6798265915743811604
Add VAESafeFramePadder for Hold Last Frame expansion
2026-04-12 03:48:39 +02:00
Meisoftcoltd 1b75c40e3e feat: add VAESafeFramePadder and update loop calculators math
- Added VAESafeFramePadder to `tools.py` which clones the last frame
  of an image tensor to satisfy mathematical rules (4n for WanVideo,
  8n+1 for LTX) avoiding audio clipping and VAE crashes.
- Registered the new tool in `__init__.py` under NODE_DISPLAY_NAME_MAPPINGS.
- Updated `AutoLoopCalculatorWan` in `video.py` to pad and round up to a
  multiple of 4.
- Updated `AutoLoopCalculatorLTX` in `loop.py` to pad and round up to an
  8n+1 multiple.
2026-04-12 01:33:46 +00:00
Meisoft 5b70ccaf18 Merge pull request #78 from Meisoftcoltd/jules-fix-frame-absorption-bypass-final-loop-race-condition-18010398085203789983
Fix final batch race condition by delegating global counter reset
2026-04-11 19:30:41 +02:00
Meisoftcoltd 9e893334a1 Fix final batch race condition by delegating global counter reset
Removes the zeroing of `global_loop_index` and `global_accumulated_frames` from the `SequentialLoopTrigger` node.
This architectural shift solves a race condition where the stitcher would process the final chunk based on freshly reset counters (0) instead of the actual completed value, resulting in empty frames or structural bypassing. State cleanup is now exclusively handled by the entry start node.
2026-04-11 17:16:12 +00:00
Meisoft dea765dbcd Merge pull request #77 from Meisoftcoltd/jules-fix-frame-absorption-bypass-2060959048677752393
fix: implement final batch bypass and aggressive frame absorption
2026-04-11 15:06:46 +02:00
Meisoftcoltd d06e88a9b2 fix: implement final batch bypass and aggressive frame absorption
- In `image.py`, added a final batch bypass (`advance_check`) to disable face detection and cropping when the current batch completes the remaining video sequence. This prevents the generation of single-frame dummy batches at the end.
- In `video.py` and `loop.py`, updated `AutoLoopCalculator`, `AutoLoopCalculatorWan`, and `AutoLoopCalculatorLTX` to use an `absorption_threshold = equitable_target * 1.5`. This forces the calculator to absorb up to 50% extra remaining frames in a single batch, eliminating micro-cycles.
2026-04-11 12:24:50 +00:00
Meisoft cdc10e72c9 Merge pull request #76 from Meisoftcoltd/vram-defragmenter-upgrade-7373945555480505137
Upgrade MeisoftVRAMDefragmenter with deep cleanup and visual stats
2026-04-11 04:15:27 +02:00
Meisoftcoltd 7ec112a2cd feat: add multi-platform support to system RAM purging
- Detected OS platform dynamically
- Added `ctypes.windll.kernel32.SetProcessWorkingSetSize` for deep RAM release on Windows
- Retained `malloc_trim` via `libc.so.6` for Linux environments
2026-04-11 02:13:43 +00:00
Meisoftcoltd c214b71b76 feat: upgrade VRAM Defragmenter node for deep memory cleaning
- Implemented dynamic allocator configuration (`expandable_segments:True`)
- Added native ComfyUI internal reference cleanup
- Improved python GC and system RAM purging (`malloc_trim` on Linux)
- Added clear visual debug output displaying VRAM recovered
2026-04-11 02:06:38 +00:00
Meisoft bfa0125a21 Merge pull request #75 from Meisoftcoltd/fix-video-analyzer-cache-3265285744156689374
fix: correct VideoAnalyzerWithAudio caching logic
2026-04-10 10:31:22 +02:00
Meisoftcoltd 2731ab0779 feat(video): add native ComfyUI progress bar to VideoAnalyzerWithAudio
Inject `comfy.utils.ProgressBar` into the frame scanning loop in `VideoAnalyzerWithAudio`. This provides a visual native green progress bar directly on the node in the ComfyUI interface, giving real-time feedback during long video analyses without requiring the user to monitor the terminal output.
2026-04-10 08:30:56 +00:00
Meisoftcoltd 35975007e7 fix(video): fix cache invalidation in VideoAnalyzerWithAudio
Update `IS_CHANGED` in `VideoAnalyzerWithAudio` to rely on the video path
and node parameters instead of `os.path.getmtime` and `time.time()`. This fixes
an issue where the node would constantly invalidate the cache and re-run on
every execution, rather than reusing cached results when inputs have not changed.
2026-04-10 08:19:59 +00:00
Meisoft 7cc86e6b94 Merge pull request #74 from Meisoftcoltd/fix/micro-cycle-death-loop-3346897521993443470
Fix micro-cycle death loops in mathematical frame calculation
2026-04-08 23:28:51 +02:00
Meisoftcoltd 63e84c2aa1 Fix Micro-Cycle Death Loops in frame calculation
This commit patches the `SessionImageSender`, `AutoLoopCalculatorWan`,
and `AutoLoopCalculatorLTX` nodes to prevent infinite loops caused by
extreme truncation at the end of video sequences.

- `image.py`: Ensures `SessionImageSender` accepts the entire batch if no
  faces are detected, rather than defaulting to frame 0, which previously
  trapped the workflow in a 1-frame micro-cycle loop.
- `video.py`: Updates `AutoLoopCalculatorWan` to always round the final
  chunk size up to the nearest multiple of 4, removing the strict
  cropping logic that broke the 3D VAE rule.
- `loop.py`: Updates `AutoLoopCalculatorLTX` to always round the final
  chunk size up to the nearest `8n + 1` value, removing the strict
  cropping logic that broke the DiT rule.
2026-04-08 21:22:08 +00:00