Spaces:
Runtime error
Runtime error
Update gradio_demo.py
Browse files- gradio_demo.py +8 -2
gradio_demo.py
CHANGED
@@ -1251,7 +1251,8 @@ with block:
|
|
1251 |
choices=[e.value for e in BGSource],
|
1252 |
value=BGSource.UPLOAD.value,
|
1253 |
label="Background Source",
|
1254 |
-
type='value'
|
|
|
1255 |
)
|
1256 |
|
1257 |
example_quick_subjects = gr.Dataset(samples=quick_subjects, label='Subject Quick List', samples_per_page=1000, components=[prompt])
|
@@ -1486,8 +1487,13 @@ with block:
|
|
1486 |
|
1487 |
|
1488 |
return result
|
|
|
|
|
|
|
|
|
|
|
1489 |
|
1490 |
-
ips_bg = [input_fg,
|
1491 |
|
1492 |
# Update button click events with new inputs list
|
1493 |
relight_button_bg.click(
|
|
|
1251 |
choices=[e.value for e in BGSource],
|
1252 |
value=BGSource.UPLOAD.value,
|
1253 |
label="Background Source",
|
1254 |
+
type='value',
|
1255 |
+
visible=False
|
1256 |
)
|
1257 |
|
1258 |
example_quick_subjects = gr.Dataset(samples=quick_subjects, label='Subject Quick List', samples_per_page=1000, components=[prompt])
|
|
|
1487 |
|
1488 |
|
1489 |
return result
|
1490 |
+
|
1491 |
+
if original_bg:
|
1492 |
+
chosen_bg = original_bg.copy()
|
1493 |
+
else:
|
1494 |
+
chosen_bg = input_bg
|
1495 |
|
1496 |
+
ips_bg = [input_fg, chosen_bg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, bg_source, x_slider, y_slider, fg_scale_slider]
|
1497 |
|
1498 |
# Update button click events with new inputs list
|
1499 |
relight_button_bg.click(
|