issues in execution
python gradio_demo/app.py
An error occurred while trying to fetch yisol/IDM-VTON: yisol/IDM-VTON does not appear to have a file named diffusion_pytorch_model.safetensors.
Defaulting to unsafe serialization. Pass allow_pickle=False to raise an error instead.
The config attributes {'decay': 0.9999, 'inv_gamma': 1.0, 'min_decay': 0.0, 'optimization_step': 37000, 'power': 0.6666666666666666, 'update_after_step': 0, 'use_ema_warmup': False} were passed to UNet2DConditionModel, but are not expected and will be ignored. Please verify your config.json configuration file.
Some weights of the model checkpoint were not used when initializing UNet2DConditionModel:
['add_embedding.linear_1.bias, add_embedding.linear_1.weight, add_embedding.linear_2.bias, add_embedding.linear_2.weight']
Traceback (most recent call last):
File ".\IDM-VTON-main\gradio_demo\app.py", line 95, in
model is corrupted use this code to download ckpt.create in root folder:
import os
import requests
# Create the required folder structure
folders = [
"ckpt/densepose",
"ckpt/humanparsing",
"ckpt/openpose/ckpts"
]
for folder in folders:
os.makedirs(folder, exist_ok=True)
# URLs of the files to be downloaded
files = {
"ckpt/humanparsing/parsing_atr.onnx": "https://huggingface.co/yisol/IDM-VTON/resolve/main/humanparsing/parsing_atr.onnx",
"ckpt/humanparsing/parsing_lip.onnx": "https://huggingface.co/yisol/IDM-VTON/resolve/main/humanparsing/parsing_lip.onnx",
"ckpt/densepose/model_final_162be9.pkl": "https://huggingface.co/yisol/IDM-VTON/resolve/main/densepose/model_final_162be9.pkl",
"ckpt/openpose/ckpts/body_pose_model.pth": "https://huggingface.co/yisol/IDM-VTON/resolve/main/openpose/ckpts/body_pose_model.pth"
}
# Function to download files
def download_file(url, path):
response = requests.get(url, stream=True)
with open(path, 'wb') as file:
for chunk in response.iter_content(chunk_size=8192):
if chunk:
file.write(chunk)
print(f"Downloaded: {path}")
# Download each file
for path, url in files.items():
download_file(url, path)
print("Download and folder setup completed successfully.")
model is corrupted use this code to download ckpt.create in root folder:
import os import requests
Create the required folder structure
folders = [ "ckpt/densepose", "ckpt/humanparsing", "ckpt/openpose/ckpts" ]
for folder in folders: os.makedirs(folder, exist_ok=True)
URLs of the files to be downloaded
files = { "ckpt/humanparsing/parsing_atr.onnx": "https://huggingface.co/yisol/IDM-VTON/resolve/main/humanparsing/parsing_atr.onnx", "ckpt/humanparsing/parsing_lip.onnx": "https://huggingface.co/yisol/IDM-VTON/resolve/main/humanparsing/parsing_lip.onnx", "ckpt/densepose/model_final_162be9.pkl": "https://huggingface.co/yisol/IDM-VTON/resolve/main/densepose/model_final_162be9.pkl", "ckpt/openpose/ckpts/body_pose_model.pth": "https://huggingface.co/yisol/IDM-VTON/resolve/main/openpose/ckpts/body_pose_model.pth" }
Function to download files
def download_file(url, path): response = requests.get(url, stream=True) with open(path, 'wb') as file: for chunk in response.iter_content(chunk_size=8192): if chunk: file.write(chunk) print(f"Downloaded: {path}")
Download each file
for path, url in files.items(): download_file(url, path)
print("Download and folder setup completed successfully.")
Works for me! Thank you.