Commit Graph
14 Commits
Author SHA1 Message Date
Meisoftcoltd 3afcee2bef test: add safety guards and unit tests for video loop calculators
Added input validations (`source_frame_count <= 0` or `target_frames_per_loop <= 0`) to `AutoLoopCalculatorLTX` (in `loop.py`), and `AutoLoopCalculator`, `AutoLoopCalculatorWan` (in `video.py`). When conditions are met, a safe default is returned to prevent math domain errors. Also included a new comprehensive unit test suite in `tests/test_loop_calculator.py`.
2026-05-14 20:24:55 +00:00
Meisoft b7e1fb6f89 Merge pull request #105 from Meisoftcoltd/test-video-audio-error-handling-369389381641730631
🧪 Add error handling and coverage tests for audio extraction
2026-05-02 22:46:31 +02:00
Meisoftcoltd ba6fc7b8fc 🧪 Add error handling and coverage tests for audio extraction
- Implemented unit tests for `extract_and_standardize_audio` in `video.py`.
- Added test case to verify exception handling when `torchaudio.load` fails.
- Expanded coverage to include resampling and channel standardization (mono/multichannel to stereo).
- Followed the repository's clean testing pattern for mocking dependencies and loading code under test.
2026-05-02 20:46:16 +00:00
Meisoftcoltd 4ce91323a1 🔒 Security fix: Use weights_only=True in torch.load()
Added `weights_only=True` to `torch.load()` in `video.py` to prevent insecure deserialization and potential arbitrary code execution via crafted pickle files. This change restricts the unpickler to only load tensors, primitive types, and basic containers, which is sufficient for the audio dictionary being loaded.
2026-05-02 20:44:38 +00:00
Meisoft 8fc697a8c3 Merge pull request #100 from Meisoftcoltd/testing-format-bytes-utility-10775869003227782014
🧪 Unit tests for format_bytes utility function
2026-04-30 17:16:46 +02:00
Meisoftcoltd 75ab5d9676 🧪 Add unit tests for format_bytes utility function
- Created tests/test_vram_node.py
- Mocked dependencies (torch, comfy) to allow testing in isolation
- Implemented test cases for zero values, exact GB, fractional values, small values (rounding check), and large values.
- Verified test robustness by confirming failure when logic was intentionally altered.
2026-04-30 15:16:06 +00:00
Meisoftcoltd 8d8e3deb1e fix: 🔒 prevent command injection in FFmpeg installation
Replaces the shell-based subprocess call with list-based arguments and
separate invocations for 'apt-get update' and 'apt-get install'.
This eliminates the risk of command injection by avoiding shell
interpretation and properly handles the DEBIAN_FRONTEND environment
variable via sudo.
2026-04-30 14:59:46 +00:00
Meisoftcoltd dc0d3db2f8 feat: proportional frame target recalculation for wanvideo calculator
* Add MEISOFT PATCH to AutoLoopCalculatorWan to dynamically adjust target frames based on safe effective frame multiples.
* Replace static math.ceil calculations and frame absorptions to equitably distribute frames for 3D VAE rendering.
* Simplify chunk limits validation utilizing pre-calculated mathematical bounds, preventing VAE crash micro-cycles.
2026-04-04 19:33:17 +00:00
Meisoftcoltd af3cddf758 Fix: Return absolute video_path in VideoAnalyzerWithAudio
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.
2026-03-30 15:58:31 +00:00
Meisoftcoltd 2cd9b13f4c feat: update VideoAnalyzerWithAudio UI and preview logic
- 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.
2026-03-30 14:42:34 +00:00
Meisoftcoltd bb703951d5 feat: Implement lazy evaluation Cycle 0 architecture
- 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.
2026-03-29 16:08:21 +00:00
Meisoft 7fcd204130 Merge pull request #8 from Meisoftcoltd/security/fix-loadcsv-file-read-6247077405557821064
Secure LoadCSV node against arbitrary file read
2026-02-06 14:28:15 +01:00
Meisoftcoltd bbc5faa672 Optimize unique key extraction in format_batch_as_table 2026-02-06 13:24:12 +00:00
Meisoftcoltd 62c212a485 Secure LoadCSV node against arbitrary file read 2026-02-06 13:23:43 +00:00