Commit Graph
204 Commits
Author SHA1 Message Date
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
Meisoft df18b573d0 Merge pull request #73 from Meisoftcoltd/vram-defragmentation-wanvideo-13266185802220085488
feat: Implement Deep VRAM Defragmentation for WanVideo
2026-04-08 20:01:44 +02:00
Meisoftcoltd ecd973b8e5 feat: implement deep VRAM defragmentation and update docs
- Enforced a strict memory cleanup sequence in `MeisoftVRAMDefragmenter` (including IPC cleanup and CUDA synchronization).
- Injected `PYTORCH_CUDA_ALLOC_CONF="max_split_size_mb:128"` in `__init__.py` to prevent VRAM micro-fragmentation.
- Added `unload_detector` option to `VideoAnalyzerWithAudio` to eagerly destroy the face detector model and free VRAM.
- Updated README.md with detailed explanations of the new features.
2026-04-08 12:04:56 +00:00
Meisoftcoltd 1c90c848e2 feat: implement deep VRAM defragmentation and PyTorch memory allocator fix
- Enforced a strict memory cleanup sequence in `MeisoftVRAMDefragmenter` (including IPC cleanup and CUDA synchronization).
- Injected `PYTORCH_CUDA_ALLOC_CONF="max_split_size_mb:128"` in `__init__.py` to prevent VRAM micro-fragmentation.
- Added `unload_detector` option to `VideoAnalyzerWithAudio` to eagerly destroy the face detector model and free VRAM.
2026-04-08 11:56:02 +00:00
Meisoft 444dc2c350 Merge pull request #72 from Meisoftcoltd/vram-defragmenter-1390025307932295400
Implement VRAM Defragmentation Tactic
2026-04-08 09:56:13 +02:00
Meisoftcoltd 1e36f9e915 feat: implement VRAM defragmentation strategy and optimization
- Created `MeisoftVRAMDefragmenter` in `vram_node.py` as a passthrough to force model unloading, Python garbage collection, and CUDA cache defragmentation.
- Registered the new node in `__init__.py`.
- Added light memory cleanup on intermediate batch loops in `loop.py`, alongside a heavy cleanup (including ctypes `malloc_trim`) at the end.
- Added `unload_detector_after_analysis` boolean flag to `VideoAnalyzerWithAudio` in `video.py` to allow releasing the BBOX detector model immediately after use.
2026-04-08 07:48:48 +00:00
Meisoft 1701eeb218 Merge pull request #71 from Meisoftcoltd/feat/master-switch-lazy-evaluation-17740267901861549413
feat: Implement MasterSwitch for intelligent lazy branch evaluation
2026-04-07 22:12:11 +02:00
Meisoftcoltd 3f9c7cbee1 docs: update READMEs with MasterSwitch documentation
- Add Spanish and English descriptions for the new MasterSwitch node.
- Highlight Native Lazy Evaluation and Hot Graph Surgery features.
2026-04-07 20:11:40 +00:00
Meisoftcoltd ff5643b098 feat: add MasterSwitch node with lazy evaluation and graph surgery
- Implement `switch_node.py` with `MasterSwitch` handling native lazy evaluation.
- Register `MasterSwitch` in `__init__.py` using clean names.
- Intercept and apply Hot Graph Surgery in `loop.py` to strip out unneeded nodes in auto loop cycles for reduced VRAM usage.
2026-04-07 19:23:01 +00:00
Meisoft e647ac0728 Merge pull request #69 from Meisoftcoltd/feat/conditional-audio-router-14058830236118345976
feat: add ConditionalAudioRouter for bypassing audio processes in intermediate cycles
2026-04-06 10:31:34 +02:00
Meisoftcoltd 6080f61c27 feat: Add ConditionalAudioRouter node for Lip Sync bypass
Added `ConditionalAudioRouter` to `tools.py` with `torch` import to generate an empty audio tensor for bypassing a LipSync node during intermediate loops without breaking it. Registered node to `__init__.py`.
2026-04-06 08:08:48 +00:00
Meisoft 9cc66a4c80 Merge pull request #68 from Meisoftcoltd/fix/sequential-batcher-final-cycle-15656548652125589395
Fix Sequential Batcher intermediate behaviors on final cycle
2026-04-05 23:36:11 +02:00