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
26.34k stars 5.42k forks source link

Documentation about superresolution #9566

Open christopher5106 opened 1 month ago

christopher5106 commented 1 month ago

Describe the bug

Reading this documentation which is not possible. Indeed, super resolution pipeline works with an image as input in the image input parameter. So it's not possible to use output_type="latent" for image_2. Otherwise you'll get an error : ValueError: Incorrect configuration settings! The config of pipeline.unet expects 7 but received num_channels_latents: 4 + num_channels_image: 4 = 8. Please verify the config of pipeline.unet or your image input. Because it's placing a latent instead of an image.

Please also note that "variant="fp16" does not work for stabilityai/sd-x2-latent-upscaler" for me. The error message I get is :

ValueError: The deprecation tuple ('no variant default', '0.24.0', "You are trying to load the model files of the `variant=fp16`, but no such modeling files are available.The default model files: {'unet/diffusion_pytorch_model.bin', 'text_encoder/pytorch_model.bin', 'text_encoder/model.safetensors', 'vae/diffusion_pytorch_model.safetensors', 'vae/diffusion_pytorch_model.bin', 'unet/diffusion_pytorch_model.safetensors'} will be loaded instead. Make sure to not load from `variant=fp16`if such variant modeling files are not available. Doing so will lead to an error in v0.24.0 as defaulting to non-variantmodeling files is deprecated.") should be removed since diffusers' version 0.30.3 is >= 0.24.0

Reproduction

simple snippet of code

Logs

No response

System Info

ubuntu

Who can help?

@yiyixuxu @asomoza

asomoza commented 1 month ago

Hi, thanks for reporting, since you found the errors, are you interested in opening a PR to fix it?

cc @stevhliu

christopher5106 commented 1 month ago

The process of PR is a bit heavy. I have to do it with a fork. But I already have a fork that I use for something else, I commited on the main branch of my fork... Github doesn't allow me to create multiple fork, or to create PR from something else than a fork. Sorry

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.