Why is int8_convrot VAE slower than fp16 VAE?
My PC has an RTX 5090 and 128GB of RAM.
I have tested it multiple times, but in most situations, int8 is similar in performance or slower.
What could be the cause?
My Comfyui environment uses PyTorch version 2.11.0+cu130.
Comfyui is the latest version.
What exactly are you measuring? It will only reduce decode time, not encode or have any effect on sampling times.
Yes, I was talking about the decoding time. Other people using the 5090 like me also say that the decoding time is slightly slower.
It is ~1.5x faster on mine.
My results are in line with Kijai's 1.5x speedup on the Int8 VAE over the FP16.
5090, 2.12.0+cu130, Win11.
it's the single biggest VAE speedup available,
| fp16 | int8_convrot | |
|---|---|---|
| Decode (5s @1344×768) | 19.5s | 10.0s |
| Load | 4.0s | 3.1s |
| File | 4.9 GB | 3.0 GB |
| Quality | ref | 0.97% rel rms (invisible) |
you can test it yourself
import sys
import time
import torch
sys.path.insert(0, "path-to-your/ComfyUI")
from comfy import sd
import comfy.model_management as mm
import comfy.utils
mm.vram_state = mm.VRAMState.NORMAL_VRAM
F16 = "path-to-/minimax_h3_video_vae_fp16.safetensors"
I8 = "path-to-/minimax_h3_video_vae_int8_convrot.safetensors"
torch.manual_seed(7)
z = torch.randn(1, 24, 32, 48, 84) # 5s @1344x768 latent
def run(name, path):
t0 = time.time()
vae_sd, meta = comfy.utils.load_torch_file(path, return_metadata=True)
vae = sd.VAE(sd=vae_sd, metadata=meta)
mm.load_model_gpu(vae.patcher)
t_load = time.time() - t0
t0 = time.time()
with torch.no_grad():
px = vae.decode(z.to("cuda"))
torch.cuda.synchronize()
t_dec = time.time() - t0
nan = torch.isnan(px.float()).any().item()
print(f"{name}: load={t_load:.1f}s decode={t_dec:.2f}s NaN={nan} out={tuple(px.shape)}", flush=True)
mm.unload_model_and_clones(vae.patcher, unload_additional_models=True, all_devices=True)
mm.soft_empty_cache()
return px.float().cpu()
a = run("fp16 ", F16)
b = run("int8_convrot", I8)
rel = ((a - b).norm() / a.norm() * 100).item()
print(f"pixel diff vs fp16: rel rms={rel:.3f}%")
What exactly are you measuring? It will only reduce decode time, not encode or have any effect on sampling times.
I'm not OP but I measure total time. Same prompt, same seed, 2nd generation after a seed change (to make sure the model is fully loaded). It's really po-tay-to po-tah-to for me. Same time as fp16 vae.
It is ~1.5x faster on mine.
are we supposed to use the regular "Load VAE"?
You're right, int8 is definitely faster when run with test code. It seems like there's an issue with my ComfyUI... I'll have to look into what the problem is... Thanks for the test code.
I found out that the GPU utilization is low when using INT8VAE. I don't know why that is...
I found out that the GPU utilization is low when using INT8VAE. I don't know why that is...
how about your cpu, i5?
i9-13900K
i9-13900K
You have great hardware. Maybe this helps: I had problems with ComfyUI dynamic memory management. time to time, I had to restart my pc manually because everything would stay stuck in system RAM.
After lots of back and forth with CUDA, flash-attention, asage nd different Python versions (you name it), I experimented with all of it until Qwen3.6 found out about a bug in my display manager (Wayland). It was causing the GPU to lose contact with the os after waking from sleep or idling. so I think you should look elsewhere not just your hardware or the ComfyUI env
also, Windows Defender is really bad in practice in case you're using windows. The only Windows version that works really well with this kind of hardware and AI is Windows 11 Pro for Workstations. otherwise, Ubuntu is perfect for AI.
i9-13900K
You have great hardware. Maybe this helps: I had problems with ComfyUI dynamic memory management. time to time, I had to restart my pc manually because everything would stay stuck in system RAM.
After lots of back and forth with CUDA, flash-attention, asage nd different Python versions (you name it), I experimented with all of it until Qwen3.6 found out about a bug in my display manager (Wayland). It was causing the GPU to lose contact with the os after waking from sleep or idling. so I think you should look elsewhere not just your hardware or the ComfyUI env
also, Windows Defender is really bad in practice in case you're using windows. The only Windows version that works really well with this kind of hardware and AI is Windows 11 Pro for Workstations. otherwise, Ubuntu is perfect for AI.
Thank you. You are very kind. I will have to check this problem in various ways.