Spaces:
Running
Running
Add advices
Browse files
app.py
CHANGED
@@ -60,7 +60,10 @@ def check(
|
|
60 |
):
|
61 |
raise gr.Error("At least one border must be enlarged.")
|
62 |
|
63 |
-
def
|
|
|
|
|
|
|
64 |
source_img,
|
65 |
enlarge_top,
|
66 |
enlarge_right,
|
@@ -76,6 +79,22 @@ def predict(
|
|
76 |
seed,
|
77 |
debug_mode,
|
78 |
progress = gr.Progress()):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
start = time.time()
|
80 |
progress(0, desc = "Preparing data...")
|
81 |
|
@@ -208,10 +227,12 @@ with gr.Blocks() as interface:
|
|
208 |
🚀 Powered by <i>SDXL 1.0</i> artificial intellingence
|
209 |
<br/>
|
210 |
<ul>
|
211 |
-
<li>
|
212 |
-
<li>
|
213 |
-
<li>
|
214 |
-
<li>
|
|
|
|
|
215 |
</ul>
|
216 |
<br/>
|
217 |
🐌 Slow process... ~20 min with 20 inference steps, ~6 hours with 25 inference steps.<br>You can duplicate this space on a free account, it works on CPU.<br/>
|
@@ -267,8 +288,11 @@ with gr.Blocks() as interface:
|
|
267 |
with gr.Row():
|
268 |
mask_image = gr.Image(label = "Mask image", visible = False)
|
269 |
|
270 |
-
submit.click(toggle_debug, debug_mode, [
|
271 |
-
|
|
|
|
|
|
|
272 |
source_img,
|
273 |
enlarge_top,
|
274 |
enlarge_right,
|
@@ -284,7 +308,7 @@ with gr.Blocks() as interface:
|
|
284 |
seed,
|
285 |
debug_mode
|
286 |
], outputs = [], queue = False,
|
287 |
-
show_progress = False).success(
|
288 |
source_img,
|
289 |
enlarge_top,
|
290 |
enlarge_right,
|
|
|
60 |
):
|
61 |
raise gr.Error("At least one border must be enlarged.")
|
62 |
|
63 |
+
def queue():
|
64 |
+
return []
|
65 |
+
|
66 |
+
def uncrop(
|
67 |
source_img,
|
68 |
enlarge_top,
|
69 |
enlarge_right,
|
|
|
79 |
seed,
|
80 |
debug_mode,
|
81 |
progress = gr.Progress()):
|
82 |
+
check(
|
83 |
+
source_img,
|
84 |
+
enlarge_top,
|
85 |
+
enlarge_right,
|
86 |
+
enlarge_bottom,
|
87 |
+
enlarge_left,
|
88 |
+
prompt,
|
89 |
+
negative_prompt,
|
90 |
+
smooth_border,
|
91 |
+
denoising_steps,
|
92 |
+
num_inference_steps,
|
93 |
+
guidance_scale,
|
94 |
+
randomize_seed,
|
95 |
+
seed,
|
96 |
+
debug_mode
|
97 |
+
)
|
98 |
start = time.time()
|
99 |
progress(0, desc = "Preparing data...")
|
100 |
|
|
|
227 |
🚀 Powered by <i>SDXL 1.0</i> artificial intellingence
|
228 |
<br/>
|
229 |
<ul>
|
230 |
+
<li>To change the <b>view angle</b> of your image, I recommend to use <i>Zero123</i>,</li>
|
231 |
+
<li>To <b>upscale</b> your image, I recommend to use <i>Ilaria Upscaler</i>,</li>
|
232 |
+
<li>To <b>slightly change</b> your image, I recommend to use <i>Image-to-Image SDXL</i>,</li>
|
233 |
+
<li>To change <b>one detail</b> on your image, I recommend to use <i>Inpaint SDXL</i>,</li>
|
234 |
+
<li>To make a <b>tile</b> of your image, I recommend to use <i>Make My Image Tiling</i>,</li>
|
235 |
+
<li>To modify <b>anything else</b> on your image, I recommend to use <i>Instruct Pix2Pix</i>, available on terrapretapermaculture's <i>ControlNet-v1-1</i> space (last tab) or on <i>Dezgo</i> site.</li>
|
236 |
</ul>
|
237 |
<br/>
|
238 |
🐌 Slow process... ~20 min with 20 inference steps, ~6 hours with 25 inference steps.<br>You can duplicate this space on a free account, it works on CPU.<br/>
|
|
|
288 |
with gr.Row():
|
289 |
mask_image = gr.Image(label = "Mask image", visible = False)
|
290 |
|
291 |
+
submit.click(toggle_debug, debug_mode, [
|
292 |
+
original_image,
|
293 |
+
enlarged_image,
|
294 |
+
mask_image
|
295 |
+
], queue = False, show_progress = False).then(check, inputs = [
|
296 |
source_img,
|
297 |
enlarge_top,
|
298 |
enlarge_right,
|
|
|
308 |
seed,
|
309 |
debug_mode
|
310 |
], outputs = [], queue = False,
|
311 |
+
show_progress = False).success(fn = queue, inputs = [], outputs = [], queue = True, show_progress = False).then(uncrop, inputs = [
|
312 |
source_img,
|
313 |
enlarge_top,
|
314 |
enlarge_right,
|