19 Commits
Author SHA1 Message Date
FearL0rd 6a8a99fcb4 Added VRAM purge toggles
Added VRAM purge toggles to INPUT_TYPES:

purge_cache: Clears CUDA cache during cleanup (default: True)
purge_models: Aggressively unloads all models from VRAM using comfy.model_management.unload_all_models() (default: False)
Updated setup_parallel method signature to accept purge_cache and purge_models parameters

Store purge preferences on the model: target_model._parallel_purge_cache and target_model._parallel_purge_models

Enhanced cleanup_parallel_model function to:

Read the purge flags from the model attributes
Conditionally run comfy.model_management.unload_all_models() if purge_models is True
Conditionally clear CUDA cache and soft empty cache based on purge_cache setting
Multi-GPU cache clearing (iterates through all CUDA devices)
The purge settings persist with the model and are applied when the parallel processing resources are cleaned up (either when the node is re-run with new settings or when the model is garbage collected).
1.0.4
2026-02-04 16:24:57 -06:00
FearL0rd 838052e0ff Added VRAM purge toggles
Added VRAM purge toggles to INPUT_TYPES:

purge_cache: Clears CUDA cache during cleanup (default: True)
purge_models: Aggressively unloads all models from VRAM using comfy.model_management.unload_all_models() (default: False)
Updated setup_parallel method signature to accept purge_cache and purge_models parameters

Store purge preferences on the model: target_model._parallel_purge_cache and target_model._parallel_purge_models

Enhanced cleanup_parallel_model function to:

Read the purge flags from the model attributes
Conditionally run comfy.model_management.unload_all_models() if purge_models is True
Conditionally clear CUDA cache and soft empty cache based on purge_cache setting
Multi-GPU cache clearing (iterates through all CUDA devices)
The purge settings persist with the model and are applied when the parallel processing resources are cleaned up (either when the node is re-run with new settings or when the model is garbage collected).
2026-02-04 16:21:57 -06:00
FearL0rd db7f7b98b4 Update README with PC specs for test case
Added PC specifications for test case with batch size 21.
2026-02-04 16:17:13 -06:00
FearL0rd febd49127a Update test case details in README.md 2026-02-04 16:10:35 -06:00
FearL0rd b2c3852cbf Update test case description in README.md 2026-02-04 15:21:49 -06:00
FearL0rd f0485b38b4 Update README with test case results for batch size 21
Added test case results for batch size of 21, including performance metrics for Single 3090 and V100 + 3090 setups.
2026-02-04 15:20:49 -06:00
FearL0rd 6362d3c2aa Multiple Fixes
Fixed Memory Leaks: Added explicit cleanup of partial replicas if cloning fails mid-process
Better Error Handling: Exception handling in worker() now properly returns exceptions rather than raising, allowing cleanup of other threads
Thread Safety: Removed unused imports and ensured proper synchronization points for CUDA/XPU devices
Robust Splitting: Fixed split_batch to handle mixed lists of tensors and non-tensors correctly
Cleanup Safety: cleanup_parallel_model now handles cases where the model was partially initialized
VRAM Management: Added soft_empty_cache calls between cloning operations to prevent OOM when cloning to multiple devices
Management: Added auto balance to improve performance
Attribute Handling: Improved clone_module_simple to better handle missing attributes in layer reconstruction
Config Extraction: Added serialization check to extract_model_config to prevent storing non-serializable objects
1.0.3
2026-02-04 09:39:26 -06:00
FearL0rd 8a3085da78 Critical Bug Fixes / Improvements / Optimizations
Critical Bug Fixes:
Memory Leak: weakref.finalize now uses weakref.ref(target_model) instead of direct reference
Race Condition: Worker threads now return exceptions instead of raising them, allowing proper aggregation and cleanup
Batch Validation: get_batch_size() now validates consistent batch dimensions across tensor lists
Double Device Transfer: Removed .to(device) from split_kwargs(), now only happens in worker()
Attribute Handling: Cleaner separation of in_features vs in_channels in layer cloning
Improvements Added:
CUDA Streams: Each GPU now uses its own CUDA stream for true parallel execution
Auto VRAM Balance: New auto_vram_balance parameter adjusts splits based on available VRAM (70% user preference / 30% availability)
Gradient Checkpointing: Automatically disabled on replicas to save VRAM
Accelerate Hooks: Clears _hf_hook and hooks attributes for compatibility with accelerate offloading
Enhanced Cache Clearing: Added rope_cache and freqs_cis_cache to FLUX cleanup
Thread Safety: Proper executor context management and result validation
Performance Optimizations:
Non-blocking transfers where safe
Synchronization only on CUDA/XPU devices
Batch size auto-adjustment prevents OOM on uneven GPU setups
1.0.2
2026-02-03 15:35:03 -06:00
FearL0rd 1b5b638372 Add LTX-2 Video and multi-output model support 2026-02-03 10:49:47 -06:00
FearL0rd 1941751cba Add LTX-2 Video and multi-output model support
Fixed "'list' object has no attribute 'shape'" error when using 
LTX-2 Video and other diffusion models that return tuples/lists 
instead of single tensors.

Key changes:
- Added tensor container helpers: get_batch_size(), split_batch(), 
  move_to_device(), concatenate_results()
- parallel_forward now handles list/tuple inputs/outputs (common in 
  video models with temporal conditioning)
- Enhanced split_kwargs() to split list-of-tensors kwargs 
  (frame-wise embeddings, temporal IDs)
- Results are now properly concatenated whether model returns 
  Tensor, Tuple[Tensor, ...], or List[Tensor]

Tested working with: FLUX, SD3.5, LTX-2 Video, HunyuanVideo
VRAM: Maintains existing N× model replication strategy
Breaking: None (backward compatible with single-tensor outputs)
2026-02-03 10:48:52 -06:00
FearL0rd 8609d32b4f Add FLUX.1 to tested platforms in README
Updated README to reflect testing on additional platforms.
1.0.1
2026-02-03 08:35:01 -06:00
FearL0rd aebce4f889 Bump version to 1.0.1 in pyproject.toml 2026-02-03 08:34:42 -06:00
FearL0rd c32d55ac02 Flux Compatibility 2026-02-03 08:34:14 -06:00
FearL0rd 6069d2c560 Update README.md 2026-02-02 16:28:16 -06:00
FearL0rd 274c1b7cf3 Add 'copy' to requirements.txt 1.0.0 2026-02-02 11:04:30 -06:00
FearL0rd b2919663cd icon 2026-02-02 11:00:44 -06:00
FearL0rd 616832a180 Remove copyright notice from README
Removed copyright notice from README.
2026-02-02 10:57:45 -06:00
FearL0rd 8bfee3f7df Add README for Parallel Anything multi-GPU support
Add comprehensive documentation for Parallel Anything nodes in ComfyUI, detailing features, installation, usage, performance tips, troubleshooting, architecture, and limitations.
2026-02-02 10:56:22 -06:00
FearL0rd e39e19fc46 initial release 2026-02-02 10:48:52 -06:00