Spaces:
Running
Running
xco2
commited on
Commit
·
fda67f2
1
Parent(s):
c76f1ef
改成cpu运行
Browse files
app.py
CHANGED
@@ -516,7 +516,7 @@ def init_webui(unet, vae, normal_t):
|
|
516 |
# 选择sampler
|
517 |
sampler_name = gr.Dropdown(["DDIM"], label="sampler", value="DDIM") # , "euler a", "dpmpp 2m"
|
518 |
# 创建滑动条组件
|
519 |
-
step = gr.Slider(minimum=1, maximum=1000, value=
|
520 |
batch_size = gr.Slider(minimum=1, maximum=4, label="batch size", step=1)
|
521 |
img_size = gr.Slider(minimum=256, maximum=512, value=256, label="img size", step=64)
|
522 |
# 创建开始按钮组件
|
@@ -531,7 +531,7 @@ def init_webui(unet, vae, normal_t):
|
|
531 |
|
532 |
|
533 |
if __name__ == '__main__':
|
534 |
-
device =
|
535 |
unet, vae, normal_t = get_models(device)
|
536 |
|
537 |
|
|
|
516 |
# 选择sampler
|
517 |
sampler_name = gr.Dropdown(["DDIM"], label="sampler", value="DDIM") # , "euler a", "dpmpp 2m"
|
518 |
# 创建滑动条组件
|
519 |
+
step = gr.Slider(minimum=1, maximum=1000, value=40, label="步长", step=1)
|
520 |
batch_size = gr.Slider(minimum=1, maximum=4, label="batch size", step=1)
|
521 |
img_size = gr.Slider(minimum=256, maximum=512, value=256, label="img size", step=64)
|
522 |
# 创建开始按钮组件
|
|
|
531 |
|
532 |
|
533 |
if __name__ == '__main__':
|
534 |
+
device = torch.device('cpu')
|
535 |
unet, vae, normal_t = get_models(device)
|
536 |
|
537 |
|