Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import os
|
2 |
import random
|
3 |
import uuid
|
4 |
import json
|
@@ -13,9 +12,9 @@ if not torch.cuda.is_available():
|
|
13 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
14 |
|
15 |
MAX_SEED = np.iinfo(np.int32).max
|
16 |
-
MAX_IMAGE_SIZE =
|
17 |
-
USE_TORCH_COMPILE =
|
18 |
-
ENABLE_CPU_OFFLOAD =
|
19 |
|
20 |
if torch.cuda.is_available():
|
21 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
@@ -72,6 +71,7 @@ footer {
|
|
72 |
visibility: hidden
|
73 |
}
|
74 |
'''
|
|
|
75 |
with gr.Blocks(css=css) as demo:
|
76 |
gr.Markdown("""# 梦羽的模型生成器
|
77 |
### 快速生成NoobXL的模型图片.""")
|
|
|
|
|
1 |
import random
|
2 |
import uuid
|
3 |
import json
|
|
|
12 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
13 |
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
15 |
+
MAX_IMAGE_SIZE = 4096
|
16 |
+
USE_TORCH_COMPILE = "1"
|
17 |
+
ENABLE_CPU_OFFLOAD = "1"
|
18 |
|
19 |
if torch.cuda.is_available():
|
20 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
|
71 |
visibility: hidden
|
72 |
}
|
73 |
'''
|
74 |
+
|
75 |
with gr.Blocks(css=css) as demo:
|
76 |
gr.Markdown("""# 梦羽的模型生成器
|
77 |
### 快速生成NoobXL的模型图片.""")
|