NVIDIA / NVIDIA/TensorRT

The VAE model of SDXL, after being compiled with TensorRT, shows that VAE requires 12GB of GPU memory when loaded

Open
#3,749 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

I saw that in the official demo of SDXL, VAE was not compiled. However, when I converted VAE to plan format, the size was 98.22MB. But after loading VAE and using device_memory_size to check the VRAM usage, it showed 12079599616 bytes, which means I don't have enough VRAM to load the entire model.

Environment

TensorRT Version:9.2/9.3

NVIDIA GPU:RTX 4080

NVIDIA Driver Version:535.161.07

CUDA Version:12.2

CUDNN Version:

Operating System:Ubuntu 22.04.3 LTS

Python Version (if applicable):3.10

Tensorflow Version (if applicable):

PyTorch Version (if applicable):2.1.0

Baremetal or Container (if so, version):

Relevant Files

Model link:https://huggingface.co/stabilityai/stable-diffusion-xl-1.0-tensorrt

Steps To Reproduce

Commands or scripts:

Have you tried the latest release?:Yes

Can this model run on other frameworks? For example run ONNX model with ONNXRuntime (polygraphy run <model.onnx> --onnxrt):

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the linked stable-diffusion-xl-1.0-tensorrt model and inspect the VAE plan's device_memory_size against its 98.22MB file size. Check whether the reported 12GB allocation is expected for the RTX 4080 setup and TensorRT 9.2/9.3. Done means explaining the discrepancy or identifying a fix for the excessive allocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.