Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugging face API in the readme needs to be updated. #30

Open
zzzc18 opened this issue Mar 10, 2023 · 1 comment
Open

Hugging face API in the readme needs to be updated. #30

zzzc18 opened this issue Mar 10, 2023 · 1 comment

Comments

@zzzc18
Copy link

zzzc18 commented Mar 10, 2023

Running the old one gives:

ValueError: Pipeline <class 'diffusers.pipelines.vq_diffusion.pipeline_vq_diffusion.VQDiffusionPipeline'> expected {'vqvae', 'transformer', 'scheduler', 'learned_classifier_free_sampling_embeddings', 'tokenizer', 'text_encoder'}, but only {'vqvae', 'tokenizer', 'transformer', 'text_encoder', 'scheduler'} were passed.

And calling as this works fine:

import torch
# from diffusers import VQDiffusionPipeline
# pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16, revision="fp16")

from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq")

pipeline = pipeline.to("cuda")

image = pipeline("teddy bear playing in the pool").images[0]

# save image
image.save("./teddy_bear.png")

Also it seems like a problem of specifying torch_dtype=torch.float16, revision="fp16"

@jS5t3r
Copy link

jS5t3r commented Jun 1, 2023

I agree.

It is better to look here: https://huggingface.co/microsoft/vq-diffusion-ithq

Try this: pipeline = VQDiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq", torch_dtype=torch.float16)

jS5t3r added a commit to computeVision/VQ-Diffusion that referenced this issue Jun 1, 2023
Following this issue: microsoft#30

Updated pipeline. Removed last parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants