Commit Graph
24 Commits
Author SHA1 Message Date
Meisoftcoltd 6cd32fcfe9 Fix: Resolve Unit Clash between TTS chunks and video frames in Sequential Batcher
- Introduce `global_step_by_chunk` ghost variable initialized to `False` in `loop.py`
- Set `loop.global_step_by_chunk = True` in `AutoLoopCalculatorTTS` to indicate chunk mode
- Reset `loop.global_step_by_chunk = False` in video calculators (`AutoLoopCalculator`, `AutoLoopCalculatorWan`, `AutoLoopCalculatorLTX`) to ensure state resets
- Update `SessionImageSender.send_image` timeline management to branch logic, using `is_chunk_mode` to calculate progress differently for text chunks versus video frames
2026-05-13 22:34:58 +00: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
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
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
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
Meisoftcoltd bd6016f559 fix: bypass keyframe save and output full tensor on final cycle
- Updated `SessionImageSender` to conditionally save keyframe only when not in the final cycle.
- Updated `IncrementalVideoStitcher` to return full concatenated tensor when in the final cycle, avoiding dummy frame output and blocking downstream nodes.
- Expose `IS_FINAL_CYCLE` boolean from `IncrementalVideoStitcher` to UI for downstream conditionals.
2026-04-05 21:32:14 +00:00
Meisoftcoltd 1ffccc5599 feat: add native support for LTX 2.3 model
- Implemented `AutoLoopCalculatorLTX` node to enforce `8n + 1` frame chunks.
- Added `ResTool32xLTX` node for strict 32x divisible resolutions with proper minimum pixel scaling.
- Updated `IncrementalVideoStitcher` (in `image.py`) to correctly subtract the overlapping anchor frame from global frame progression when LTX mode is active.
- Added `global_ltx_mode` reset in `SequentialLoopStart` to prevent state leakage to other non-LTX workflows.
- Registered nodes in `__init__.py` and updated `README.md` & `README_EN.md` with new features.
2026-04-03 13:00:41 +00:00
Meisoftcoltd bc7b27a962 Refactor AutoLoopCalculator and SessionImageSender
- Changed validate_face to detect_faces parameter in SessionImageSender to skip OpenCV when False.
- Refactored AutoLoopCalculator to use dynamic batch allocation equitably distributing total frames over the number of needed loops.
2026-03-31 10:03:20 +00:00
Meisoftcoltd 1c13d37fbc feat: implement Dynamic Engine and Tools suite for v1.5.0
This commit introduces the Hybrid Identity Architecture's Dynamic Engine:
- `tools.py`: Adds new Math constraint nodes (`ResTool 8x, 16x, 32x, 64x`) to calculate safe resolutions dynamically, preventing VRAM overflow.
- `loop.py`: Replaces the legacy static mathematical state machine with a dynamic performance-based state using `global_accumulated_frames` to progress accurately based on successful generations.
- `image.py`: Overhauls `SessionImageSender` to dynamically truncate generated image tensors using OpenCV if faces are lost, saving the last valid frame, and correctly adjusting the loop progression. `SessionImageReceiver` updated to log dynamic progression.
- `video.py`: Refactors `AutoLoopCalculator` and `IncrementalVideoStitcher` to work under the new dynamic state machine logic.
- `__init__.py`: Registered new nodes, updated imports to include `tools`, and bumped version to v1.5.0.
- `README.md` & `README_EN.md`: Updated documentation to detail the new Dynamic Engine functionality and Tools suite.
2026-03-30 19:03:16 +00:00
Meisoftcoltd d6d29f998e feat: Add AutoLoopCalculator and remove circular loop wires\n\n- Replace WanFrameValidator with AutoLoopCalculator in video.py\n- Introduce global_total_loops in loop.py to track loops implicitly\n- Eliminate total_loops parameter from SequentialLoopStart, SequentialLoopTrigger, IncrementalVideoStitcher, SessionImageReceiver, and SessionImageSender to prevent ComfyUI wire clutter and avoid circular dependencies.\n- Add support for striding (select_every_nth) in frame distribution calculations.\n- Update README.md and README_EN.md to match the new architecture. 2026-03-29 14:58:28 +00:00
Meisoftcoltd 7c858643e6 feat: v1.2.0 global update for Sequential Batcher nodes
- Update WanFrameValidator to dynamically calculate skip_frames based on current_loop_index.
- Update LoadVideoWithSourceAudio to extract and output the first frame safely.
- Add total_loops tracking and detailed debug logs to SequentialLoopStart.
- Add total_loops to SessionImageReceiver and SessionImageSender for progressive tracking.
- Enhance print logs with visible Spanish banners across modified nodes.
2026-03-28 22:12:23 +00:00
Meisoftcoltd e87cad300c feat: add explicit input validations to key nodes
- `loop.py`: Added check for `trigger_dependency` in `SequentialLoopTrigger.trigger_next`.
- `image.py`: Added checks for `generated_images` and `current_loop_index` in `SessionImageSender.set_image`.
- `video.py`: Added list-aware checks for `trigger` and `current_loop_index` in `IncrementalVideoStitcher.stitch_incremental` due to `INPUT_IS_LIST = True`.

All validations throw a `ValueError` with clear Spanish instructions when inputs are missing to provide immediate user feedback on the ComfyUI canvas.
2026-03-23 20:49:22 +00:00
Meisoftcoltd 9939314b2f Fix loop reverse cache with payload mutation and add debug logic
Replaced loop.py and image.py, and updated video.py to fix the 'reverse cache'
issue by injecting the new index directly into the ComfyUI API JSON payload.
Added large debug banners in Spanish, PNG keyframe extraction, and progressive MP4 saving.
2026-03-23 19:55:57 +00:00
Meisoftcoltd 29915698e5 Fix: Update cache breaking logic in IS_CHANGED from NaN to time.time()
This resolves aggressive caching bugs in newer ComfyUI versions.
Replaced float("NaN") with time.time() in image.py and loop.py
to ensure stateful memory/trigger nodes consistently fire.
2026-03-22 22:17:23 +00:00
Meisoftcoltd 23135bfaa7 Refactor SessionImageSender/Receiver to use CPU RAM
Replaced the entirety of image.py with a simplified and corrected implementation. The previous cyclic dependency concept was abandoned due to ComfyUI's DAG constraints. Instead, the global RAM approach is used, heavily augmented with `.clone().cpu()` during storage to protect the tensor from ComfyUI's VRAM garbage collector destroying it between Auto Queue cycles. Extraneous technical debt within the file was completely removed.
2026-03-22 21:18:49 +00:00
Meisoftcoltd 73581ac582 refactor: clean up repository to v1.0.0 and implement recursive self-queuing architecture
- Delete deprecated modules: `sequence.py`, `paths.py`, `batch.py`, `debug.py`.
- Clean `image.py`, retaining only SessionImageReceiver, SessionImageSender, and auxiliary function.
- Clean `video.py`, retaining only IncrementalVideoStitcher and WanFrameValidator.
- Clean `loop.py`, retaining only SequentialLoopStart and SequentialLoopTrigger.
- Rewrite `__init__.py` mapping explicitly to the 6 core components and bump version to 1.0.0.
2026-03-22 19:25:11 +00:00
Meisoftcoltd 12f46287a9 Simplify flow by using current_loop_index for internal state reset
Modified `SessionImageReceiver` in `image.py` and `IncrementalVideoStitcher`
in `video.py` to accept the integer `current_loop_index` instead of external
boolean values. Automatic state clearing is now correctly performed when the
loop index equals 0. List unwrapping logic for inputs was implemented to
defend against ComfyUI `INPUT_IS_LIST = True` iteration behavior while
preserving the robust path resolution checks built in previous iterations.
2026-03-22 17:51:31 +00:00
Meisoftcoltd e4e92e4f08 Add Wan Frame Validator and Visual UI Debugging to Image Nodes
- Added WanFrameValidator node in video.py to ensure 4k+1 frame logic.
- Registered WanFrameValidator in __init__.py with "WanFrameValidator": "🛡️ Wan Frame Validator".
- Updated both README.md and README_ES.md to document the Wan Frame Validator.
- Modified SessionImageReceiver and SessionImageSender in image.py to return a UI object mapping for Visual UI Debugging in ComfyUI frontend.
2026-03-22 16:33:49 +00:00
Meisoftcoltd 0156a1b313 fix: add missing RETURN_NAMES to SessionImageSender
The custom `@register_node` decorator requires `RETURN_NAMES` to be explicitly defined as a tuple. `SessionImageSender` had `RETURN_TYPES = ()` but was missing `RETURN_NAMES = ()`, which caused an `AttributeError` upon importing the module, breaking the startup of ComfyUI. This patch adds the missing empty tuple.
2026-03-22 12:54:00 +00:00
Meisoftcoltd fc24328c95 Add SessionImageSender and SessionImageReceiver nodes
- Added `SessionImageSender` to save the last frame of an image batch (using `.clone()` to safely decouple the tensor) into a global session variable.
- Added `SessionImageReceiver` to inject the stored image into the start of the next workflow execution cycle.
- Both nodes utilize `IS_CHANGED` returning `NaN` to force execution on every Auto Queue tick.
- Updated `__init__.py` to register the new nodes under the display names "📤 Session Image Sender" and "📥 Session Image Receiver".
- Ensures users can chain frame sequences across independent batch loops without creating cyclic dependencies in ComfyUI.
2026-03-22 12:33:59 +00:00
Meisoft 6c401d7f51 Merge pull request #11 from Meisoftcoltd/perf/optimize-image-slicing-13128165043232194995
⚡ Optimize ImageBatchToList slicing performance
2026-02-06 14:32:50 +01:00
Meisoftcoltd de7b8cfc6e Optimize ImageBatchToList with torch.split 2026-02-06 13:32:28 +00:00
Meisoftcoltd ebcf007111 Optimize imports in image.py to top-level scope 2026-02-06 10:18:32 +00:00
Meisoft ecc6836a41 Add files via upload 2026-01-26 03:32:33 +01:00