Stability-AI / stablediffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
39.3k stars 5.07k forks source link

ViT-H-14 Model Config missing #3

Closed parshantdeep closed 2 years ago

parshantdeep commented 2 years ago

Model config for ViT-H-14 not found. Probably easily solvable. FIrst issue tho 😁

LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 865.91 M params. making attention of type 'vanilla' with 512 in_channels Working with z of shape (1, 4, 32, 32) = 4096 dimensions. making attention of type 'vanilla' with 512 in_channels ERROR:root:Model config for ViT-H-14 not found; available models ['RN50', 'RN50-quickgelu', 'RN50x4', 'RN50x16', 'RN101', 'RN101-quickgelu', 'timm-efficientnetv2_rw_s', 'timm-resnet50d', 'timm-resnetaa50d', 'timm-resnetblur50', 'timm-swin_base_patch4_window7_224', 'timm-vit_base_patch16_224', 'timm-vit_base_patch32_224', 'timm-vit_small_patch16_224', 'ViT-B-16', 'ViT-B-32', 'ViT-B-32-quickgelu', 'ViT-L-14']. Traceback (most recent call last): File "txt2img.py", line 290, in <module> main(opt) File "txt2img.py", line 191, in main model = load_model_from_config(config, f"{opt.ckpt}") File "txt2img.py", line 35, in load_model_from_config model = instantiate_from_config(config.model) File "/app/stablediffusion/ldm/util.py", line 79, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict())) File "/app/stablediffusion/ldm/models/diffusion/ddpm.py", line 563, in __init__ self.instantiate_cond_stage(cond_stage_config) File "/app/stablediffusion/ldm/models/diffusion/ddpm.py", line 630, in instantiate_cond_stage model = instantiate_from_config(config) File "/app/stablediffusion/ldm/util.py", line 79, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict())) File "/app/stablediffusion/ldm/modules/encoders/modules.py", line 147, in __init__ model, _, _ = open_clip.create_model_and_transforms(arch, device=torch.device('cpu'), pretrained=version) File "/opt/conda/lib/python3.8/site-packages/open_clip/factory.py", line 133, in create_model_and_transforms model = create_model( File "/opt/conda/lib/python3.8/site-packages/open_clip/factory.py", line 83, in create_model raise RuntimeError(f'Model config for {model_name} not found.') RuntimeError: Model config for ViT-H-14 not found.

attashe commented 2 years ago

You need to update open_clip package to version in environment.yaml