AiuniAI / Unique3D

[NeurIPS 2024] Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image
https://wukailu.github.io/Unique3D/
MIT License
3.11k stars 246 forks source link

Unable to download ./ckpt/img2mvimg #37

Closed GrantRVD closed 4 months ago

GrantRVD commented 5 months ago

My terminal appears unable to run the local version of the gradio app (python app/gradio_local.py --port 7860) because it's unable to find one of the checkpoint files. I've tried using both https://hf-mirror.com and https://huggingface.co as the HF_ENDPOINT without success. The error returned is shown below

Warning:
Unable to load the following plugins:

        libio_e57.so: libio_e57.so does not seem to be a Qt Plugin.

Cannot load library /root/miniconda3/envs/unique3d/lib/python3.11/site-packages/pymeshlab/lib/plugins/libio_e57.so: (/lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0)

Warning! extra parameter in cli is not verified, may cause erros.
Traceback (most recent call last):
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/diffusers/configuration_utils.py", line 380, in load_config
    config_file = hf_hub_download(
                  ^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 106, in _inner_fn
    validate_repo_id(arg_value)
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 154, in validate_repo_id
    raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './ckpt/img2mvimg'. Use `repo_type` argument if needed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/app/gradio_local.py", line 20, in <module>
    from app.gradio_3dgen import create_ui as create_3d_ui
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/app/gradio_3dgen.py", line 6, in <module>
    from app.custom_models.mvimg_prediction import run_mvprediction
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/app/custom_models/mvimg_prediction.py", line 14, in <module>
    trainer, pipeline = load_pipeline(training_config, checkpoint_path)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/app/custom_models/utils.py", line 56, in load_pipeline
    trainers, configurable_unet = init_trainers(training_config, weight_dtype, extras)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/app/custom_models/utils.py", line 21, in init_trainers
    configurable_unet = ConfigurableUNet2DConditionModel(init_config, weight_dtype)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/custum_3d_diffusion/custum_modules/unifield_processor.py", line 142, in __init__
    self.set_config(init_config)
  File "/mnt/c/Users/thoug/Documents/projects/Unique3D/custum_3d_diffusion/custum_modules/unifield_processor.py", line 205, in set_config
    self.unet: UnifieldWrappedUNet = unet_type.from_pretrained(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/diffusers/models/modeling_utils.py", line 567, in from_pretrained
    config, unused_kwargs, commit_hash = cls.load_config(
                                         ^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/unique3d/lib/python3.11/site-packages/diffusers/configuration_utils.py", line 415, in load_config
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like ./ckpt/img2mvimg is not the path to a directory containing a config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.

Is there a way to use huggingface_cli to download the checkpoint so the app will run correctly? Thanks in advance for your help! The demo online is spectacular.

jtydhr88 commented 5 months ago

hi, according to README,

Download the weights from [huggingface spaces](https://huggingface.co/spaces/Wuvin/Unique3D/tree/main/ckpt) or [Tsinghua Cloud Drive](https://cloud.tsinghua.edu.cn/d/319762ec478d46c8bdf7/), and extract it to ckpt/*

we need to download them manually.