mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
update notes
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
- config: reset default cfg scale to 6.0
|
||||
- processing: correct display metadata
|
||||
- upscale: fix ldsr
|
||||
- ipex: fix torch.load, thanks @Disty0
|
||||
|
||||
## Update for 2023-12-29
|
||||
|
||||
|
||||
+12
-2
@@ -110,7 +110,9 @@ def get_video(filepath: str):
|
||||
|
||||
|
||||
def select_input(selected_input, selected_init, init_type):
|
||||
debug(f'Control select input: source={selected_input} init={selected_init}, type={init_type}')
|
||||
if selected_input is None:
|
||||
return [gr.Tabs.update(), '']
|
||||
debug(f'Control select input: source={selected_input} init={selected_init} type={init_type}')
|
||||
global input_source, input_init # pylint: disable=global-statement
|
||||
input_type = type(selected_input)
|
||||
status = 'Control input | Unknown'
|
||||
@@ -122,6 +124,14 @@ def select_input(selected_input, selected_init, init_type):
|
||||
shared.log.debug(f'Control input: type={input_type} input={input_source}')
|
||||
status = f'Control input | Image | Size {selected_input.width}x{selected_input.height} | Mode {selected_input.mode}'
|
||||
res = [gr.Tabs.update(selected='out-gallery'), status]
|
||||
elif isinstance(selected_input, dict): # inpaint
|
||||
mask = selected_input['mask']
|
||||
selected_input = selected_input['image']
|
||||
input_source = [selected_input]
|
||||
input_type = 'PIL.Image'
|
||||
shared.log.debug(f'Control input: type={input_type} input={input_source} mask={mask}')
|
||||
status = f'Control input | Image | Size {selected_input.width}x{selected_input.height} | Mode {selected_input.mode}'
|
||||
res = [gr.Tabs.update(selected='out-gallery'), status]
|
||||
elif isinstance(selected_input, gr.components.image.Image): # not likely
|
||||
input_source = [selected_input.value]
|
||||
input_type = 'gr.Image'
|
||||
@@ -301,7 +311,7 @@ def create_ui(_blocks: gr.Blocks=None):
|
||||
outputs = [output_tabs, result_txt]
|
||||
if hasattr(ctrl, 'change'):
|
||||
ctrl.change(fn=select_input, inputs=inputs, outputs=outputs)
|
||||
if hasattr(ctrl, 'select'):
|
||||
elif hasattr(ctrl, 'select'):
|
||||
ctrl.select(fn=select_input, inputs=inputs, outputs=outputs)
|
||||
show_preview.change(fn=lambda x: gr.update(visible=x), inputs=[show_preview], outputs=[column_preview])
|
||||
show_ip.change(fn=lambda x: gr.update(visible=x), inputs=[show_ip], outputs=[column_ip])
|
||||
|
||||
Reference in New Issue
Block a user