Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -109,15 +109,20 @@ def infer(
|
|
109 |
num_inference_steps=50,
|
110 |
progress=gr.Progress(track_tqdm=True),
|
111 |
):
|
|
|
|
|
112 |
|
113 |
seed = sanitize_seed(seed)
|
114 |
|
115 |
if seed == -1:
|
116 |
seed = random.randint(0, MAX_SEED)
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
119 |
|
120 |
-
print(f"Generating for prompt: \n\t{prompt}\n\t{seed}\n\t{aspect_ratio}\n\t{num_inference_steps}")
|
121 |
|
122 |
image = pipe(
|
123 |
prompt=prompt,
|
|
|
109 |
num_inference_steps=50,
|
110 |
progress=gr.Progress(track_tqdm=True),
|
111 |
):
|
112 |
+
|
113 |
+
print(f"Generating for prompt: \n\t{prompt}\n\t{seed}\n\t{aspect_ratio}\n\t{num_inference_steps}")
|
114 |
|
115 |
seed = sanitize_seed(seed)
|
116 |
|
117 |
if seed == -1:
|
118 |
seed = random.randint(0, MAX_SEED)
|
119 |
+
|
120 |
+
try:
|
121 |
+
width, height = aspect_ratios[aspect_ratio]
|
122 |
+
except:
|
123 |
+
width, height = (640, 480)
|
124 |
+
|
125 |
|
|
|
126 |
|
127 |
image = pipe(
|
128 |
prompt=prompt,
|