error
ChengsongLu opened this issue · 6 comments
(oms) lcs@lcs:~/oms-Diffusion$ python inference.py --cloth_path assets/t1.png --model_path assets/m1.png
Loading pipeline components...: 100%|█████████████| 5/5 [00:00<00:00, 7.40it/s]
Traceback (most recent call last):
File "/home/lcs/oms-Diffusion/inference.py", line 32, in
full_net = ClothAdapter(pipe, args.model_path, device)
File "/home/lcs/oms-Diffusion/garment_adapter/garment_diffusion.py", line 93, in init
with safe_open(ref_path, framework="pt", device="cpu") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
model_path is checkpoint path,not human path, inference.py only support generating image with the cloth. If you want to fit certain person, please try another controlnet_inpaiting.py
(oms) lcs@lcs:~/oms-Diffusion$ python inference.py --cloth_path assets/t1.png --model_path checkpoints/oms_diffusion_100000.safetensors
Loading pipeline components...: 100%|█████████████████████████████████████████████████████| 5/5 [00:00<00:00, 8.30it/s]
----checkpoints loaded from path: checkpoints/cloth_segm.pth----
/home/lcs/anaconda3/envs/oms/lib/python3.10/site-packages/torch/nn/functional.py:3737: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
100%|███████████████████████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 12.06it/s]
Traceback (most recent call last):
File "/home/lcs/oms-Diffusion/inference.py", line 35, in
image.save(os.path.join(output_path, "out_" + str(i) + ".png"))
AttributeError: 'list' object has no attribute 'save'
sorry for make a stupid mistake. please update the inference.py
It works fine now, thanks. Can you please post a detailed instructions about how to fit a specified person?
It works fine now, thanks. Can you please post a detailed instructions about how to fit a specified person?
Yes, please.
turn to our another project https://github.com/levihsu/OOTDiffusion or find details in controlnet_inpaiting.py, you need to upload a model image and an inpaiting area image like