huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
25.83k stars 5.32k forks source link

Overflow error when using a pretrained repo locally #9532

Open levoz92 opened 1 month ago

levoz92 commented 1 month ago

Describe the bug

Hi.

Whenever I try to load a model repo locally, I get this following error:

OverflowError: cannot fit 'int' into an index-sized integer

Not exclusive to this because I did get this error before but now I'm getting it for the RealVisXL_V4.0_inpainting. However, when I try to pull the model directly from huggingface, I no longer have this error:

Reproduction

pipe_2 = 'OzzyGT/RealVisXL_V4.0_inpainting'

pipeline_2 = StableDiffusionXLInpaintPipeline.from_pretrained(pipe_2,
                                                              torch_dtype = torch.float16,
                                                              variant = "fp16",
                                                              denoising_end=high_noise_frac,
                                                              vae = vae).to(DEVICE)

Logs

No response

System Info

Latest diffusers built from source

Who can help?

No response

asomoza commented 1 month ago

Him you need to post more details of your environment, also a fully reproducible snippet that can reproduce the error, since the model is local you can just tell me which one to download, in your example is the inpaint one so no need if that's the model that produces the error.

I load a ton of times models locally so my initial guess is that something is wrong with your environment.

Also, why are you passing denoising_end=high_noise_frac to the from_pretrained?

levoz92 commented 4 weeks ago

I am using Colab.

I downloaded this exact same repo, with its exact same folder structure. Everything is organized the same way. That was suggested to use a refiner, which I didn't include in this snippet.

asomoza commented 4 weeks ago

That should make it easier to check if you can share a colab that fails.

yangruigames commented 2 days ago

@levoz92 Hello, has this problem been resolved? How was it resolved? :)