CUDA out of memory. 运行run_ootd.py, 24G显存,samples=1,爆显存了,这个脚本需要多大的显卡支持?

#2
by HUG-NAN - opened

运行run_ootd.py,设置了sample=1,两张图片都是example里提供的,用24g显存的卡,还提示爆显存了,想问下这个脚本,需要多大的显卡才能支持?我这边有个警告是xformers不可用,是跟这个有关系吗?

Owner

sample=1只需要7GB以内显存 即使=6也只需要20GB左右 请参考github readme核对环境版本

(ootd) root@b9ca6fbb6265:/ffusion/OOTDiffusion/run# python gradio_ootd.py
Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:01<00:00, 5.60it/s]
text_config_dict is provided which will be used to initialize CLIPTextConfig. The value text_config["id2label"] will be overriden.
text_config_dict is provided which will be used to initialize CLIPTextConfig. The value text_config["bos_token_id"] will be overriden.
text_config_dict is provided which will be used to initialize CLIPTextConfig. The value text_config["eos_token_id"] will be overriden.
Traceback (most recent call last):
File "/ffusion/OOTDiffusion/run/gradio_ootd.py", line 22, in
ootd_model_hd = OOTDiffusionHD(0)
File "/ffusion/OOTDiffusion/ootd/inference_ootd_hd.py", line 71, in init
self.image_encoder = CLIPVisionModelWithProjection.from_pretrained(VIT_PATH).to(self.gpu_id)
File "/root/miniconda3/envs/ootd/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3371, in from_pretrained
with safe_open(resolved_archive_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
错误需要怎么解决呢

levihsu changed discussion status to closed

Sign up or log in to comment