yisol / IDM-VTON

IDM-VTON : Improving Diffusion Models for Authentic Virtual Try-on in the Wild
https://idm-vton.github.io/
3.04k stars 461 forks source link

Model not found when run gradio app #75

Closed ipfans closed 1 month ago

ipfans commented 1 month ago

I followed the README file steps for testing IDM-VTON, but after the installation was complete I found an error executing the command:

> python gradio_demo/app.py
/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
unet/config.json: 100%|██████████████████████████████████████████████████████████████| 1.94k/1.94k [00:00<00:00, 8.73MB/s]
diffusion_pytorch_model.bin: 100%|███████████████████████████████████████████████████| 12.0G/12.0G [03:22<00:00, 59.1MB/s]
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.
tokenizer/tokenizer_config.json: 100%|███████████████████████████████████████████████████| 737/737 [00:00<00:00, 5.41MB/s]
tokenizer/vocab.json: 100%|██████████████████████████████████████████████████████████| 1.06M/1.06M [00:00<00:00, 13.1MB/s]
tokenizer/merges.txt: 100%|████████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 3.55MB/s]
tokenizer/special_tokens_map.json: 100%|█████████████████████████████████████████████████| 472/472 [00:00<00:00, 2.63MB/s]
tokenizer_2/tokenizer_config.json: 100%|█████████████████████████████████████████████████| 725/725 [00:00<00:00, 3.44MB/s]
tokenizer_2/special_tokens_map.json: 100%|███████████████████████████████████████████████| 460/460 [00:00<00:00, 2.55MB/s]
scheduler/scheduler_config.json: 100%|███████████████████████████████████████████████████| 504/504 [00:00<00:00, 2.57MB/s]
text_encoder/config.json: 100%|██████████████████████████████████████████████████████████| 746/746 [00:00<00:00, 3.42MB/s]
model.safetensors: 100%|███████████████████████████████████████████████████████████████| 492M/492M [00:15<00:00, 32.8MB/s]
text_encoder_2/config.json: 100%|████████████████████████████████████████████████████████| 758/758 [00:00<00:00, 6.87MB/s]
model.safetensors: 100%|█████████████████████████████████████████████████████████████| 2.78G/2.78G [01:07<00:00, 40.9MB/s]
image_encoder/config.json: 100%|█████████████████████████████████████████████████████████| 560/560 [00:00<00:00, 3.37MB/s]
model.safetensors: 100%|█████████████████████████████████████████████████████████████| 2.53G/2.53G [00:50<00:00, 50.5MB/s]
vae/config.json: 100%|███████████████████████████████████████████████████████████████████| 659/659 [00:00<00:00, 2.52MB/s]
diffusion_pytorch_model.safetensors: 100%|█████████████████████████████████████████████| 335M/335M [00:06<00:00, 53.2MB/s]
unet_encoder/config.json: 100%|██████████████████████████████████████████████████████| 1.64k/1.64k [00:00<00:00, 9.95MB/s]
diffusion_pytorch_model.safetensors:  71%|██████████████████████████████▋            | 7.32G/10.3G [02:48<01:08, 43.3MB/s]
Traceback (most recent call last):
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 304, in hf_raise_for_status
    response.raise_for_status()
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/yisol/IDM-VTON/resolve/585a32e74aee241cbc0d0cc3ab21392ca58c916a/unet_encoder/diffusion_pytorch_model.bin

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/diffusers/utils/hub_utils.py", line 308, in _get_model_file
    model_file = hf_hub_download(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1221, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1282, in _hf_hub_download_to_cache_dir
    (url_to_download, etag, commit_hash, expected_size, head_call_error) = _get_metadata_or_catch_error(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1722, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(url=url, proxies=proxies, timeout=etag_timeout, headers=headers)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1645, in get_hf_file_metadata
    r = _request_wrapper(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 372, in _request_wrapper
    response = _request_wrapper(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 396, in _request_wrapper
    hf_raise_for_status(response)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 315, in hf_raise_for_status
    raise EntryNotFoundError(message, response) from e
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-66554bd1-084a09706604c0ba2b54fbbf;0fc1b505-3924-4f3d-be60-e0b7090bb08f)

Entry Not Found for url: https://huggingface.co/yisol/IDM-VTON/resolve/585a32e74aee241cbc0d0cc3ab21392ca58c916a/unet_encoder/diffusion_pytorch_model.bin.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/IDM-VTON/gradio_demo/app.py", line 89, in <module>
    UNet_Encoder = UNet2DConditionModel_ref.from_pretrained(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 777, in from_pretrained
    model_file = _get_model_file(
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/workspace/miniconda3/envs/idm/lib/python3.10/site-packages/diffusers/utils/hub_utils.py", line 337, in _get_model_file
    raise EnvironmentError(
OSError: yisol/IDM-VTON does not appear to have a file named diffusion_pytorch_model.bin.

I saw that in Huggingface's repo https://huggingface.co/yisol/IDM-VTON/tree/main/unet_encoder only the safetensors file exists but the bin file does not exist.

ipfans commented 1 month ago

nvm, disk have no space left :(