Comfy AIMDO (AI Model Dynamic Offloader) is a core utility for ComfyUI, acting as a PyTorch VRAM allocator. It implements on-demand offloading of model weights when the primary PyTorch VRAM allocator comes under pressure, aiming to prevent out-of-memory errors and optimize GPU memory usage for AI models. It is currently at version 0.2.12 and is actively maintained as an integral part of the ComfyUI ecosystem.
pip install comfy-aimdoVerified import paths — ran on the pinned version, not inferred.
Comfy AIMDO is a backend VRAM management solution, not typically used directly by end-user Python scripts. Its functionality is integrated into ComfyUI and activated upon launching ComfyUI, often via the `--enable-dynamic-vram` flag. This quickstart demonstrates how to launch ComfyUI to utilize Comfy AIMDO's features. Replace `COMFYUI_PATH` with your actual ComfyUI installation directory.
Manually install or update `comfy-aimdo` within ComfyUI's Python environment (e.g., `path/to/ComfyUI/venv/bin/python -m pip install --upgrade comfy-aimdo` or `path/to/ComfyUI/python_env/python.exe -m pip install --upgrade comfy-aimdo` for portable Windows versions).
Ensure your PyTorch installation is version 2.8 or newer. Update PyTorch if necessary (e.g., `pip install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu1XX` for CUDA).
If encountering unexpected PyTorch warnings or recompilation loops, temporarily disable dynamic VRAM by removing the `--enable-dynamic-vram` flag when launching ComfyUI to isolate the issue. Consult ComfyUI and PyTorch documentation/issues for specific workarounds or updates.
Open your ComfyUI directory, navigate to your Python environment (e.g., `venv\Scripts` on Windows or `venv/bin` on Linux/macOS), activate it, and then run `pip install comfy-aimdo` or `python.exe -m pip install comfy-aimdo` (for embedded Python environments) to install the missing package.
For Nvidia users, ensure a proper installation and temporarily disable anti-virus software to check for interference. For AMD users, `comfy-aimdo` is not officially supported, so the recommended fix is to disable DynamicVRAM by launching ComfyUI with the command-line argument `--disable-dynamic-vram`.
To resolve this, launch ComfyUI with the `--disable-dynamic-vram` flag to prevent `comfy-aimdo` from hooking into the memory allocation, or consider rolling back to a ComfyUI version where this specific conflict did not occur.
Try rolling back to an older, more stable version of `comfy-aimdo` (e.g., 0.2.9) and ComfyUI (e.g., v0.16.0), or explicitly disable dynamic VRAM management by using the `--disable-dynamic-vram` or `--disable-async-offload` command-line flags when launching ComfyUI. Adjusting model precision might also help.