mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-20 21:30:09 +08:00
more fixes for latest gradio
This commit is contained in:
parent
f7a3067d2a
commit
50699ce112
@ -34,7 +34,7 @@ class ScriptSeed(scripts.ScriptBuiltinUI):
|
|||||||
random_seed = ToolButton(ui.random_symbol, elem_id=self.elem_id("random_seed"), tooltip="Set seed to -1, which will cause a new random number to be used every time")
|
random_seed = ToolButton(ui.random_symbol, elem_id=self.elem_id("random_seed"), tooltip="Set seed to -1, which will cause a new random number to be used every time")
|
||||||
reuse_seed = ToolButton(ui.reuse_symbol, elem_id=self.elem_id("reuse_seed"), tooltip="Reuse seed from last generation, mostly useful if it was randomized")
|
reuse_seed = ToolButton(ui.reuse_symbol, elem_id=self.elem_id("reuse_seed"), tooltip="Reuse seed from last generation, mostly useful if it was randomized")
|
||||||
|
|
||||||
seed_checkbox = gr.Checkbox(label='Extra', elem_id=self.elem_id("subseed_show"), value=False)
|
seed_checkbox = gr.Checkbox(label='Extra', elem_id=self.elem_id("subseed_show"), value=False, scale=0, min_width=60)
|
||||||
|
|
||||||
with gr.Group(visible=False, elem_id=self.elem_id("seed_extras")) as seed_extras:
|
with gr.Group(visible=False, elem_id=self.elem_id("seed_extras")) as seed_extras:
|
||||||
with gr.Row(elem_id=self.elem_id("subseed_row")):
|
with gr.Row(elem_id=self.elem_id("subseed_row")):
|
||||||
|
@ -103,6 +103,11 @@ def move_files_to_cache(data, block, postprocess=False, add_urls=False, check_in
|
|||||||
if payload.url and postprocess:
|
if payload.url and postprocess:
|
||||||
payload.path = payload.url
|
payload.path = payload.url
|
||||||
elif not block.proxy_url:
|
elif not block.proxy_url:
|
||||||
|
|
||||||
|
# EDITED
|
||||||
|
if check_tmp_file(shared.demo, payload.path):
|
||||||
|
temp_file_path = payload.path
|
||||||
|
else:
|
||||||
# If the file is on a remote server, do not move it to cache.
|
# If the file is on a remote server, do not move it to cache.
|
||||||
if check_in_upload_folder and not client_utils.is_http_url_like(
|
if check_in_upload_folder and not client_utils.is_http_url_like(
|
||||||
payload.path
|
payload.path
|
||||||
@ -113,10 +118,6 @@ def move_files_to_cache(data, block, postprocess=False, add_urls=False, check_in
|
|||||||
f"File {path} is not in the upload folder and cannot be accessed."
|
f"File {path} is not in the upload folder and cannot be accessed."
|
||||||
)
|
)
|
||||||
|
|
||||||
# EDITED
|
|
||||||
if check_tmp_file(shared.demo, payload.path):
|
|
||||||
temp_file_path = payload.path
|
|
||||||
else:
|
|
||||||
temp_file_path = block.move_resource_to_block_cache(payload.path)
|
temp_file_path = block.move_resource_to_block_cache(payload.path)
|
||||||
|
|
||||||
if temp_file_path is None:
|
if temp_file_path is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user