hakurei shirayu commited on
Commit
63e6c05
1 Parent(s): 3e50d29

update scheduler setting (#3)

Browse files

- update scheduler setting (f060b02899acec41b028dfa79595a5930345f1bb)
- Update README.md (255579ce919616b13f9174e5c9a2e3c102dfc7f5)


Co-authored-by: Yuta Hayashibe <shirayu@users.noreply.huggingface.co>

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"