Update app.py
Browse files
app.py
CHANGED
@@ -103,7 +103,7 @@ ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
|
103 |
|
104 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
105 |
|
106 |
-
NUM_IMAGES_PER_PROMPT =
|
107 |
|
108 |
if torch.cuda.is_available():
|
109 |
pipe = DiffusionPipeline.from_pretrained(
|
@@ -174,7 +174,7 @@ def generate(
|
|
174 |
"width": width,
|
175 |
"height": height,
|
176 |
"guidance_scale": guidance_scale,
|
177 |
-
"num_inference_steps":
|
178 |
"generator": generator,
|
179 |
"num_images_per_prompt": NUM_IMAGES_PER_PROMPT,
|
180 |
"use_resolution_binning": use_resolution_binning,
|
@@ -319,4 +319,4 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
319 |
)
|
320 |
|
321 |
if __name__ == "__main__":
|
322 |
-
demo.queue(max_size=
|
|
|
103 |
|
104 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
105 |
|
106 |
+
NUM_IMAGES_PER_PROMPT = 10
|
107 |
|
108 |
if torch.cuda.is_available():
|
109 |
pipe = DiffusionPipeline.from_pretrained(
|
|
|
174 |
"width": width,
|
175 |
"height": height,
|
176 |
"guidance_scale": guidance_scale,
|
177 |
+
"num_inference_steps": 30,
|
178 |
"generator": generator,
|
179 |
"num_images_per_prompt": NUM_IMAGES_PER_PROMPT,
|
180 |
"use_resolution_binning": use_resolution_binning,
|
|
|
319 |
)
|
320 |
|
321 |
if __name__ == "__main__":
|
322 |
+
demo.queue(max_size=30).launch()
|