Open zachysaur opened 4 weeks ago
Same problem
model_path is our Magic clothing safetensor
Okay I will try but model file is large. Do you have a lighter model?
I put cloth_segm.pth and magic_clothing_768_vitonhd_joint.safetensors files in checkpoints folder and Got following error when I execute inference command:
>>> python inference.py --cloth_path images/a0.jpg --model_path D:/MagicClothing/checkpoints
Loading pipeline components...: 100%|██████████████████████████████████████████████| 5/5 [00:00<00:00, 5.22it/s]
args.model_path: D:/MagicClothing/checkpoints
Traceback (most recent call last):
File "inference.py", line 40, in <module>
full_net = ClothAdapter(pipe, args.model_path, device, args.enable_cloth_guidance, False)
File "D:\MagicClothing\garment_adapter\garment_diffusion.py", line 31, in __init__
with safe_open(ref_path, framework="pt", device="cpu") as f:
FileNotFoundError: No such file or directory: "D:/MagicClothing/checkpoints"
--model_path D:/MagicClothing/checkpoints/magic_clothing_768_vitonhd_joint.safetensors
I tried to run:
python3 inference.py --cloth_path ./images/c0.jpg --model_path ./checkpoints/magic_clothing_768_vitonhd_joint.safetensors
And I get error:
Traceback (most recent call last):
File "/home/user/MagicClothing/inference.py", line 38, in <module>
full_net = ClothAdapter(pipe, args.model_path, device, args.enable_cloth_guidance, False)
File "/home/user/MagicClothing/garment_adapter/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
I fixed this error for myself. The reason was that I downloaded the checkpoints incorrectly using wget. You can verify this by checking how much memory the file takes up
(magicloth) F:\MagicClothing-main>python gradio_generate.py --model_path "F:\MagicClothing-main\checkpoints\ipadapter_faceid\ip-adapter-faceid_sd15.bin" Loading pipeline components...: 100%|██████████████████████████████████| 5/5 [00:00<00:00, 6.47it/s] Traceback (most recent call last): File "F:\MagicClothing-main\gradio_generate.py", line 25, in
full_net = ClothAdapter(pipe, args.model_path, device, args.enable_cloth_guidance)
File "F:\MagicClothing-main\garment_adapter\garment_diffusion.py", line 28, in init
with safe_open(ref_path, framework="pt", device="cpu") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
(magicloth) F:\MagicClothing-main>