SuCicada commited on
Commit
4ab0428
1 Parent(s): 3a3cc9a
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from torch import autocast
7
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipeline
8
 
9
  model_id = "hakurei/waifu-diffusion"
10
- torch.backends.cudnn.benchmark = True
11
 
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
@@ -24,7 +24,8 @@ pipe = pipe.to(device)
24
 
25
 
26
  def infer(prompt, width, height, nums, steps, guidance_scale, seed):
27
- print(prompt, width, height, nums, steps, guidance_scale, seed)
 
28
 
29
  if prompt is not None and prompt != "":
30
 
@@ -68,7 +69,7 @@ def run():
68
  gr.Slider(0, 20, 7.5, step=0.5,
69
  label="guidance_scale:\n" +
70
  "较高的引导比例鼓励生成与文本“提示”密切相关的图像,通常以降低图像质量为代价"),
71
- gr.Textbox(label="随机 send",
72
  placeholder="Random Seed",
73
  lines=1),
74
  ],
7
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipeline
8
 
9
  model_id = "hakurei/waifu-diffusion"
10
+ # torch.backends.cudnn.benchmark = True
11
 
12
  device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
24
 
25
 
26
  def infer(prompt, width, height, nums, steps, guidance_scale, seed):
27
+ print(prompt)
28
+ print(width, height, nums, steps, guidance_scale, seed)
29
 
30
  if prompt is not None and prompt != "":
31
 
69
  gr.Slider(0, 20, 7.5, step=0.5,
70
  label="guidance_scale:\n" +
71
  "较高的引导比例鼓励生成与文本“提示”密切相关的图像,通常以降低图像质量为代价"),
72
+ gr.Textbox(label="随机 seed",
73
  placeholder="Random Seed",
74
  lines=1),
75
  ],