SUPIR
SUPIR copied to clipboard
windows系统部署的一些问题
之前折腾过一次,模型就下了半天时间。总共花了一天时间都没搞定,各种报错。
今天突然想起来又折腾了一下午 所有报错解决了,但这加载模型都用了半个小时,而且没进webui显存就被占用完了,最高直接用到30G显存。 眼看就要看到光明了,结果报错了,显存不足。。。 这个项目是不是不适合win系统? win用户准备尝试的,建议慎重考虑,浪费时间不说,最后可能一场空。 后期作者有对win做优化的考虑吗?
Loaded model config from [options/SUPIR_v0.yaml]
Loaded state_dict from [./ckpts/sd_xl_base_1.0_0.9vae.safetensors]
Loaded state_dict from [./ckpts/SUPIR-v0Q.ckpt]
Loading vision tower: openai/clip-vit-large-patch14-336
Loading checkpoint shards: 33%|██████████████████▋ | 1/3 [07:14<14:28, 434.29s/it]
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ E:\python\SUPIR\gradio_demo.py:56 in accelerate
│
│ ❱ 698 │ │ │ set_module_tensor_to_device(model, param_name, param_device, **set_module_kw │
│ 699 │ │ else: │
│ 700 │ │ │ if param.dtype == torch.int8 and param_name.replace("weight", "SCB") in stat │
│ 701 │ │ │ │ fp16_statistics = state_dict[param_name.replace("weight", "SCB")] │
│ │
│ D:\anaconda3\envs\supir\lib\site-packages\accelerate\utils\modeling.py:149 in │
│ set_module_tensor_to_device │
│ │
│ 146 │ │ if value is None: │
│ 147 │ │ │ new_value = old_value.to(device) │
│ 148 │ │ elif isinstance(value, torch.Tensor): │
│ ❱ 149 │ │ │ new_value = value.to(device) │
│ 150 │ │ else: │
│ 151 │ │ │ new_value = torch.tensor(value, device=device) │
│ 152 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
OutOfMemoryError: CUDA out of memory. Tried to allocate 50.00 MiB. GPU 0 has a total capacty of 15.99 GiB of which 0
bytes is free. Of the allocated memory 29.82 GiB is allocated by PyTorch, and 448.63 MiB is reserved by PyTorch but
unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See
documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF