Spaces:
Sleeping
Sleeping
lichorosario
commited on
Commit
•
3328375
1
Parent(s):
e301d80
Ajustar función clear_output en app.py
Browse files- app.py +4 -2
- loras.json +1 -1
app.py
CHANGED
@@ -149,8 +149,9 @@ def upscale_image(image, resolution, num_inference_steps, strength, hdr, guidanc
|
|
149 |
image = resize_image(image, reduce_factor)
|
150 |
image = save_image(image)
|
151 |
|
|
|
152 |
try:
|
153 |
-
result = client_tile_upscaler.
|
154 |
param_0=handle_file(image),
|
155 |
param_1=resolution,
|
156 |
param_2=num_inference_steps,
|
@@ -164,6 +165,7 @@ def upscale_image(image, resolution, num_inference_steps, strength, hdr, guidanc
|
|
164 |
except ValueError as e:
|
165 |
raise gr.Error(e)
|
166 |
|
|
|
167 |
return result
|
168 |
|
169 |
|
@@ -310,7 +312,7 @@ with gr.Blocks(css=css) as demo:
|
|
310 |
|
311 |
|
312 |
def clear_output(image_slider):
|
313 |
-
return
|
314 |
|
315 |
enhace_button.click(
|
316 |
fn=clear_output,
|
|
|
149 |
image = resize_image(image, reduce_factor)
|
150 |
image = save_image(image)
|
151 |
|
152 |
+
|
153 |
try:
|
154 |
+
result = client_tile_upscaler.submit(
|
155 |
param_0=handle_file(image),
|
156 |
param_1=resolution,
|
157 |
param_2=num_inference_steps,
|
|
|
165 |
except ValueError as e:
|
166 |
raise gr.Error(e)
|
167 |
|
168 |
+
result = job.result()
|
169 |
return result
|
170 |
|
171 |
|
|
|
312 |
|
313 |
|
314 |
def clear_output(image_slider):
|
315 |
+
return None
|
316 |
|
317 |
enhace_button.click(
|
318 |
fn=clear_output,
|
loras.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
"image": "images/dott_remastered_001.jpg",
|
4 |
"title": "Sam & Max Hit the Road 2",
|
5 |
"repo": "lichorosario/samhtr",
|
6 |
-
"trigger_word": ""
|
7 |
},
|
8 |
{
|
9 |
"image": "images/dott_remastered_001.jpg",
|
|
|
3 |
"image": "images/dott_remastered_001.jpg",
|
4 |
"title": "Sam & Max Hit the Road 2",
|
5 |
"repo": "lichorosario/samhtr",
|
6 |
+
"trigger_word": "cartoonish style"
|
7 |
},
|
8 |
{
|
9 |
"image": "images/dott_remastered_001.jpg",
|