mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
@@ -91,11 +91,12 @@ def select_input(input_mode, input_image, init_image, init_type, input_resize, i
|
||||
selected_input = input_folder
|
||||
else:
|
||||
selected_input = None
|
||||
size = [gr.update(), gr.update()]
|
||||
if selected_input is None:
|
||||
input_source = None
|
||||
busy = False
|
||||
# debug('Control input: none')
|
||||
return [gr.Tabs.update(), None, '']
|
||||
return [gr.Tabs.update(), None, ''] + size
|
||||
input_type = type(selected_input)
|
||||
input_mask = None
|
||||
status = 'Control input | Unknown'
|
||||
@@ -108,6 +109,7 @@ def select_input(input_mode, input_image, init_image, init_type, input_resize, i
|
||||
input_source = [selected_input]
|
||||
input_type = 'PIL.Image'
|
||||
status = f'Control input | Image | Size {selected_input.width}x{selected_input.height} | Mode {selected_input.mode}'
|
||||
size = [gr.update(value=selected_input.width), gr.update(value=selected_input.height)]
|
||||
res = [gr.Tabs.update(selected='out-gallery'), input_mask, status]
|
||||
elif isinstance(selected_input, dict): # inpaint -> dict image+mask
|
||||
input_mask = selected_input['mask']
|
||||
@@ -145,7 +147,7 @@ def select_input(input_mode, input_image, init_image, init_type, input_resize, i
|
||||
input_init = [init_image]
|
||||
debug_log(f'Control select input: type={input_type} source={input_source} init={input_init} mask={input_mask} mode={input_mode}')
|
||||
busy = False
|
||||
return res
|
||||
return res + size
|
||||
|
||||
|
||||
def copy_input(mode_from, mode_to, input_image, input_resize, input_inpaint):
|
||||
|
||||
Reference in New Issue
Block a user