* feature: Set the Ascend NPU to use a single one
* Enable the `--cuda-device` parameter to support both CUDA and Ascend NPUs simultaneously.
* Make the code just set the ASCENT_RT_VISIBLE_DEVICES environment variable without any other edits to master branch
---------
Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
* flux: math: Use _addcmul to avoid expensive VRAM intermediate
The rope process can be the VRAM peak and this intermediate
for the addition result before releasing the original can OOM.
addcmul_ it.
* wan: Delete the self attention before cross attention
This saves VRAM when the cross attention and FFN are in play as the
VRAM peak.
Adds installed and required workflow templates version information to the
/system_stats endpoint, allowing the frontend to detect and notify users
when their templates package is outdated.
- Add get_installed_templates_version() and get_required_templates_version()
methods to FrontendManager
- Include templates version info in system_stats response
- Add comprehensive unit tests for the new functionality
Disables torch.backends.cudnn.benchmark on Python 3.12 to prevent
severe VRAM allocation spikes that occur during model operations.
The CUDNN benchmarking feature, introduced in v0.3.57 (commit e2d1e5da),
tests multiple convolution algorithms and allocates temporary VRAM.
This interacts poorly with Python 3.12's garbage collection behavior,
causing multi-GB VRAM spikes before and after model inference.
Solution:
- Preserves CUDNN benchmarking performance benefit on other Python versions
- Only disables the problematic behavior on Python 3.12
- Maintains full functionality while fixing memory management issues
- No impact on users not using --fast autotune flag
Tested with TTS model wrappers that reproduce the issue consistently
on Python 3.12 with ComfyUI v0.3.57+.
Fixes: VRAM spikes in Python 3.12 environments
Related: ComfyUI v0.3.57 regression affecting model memory management