update scheduler setting

#3
by shirayu - opened
Files changed (1) hide show
  1. README.md +13 -2
README.md CHANGED
@@ -50,13 +50,24 @@ This model can be used for entertainment purposes and as a generative art assist
50
  ```python
51
  import torch
52
  from torch import autocast
53
- from diffusers import StableDiffusionPipeline
54
 
55
  model_id = "hakurei/waifu-diffusion"
56
  device = "cuda"
57
 
58
 
59
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision='fp16')
 
 
 
 
 
 
 
 
 
 
 
60
  pipe = pipe.to(device)
61
 
62
  prompt = "touhou hakurei_reimu 1girl solo portrait"
 
50
  ```python
51
  import torch
52
  from torch import autocast
53
+ from diffusers import StableDiffusionPipeline, DDIMScheduler
54
 
55
  model_id = "hakurei/waifu-diffusion"
56
  device = "cuda"
57
 
58
 
59
+ pipe = StableDiffusionPipeline.from_pretrained(
60
+ model_id,
61
+ torch_dtype=torch.float16,
62
+ revision="fp16",
63
+ scheduler=DDIMScheduler(
64
+ beta_start=0.00085,
65
+ beta_end=0.012,
66
+ beta_schedule="scaled_linear",
67
+ clip_sample=False,
68
+ set_alpha_to_one=False,
69
+ ),
70
+ )
71
  pipe = pipe.to(device)
72
 
73
  prompt = "touhou hakurei_reimu 1girl solo portrait"