diffusion-e2e-ft icon indicating copy to clipboard operation
diffusion-e2e-ft copied to clipboard

Error: Missing unet/geowizard.models.unet_2d_condition.py in GonzaloMG/geowizard-e2e-ft Model

Open xingchen2022 opened this issue 1 year ago • 1 comments

Thank you for your excellent work! While testing the geowizard-e2e-ft model to predict normal using the code below, I encountered an issue:

from diffusers import DiffusionPipeline
import diffusers

image = diffusers.utils.load_image("https://gonzalomartingarcia.github.io/diffusion-e2e-ft/static/lego.jpg")

pipe = DiffusionPipeline.from_pretrained("GonzaloMG/geowizard-e2e-ft",custom_pipeline="GonzaloMG/marigold-e2e-ft-normals",).to("cuda")
normals = pipe(image)
pipe.image_processor.visualize_normals(normals.prediction)[0].save("normals.png")

However, running this code produces the following error:

Traceback (most recent call last):
  File "/data/xc/StableNormal/finetune_geowizard.py", line 17, in <module>
    pipe = DiffusionPipeline.from_pretrained(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bit901/anaconda3/envs/stableNormal/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/bit901/anaconda3/envs/stableNormal/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 702, in from_pretrained
    cached_folder = cls.download(
                    ^^^^^^^^^^^^^
  File "/home/bit901/anaconda3/envs/stableNormal/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/bit901/anaconda3/envs/stableNormal/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 1344, in download
    raise ValueError(
ValueError: unet/geowizard.models.unet_2d_condition.py as defined in `model_index.json` does not exist in GonzaloMG/geowizard-e2e-ft and is not a module in 'diffusers/pipelines'.

Could you please provide some guidance on resolving this issue? Thank you so much for your help!

xingchen2022 avatar Dec 24 '24 19:12 xingchen2022

Hi,

Thank you for your kind words about our work!

The custom_pipeline method for quick-start inference is currently only implemented for the Marigold and Stable Diffusion model checkpoints, which generate either normals or depth maps. To use the GeoWizard models, including our E2E fine-tuned checkpoint, please follow the inference code provided in the GitHub repository README.

We recognize the value of having a DiffusionPipeline integration for GeoWizard models and will explore the possibility of implementing this in the future. In the meantime, we recommend using the documented standard inference approach.

Regards.

GonzaloMartinGarcia avatar Dec 29 '24 19:12 GonzaloMartinGarcia