LTX 2.3 FP8/Q4KM stalls during `Requested to load LTXAV` on RX 7900 XTX + ROCm unless dynamic VRAM / pinned memory / async offload are disabled
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
## LTX 2.3 FP8/Q4KM stalls during `Requested to load LTXAV` on RX 7900 XTX + ROCm unless dynamic VRAM / pinned memory / async offload are disabled
### Summary
LTX 2.3 FP8/Q4KM does not reliably load on my AMD/ROCm setup unless I use a fairly specific set of workaround flags. The failure happens during model loading, not during sampling.
The terminal reaches:
```text
Requested to load LTXAV
Unloaded partially: 14790.03 MB freed, 8.44 MB remains loaded, 5761.41 MB buffer reserved, lowvram patches: 0
```
Then ComfyUI can hang indefinitely. In worse cases, RAM, VRAM, and swap fill up until Linux becomes unresponsive.
This seems unexpected for this hardware. The same LTX 2.3 FP8/GGUF workflows/models reportedly work for people with weaker systems.
### System
- OS: Ubuntu Linux
- Python: 3.13
- ROCm: 7.2
- GPU: AMD Radeon RX 7900 XTX, 24 GB VRAM, RDNA3 / gfx1100
- CPU: Ryzen 7 7800X3D
- RAM: 32 GB
- Launcher: Comfy CLI
- Models affected:
- LTX 2.3 FP8/GGUF
- Similar behavior also seen with larger Wan 2.2 quantized models
### Expected behavior
LTX 2.3 FP8/GGUF should load and run on a 24 GB VRAM RX 7900 XTX, possibly with some offloading, but without filling all system RAM/swap or hanging the system.
### Actual behavior
Without workaround flags, ComfyUI often stalls during model loading.
Relevant log excerpt:
```text
got prompt
VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load VideoVAE
loaded completely; 19356.80 MB usable, 1384.94 MB loaded, full load: True
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load LTXAVTEModel_
loaded completely; 16798.44 MB usable, 14790.03 MB loaded, full load: True
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
gguf qtypes: F32 (2672), BF16 (28), Q4_K (1268), Q6_K (368), Q5_K (108)
model weight dtype torch.bfloat16, manual cast: None
model_type FLUX
Requested to load LTXAV
Unloaded partially: 14790.03 MB freed, 8.44 MB remains loaded, 5761.41 MB buffer reserved, lowvram patches: 0
```
After this point, ComfyUI can become stale/hung. In some runs, system RAM, VRAM, and swap continue filling until the Linux desktop freezes.
### Reproduction
1. Use Ubuntu + ROCm 7.2 + Python 3.13 on RX 7900 XTX.
2. Install/run ComfyUI through Comfy CLI.
3. Load the official or common LTX 2.3 FP8/GGUF workflow.
4. Queue a prompt.
5. Observe the terminal during `Requested to load LTXAV`.
The issue appears during the LTXAV model load/offload transition, after the text encoder has loaded and ComfyUI tries to free it.
### Workaround that makes it run
The model starts working for me with this launch config:
```bash
unset HIP_HIDDEN_FREE_MEM
export COMFYUI_ENABLE_MIOPEN=0
export MIOPEN_FIND_MODE=FAST
export PYTORCH_ALLOC_CONF="expandable_segments:True,garbage_collection_threshold:0.75,max_split_size_mb:512"
export PYTORCH_CUDA_ALLOC_CONF="$PYTORCH_ALLOC_CONF"
export PYTORCH_HIP_ALLOC_CONF="$PYTORCH_ALLOC_CONF"
comfy launch -- \
--use-quad-cross-attention \
--disable-pinned-memory \
--disable-async-offload \
--reserve-vram 0.5 \
--cache-none \
--disable-api-nodes \
--disable-dynamic-vram
```
Without this config and a clean `comfy launch` it always crashes with OOMs.
Important notes:
- `--disable-pinned-memory` seems important.
- `--disable-async-offload` seems important.
- `--disable-dynamic-vram` seems important.
- Hiding VRAM with `HIP_HIDDEN_FREE_MEM` made things worse in my case.
- Lowering `--reserve-vram` to `0.5` helped compared to more conservative values.
- The issue seems related to model loading/offloading/memory accounting rather than actual inference capacity.
### Why I think this is a ComfyUI/ROCm memory management issue
The failure happens before sampling, at:
```text
Requested to load LTXAV
```
ComfyUI then unloads the text encoder and reserves a large buffer, but the actual model load can stall. **The machine has enough VRAM for the FP8/GGUF quantized model in principle, and the workflow works once ComfyUI is forced into a different memory-management path.**
This looks like an interaction between AMD/ROCm, dynamic VRAM, pinned memory, async offload, and large LTX/Wan video model loading.
Right now on quite capable hardware we are running in a situation when comfy tries to do some smart memory management that fails in a dumb way. I don't want it to do all the partial loads unloads and maxing out RAM and SWAP, when it just has to unload unused models fully and do a full load on models that are used at the moment.
Clean `comfy launch` run with no extra params just runs stale when trying to load LTX, maxing out 32gb of ram and spilling over 10gb to swap and growing. While VRAM is at about 65% and not growing.
**All of these "optimizations" are messing with AMD cards.**
LTX2.3 fp8 flawlessly works on 3090 machine taking 3.5 minutes for 5 second 720p video.
On amd you need to spend days to make even q4km quant work at all. And it only works when a model is small enough to do a full load.
**Ready to contribute a PR if discussion leads anywhere**
Contributor guide
Assessment
This issue has not been assessed yet.