THUDM / Inf-DiT

Official implementation of Inf-DiT: Upsampling Any-Resolution Image with Memory-Efficient Diffusion Transformer
Apache License 2.0
358 stars 17 forks source link

RuntimeError: Pretrained weights (datacomp_xl_s13b_b90k) not found for model ViT-L-14. #10

Open Deep-imagelab opened 2 months ago

Deep-imagelab commented 2 months ago

The following error occurs when running "bash generate_sr_big_cli.sh".

Traceback (most recent call last): File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/generate_t2i_sr.py", line 210, in main(args) File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/generate_t2i_sr.py", line 112, in main net = get_model(args, DiffusionEngine).to(device) File "/opt/conda/lib/python3.10/site-packages/sat/model/base_model.py", line 412, in get_model model = model_cls(args, params_dtype=params_dtype, kwargs) File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/dit/model.py", line 475, in init self._build_modules(args, module_configs) File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/dit/model.py", line 528, in _build_modules self.image_encoder = instantiate_from_config(image_encoder_config) File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/dit/utils.py", line 39, in instantiate_from_config return get_obj_from_str(config["target"])(config.get("params", kwargs)) File "/home/notebook/code/personal/80402852/ProjectLivehouse/Inf-DiT/dit/encoders.py", line 256, in init model, _, preprocess = open_clip.create_model_and_transforms( File "/opt/conda/lib/python3.10/site-packages/open_clip/factory.py", line 151, in create_model_and_transforms model = create_model( File "/opt/conda/lib/python3.10/site-packages/open_clip/factory.py", line 122, in create_model raise RuntimeError(f'Pretrained weights ({pretrained}) not found for model {model_name}.') RuntimeError: Pretrained weights (datacomp_xl_s13b_b90k) not found for model ViT-L-14. DONE on task-20240614094613-21570

yzy-thu commented 2 months ago

Looks like an openclip issue. Try to update open_clip to the latest version ? pip install -U open_clip_torch

Deep-imagelab commented 2 months ago

I tried to install the environment according to requirement.txt, but there are still new problems:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /laion/CLIP-ViT-L-14-DataComp.XL-s13B-b90K/resolve/main/open_clip_pytorch_model.bin (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7efde61882e0>, 'Connection to huggingface.co timed out. (connect timeout=10)'))

yzy-thu commented 2 months ago

It seems your network issue.