patrickvonplaten commited on
Commit
83866b7
1 Parent(s): e9769b0

finish example

Browse files
Files changed (1) hide show
  1. README.md +10 -0
README.md CHANGED
@@ -28,8 +28,18 @@ pipe.to("cuda")
28
 
29
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
30
  refiner.to("cuda")
 
 
 
 
 
 
 
 
31
  ```
32
 
 
 
33
  ## Details
34
 
35
  SDXL-VAE generates NaNs in fp16 because the internal activation values are too big:
 
28
 
29
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
30
  refiner.to("cuda")
31
+
32
+ n_steps = 40
33
+ high_noise_frac = 0.7
34
+
35
+ prompt = "A majestic lion jumping from a big stone at night"
36
+
37
+ image = base(prompt=prompt, num_inference_steps=n_steps, denoising_end=high_noise_frac, output_type="latent").images
38
+ image = refiner(prompt=prompt, num_inference_steps=n_steps, denoising_start=high_noise_frac, image=image).images[0]
39
  ```
40
 
41
+ ![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/lion_refined.png)
42
+
43
  ## Details
44
 
45
  SDXL-VAE generates NaNs in fp16 because the internal activation values are too big: