ShineChen1024 / MagicClothing

Official implementation of Magic Clothing: Controllable Garment-Driven Image Synthesis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'NoneType' object has no attribute 'to'

mhb11 opened this issue · comments

commented

I ran:
(magicloth) ubuntu@ubuntu-Legion-5-15ARP8:~/Desktop/MagicClothing$ python inference.py --cloth_path input_images/image2.jpg --model_path oms_diffusion_100000.safetensors --output_path output_images/

And I got the following:

Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:02<00:00,  2.11it/s]
----No checkpoints at given path----
Traceback (most recent call last):
  File "/home/hassan/Desktop/MagicClothing/inference.py", line 38, in <module>
    full_net = ClothAdapter(pipe, args.model_path, device, args.enable_cloth_guidance)
  File "/home/hassan/Desktop/MagicClothing/garment_adapter/garment_diffusion.py", line 36, in __init__
    self.set_seg_model()
  File "/home/hassan/Desktop/MagicClothing/garment_adapter/garment_diffusion.py", line 41, in set_seg_model
    self.seg_net = load_seg_model(checkpoint_path, device=self.device)
  File "/home/hassan/Desktop/MagicClothing/garment_seg/process.py", line 96, in load_seg_model
    net = net.to(device)
AttributeError: 'NoneType' object has no attribute 'to'

download the default seg_model in huggingface

seg_model

which one? can you list url or full name clearly?

python gradio_generate.py --model_path "C:/Users/86187/Downloads/cloth_segm.pth"

----raise this error
garment_diffusion.py", line 31, in init
with safe_open(ref_path, framework="pt", device="cpu") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge