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.
This commit introduces a new `tools.py` module containing a `BaseResolutionTool` and its specific derived classes (`ResTool8x`, `ResTool16x`, `ResTool32x`, `ResTool64x`). These nodes calculate safe, model-specific dimensions that strictly conform to divisibility rules using provided aspect ratios and base resolutions.
The `__init__.py` file is updated to import and register these tools along with emojis for UI display. Both the English and Spanish READMEs are updated to document the new `Tools` suite.
Update `calculate` method in `video.py` to dynamically adjust loop lengths
by a 10% margin, absorbing remainders safely and preventing inefficient
micro-cycles at the end of videos. Update both README.md and README_EN.md
to reflect this new capability and bump the version to 1.4.3.
Updated `VideoAnalyzerWithAudio.analyze` to return `video_path` instead
of `video_name` in the result tuple. This bypasses the issue with
VHS_LoadVideo failing on complex filenames by directly passing the
absolute path to the video.
- Bumped version number in README.md and README_EN.md from 1.4.0 to 1.4.1.
- Updated the "Explorer" (`VideoAnalyzerWithAudio`) node description to highlight its new clean interface, native VHS widget integration, and visual Reference Frame generation.
- Replaced VideoAnalyzerWithAudio class with improved UI handling logic.
- Implemented reference frame preview generation within the node.
- Added IS_CHANGED and VALIDATE_INPUTS class methods for correct caching and validation.
- Output formatting changed to return both UI payload and specific results tuple.
- Updates README.md and README_EN.md.
- Replaces legacy loader references with the new "Explorer", "Brain", and "Worker" logic.
- Adds OpenCV dependency requirement instructions.
- Provides step-by-step setup guides to connect the updated 3-node structure.
- Replaces LoadVideoWithSourceAudio with VideoAnalyzerWithAudio (the "Explorer").
- Introduces OpenCV-based frame scanning to detect sharp and frontal faces.
- Updates AutoLoopCalculator (the "Brain") to utilize safe_faces_list for asymmetric intelligent cuts.
- Updates __init__.py to register the new node correctly with the corresponding display name mapping ("🕵️ Video Analyzer + Audio").
- Introduced global state memory (`global_source_frame_count`, `global_target_frames`, `global_stride`) in `loop.py`.
- Removed visual `source_frame_count` wire from `AutoLoopCalculator` in `video.py`
- Upgraded `AutoLoopCalculator` to execute as a blind "Explorer" in Cycle 0.
- Updated `LoadVideoWithSourceAudio` to intercept real `source_frame_count` directly from VHS payloads.
- Added dynamic calculation of total cycles based on intercepted frames at the end of Cycle 0.
- Updated both README.md and README_EN.md with v1.3.1 documentation reflecting the new Cycle 0 features.
- Introduced global state memory (`global_source_frame_count`, `global_target_frames`, `global_stride`) in `loop.py`.
- Removed visual `source_frame_count` wire from `AutoLoopCalculator` in `video.py`
- Upgraded `AutoLoopCalculator` to execute as a blind "Explorer" in Cycle 0.
- Updated `LoadVideoWithSourceAudio` to intercept real `source_frame_count` directly from VHS payloads.
- Added dynamic calculation of total cycles based on intercepted frames at the end of Cycle 0.
- Replaced 8x8 zero tensor initialization in IncrementalVideoStitcher intermediate steps.
- Sliced the actual tensor input (`images[0:1]`) to send the first frame as preview instead.
- This maintains active cables and properly initializes cache resolutions for downstream RIFE/Upscale 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.
- Replaced `vhs_load_video_class` inheritance at import time with a Lazy Evaluation Wrapper that dynamically fetches inputs and instantiates the class at runtime.
- Removed legacy technical debt from `video.py`.
- Cleaned up local Python cache files to prevent `__pycache__` ghosts from interfering.
- Fixes `ValueError: not enough values to unpack` by safely handling the `video` param from VHS_LoadVideo whether it is a string or tuple.
- Adds strict filtering for `kwargs` to prevent `force_rate` unexpected keyword argument crashes in newer versions of VHS.
- Modifies `IS_CHANGED` to return `time.time()` to forcefully bypass ComfyUI caching.
- Optimizes `IncrementalVideoStitcher` to return an 8x8 micro-tensor during intermediate loops to prevent missing input errors.
- Overwrite `video.py` with entirely new architecture.
- Add `WanFrameValidator` node.
- Update `LoadVideoWithSourceAudio` to use `time.time()` for cache invalidation instead of `float("NaN")`.
- Update `IncrementalVideoStitcher` to return a `torch.zeros((1, 8, 8, 3))` micro-tensor during intermediate loops to keep ComfyUI's strictly typed pipelines valid.
- Ensure `IS_CHANGED` and `VALIDATE_INPUTS` are fully utilizing `@classmethod` logic.
- Filter `**kwargs` before passing them to the native `VHS_LoadVideo` instance to prevent "unexpected keyword argument" crashes.
- Update internal Spanish comments to align with user requested format.
- Removed dependency on VHS_LoadVideo cache and validation methods
- Replaced IS_CHANGED to check modification time instead of slow SHA256
- Replaced VALIDATE_INPUTS to check file existence directly and absorb kwargs
- These changes improve the node's independence and speed for large files
- Se actualizaron las descripciones en README.md y README_EN.md para reflejar las nuevas capacidades de LoadVideoWithSourceAudio (widget UI intacto, upload directo) y el Stitcher (INPUT_IS_LIST=False, passthrough directo de audio al último frame).
- Se restauraron los scripts de testing en `tests/` que se habían eliminado accidentalmente.
- Se reimplementó `LoadVideoWithSourceAudio` para envolver adecuadamente `VHS_LoadVideo`, añadiendo la directiva de UI "video_upload", y métodos para la verificación de cambios (IS_CHANGED, VALIDATE_INPUTS) mientras se conserva el widget de UI.
- Se ha expuesto explícitamente `INPUT_IS_LIST = False` en `IncrementalVideoStitcher` para forzar el tratamiento de imágenes como tensores puros.
- El passthrough de audio en `IncrementalVideoStitcher` ya funciona correctamente de forma predeterminada sin cambios adicionales.
- Se agregó el nuevo alias de nodo en `__init__.py` para su registro en ComfyUI.
Changes:
- Documented zero-OOM tensor handling and audio passthrough for IncrementalVideoStitcher in README.md and README_EN.md.
- Added documentation for the new LoadVideoWithSourceAudio node explaining dynamic VHS integration and uncropped audio extraction.
Changes:
- Modified IncrementalVideoStitcher to process IMAGE tensors directly instead of MP4 lists.
- Implemented RAM/VRAM saving mechanism by saving tensor state dynamically to `.pt` files and cleaning them manually via `gc`.
- Introduced LoadVideoWithSourceAudio mapping to extract complete original tracks dynamically.
- `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.
Updated README.md and README_EN.md to version 1.1.0. Documented the new
Anti-Cache Injection mechanism in the Loop Trigger, progressive keyframe
and MP4 saving features, and audio multiplexing using torchaudio and
FFmpeg. Also updated the setup instructions with the new wiring requirements.
Updated video.py to accept an optional 'AUDIO' input in IncrementalVideoStitcher.
Uses torchaudio to save the waveform temporarily, and then applies ffmpeg with
the '-shortest' flag to seamlessly multiplex it with the concatenated mp4 segments.
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.
- Replaced README.md with the Spanish translation.
- Renamed the old English README to README_EN.md.
- Added cross-links between the two versions.
- Updated documentation to include the new Seed Mutator feature for v1.0.1.