File size: 4,494 Bytes
65b9bdd 030ae4a 65b9bdd 030ae4a 65b9bdd 030ae4a 65b9bdd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
---
license: mit
---
## How to run
This pipeline should be run together with https://huggingface.co/warp-diffusion/wuerstchen:
```py
import torch
from diffusers import WuerstchenDecoderPipeline, WuerstchenPriorPipeline
device = "cuda"
dtype = torch.float16
num_images_per_prompt = 2
prior_pipeline = WuerstchenPriorPipeline.from_pretrained(
"warp-diffusion/wuerstchen-prior", torch_dtype=dtype
).to(device)
decoder_pipeline = WuerstchenDecoderPipeline.from_pretrained(
"warp-diffusion/wuerstchen", torch_dtype=dtype
).to(device)
caption = "A captivating artwork of a mysterious stone golem"
negative_prompt = ""
prior_output = prior_pipeline(
prompt=caption,
height=1024,
width=1024,
negative_prompt=negative_prompt,
guidance_scale=4.0,
num_images_per_prompt=num_images_per_prompt,
)
decoder_output = decoder_pipeline(
image_embeddings=prior_output.image_embeddings,
prompt=caption,
negative_prompt=negative_prompt,
num_images_per_prompt=num_images_per_prompt,
guidance_scale=0.0,
output_type="pil",
).images
``` |