OpenTexture / Paint3D

[CVPR 2024] Paint3D: Paint Anything 3D with Lighting-Less Texture Diffusion Models, a no lighting baked texture generative model
https://paint3d.github.io/
Apache License 2.0
672 stars 29 forks source link

OSError: h94/IP-Adapter does not appear to have a file named models\image_encoder\config.json #30

Open knuthnads opened 4 weeks ago

knuthnads commented 4 weeks ago

This is a fresh install.

I tried generating the coarse texture by running:

python pipeline_paint3d_stage1.py --sd_config controlnet/config/depth_based_inpaint_template.yaml --render_config paint3d/config/train_config_paint3d.py --mesh_path demo/objs/Suzanne_monkey/Suzanne_monkey.obj --prompt " " --ip_adapter_image_path demo/objs/Suzanne_monkey/img_prompt.png --outdir outputs/img_stage1

This resulted in the following error:

Traceback (most recent call last):
  File "pipeline_paint3d_stage1.py", line 287, in <module>
    main()
  File "pipeline_paint3d_stage1.py", line 195, in main
    depth_cnet = txt2imgControlNet(sd_cfg.txt2img)
  File "D:\Projects\Python\Paint3D\controlnet\diffusers_cnet_txt2img.py", line 20, in __init__
    pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter_sd15.safetensors")
  File "D:\anaconda3\envs\paint3d\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "D:\anaconda3\envs\paint3d\lib\site-packages\diffusers\loaders\ip_adapter.py", line 139, in load_ip_adapter
    image_encoder = CLIPVisionModelWithProjection.from_pretrained(
  File "D:\anaconda3\envs\paint3d\lib\site-packages\transformers\modeling_utils.py", line 2175, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "D:\anaconda3\envs\paint3d\lib\site-packages\transformers\models\clip\configuration_clip.py", line 233, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "D:\anaconda3\envs\paint3d\lib\site-packages\transformers\configuration_utils.py", line 573, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "D:\anaconda3\envs\paint3d\lib\site-packages\transformers\configuration_utils.py", line 628, in _get_config_dict
    resolved_config_file = cached_file(
  File "D:\anaconda3\envs\paint3d\lib\site-packages\transformers\utils\hub.py", line 454, in cached_file
    raise EnvironmentError(
OSError: h94/IP-Adapter does not appear to have a file named models\image_encoder\config.json. Checkout 'https://huggingface.co/h94/IP-Adapter/main' for available files.

Is it no longer possible to acquire the files that Paint3D needs to function?

michisaurio commented 4 days ago

Hi! I have exactly the same problem, but have not been able to solve it. The config.json file can be reached at https://huggingface.co/h94/IP-Adapter/tree/main/models/image_encoder. It seems that the "tree" subdirectory is somehow missing. However, I have not figured out how to modify the source code if this is the case. Maybe somebody else can share their solutions. Best,