diff --git a/modules/shared.py b/modules/shared.py index 72a9561b3..ff04f78d3 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -350,6 +350,8 @@ def writefile(data, filename, mode='w', silent=False): # skipkeys=True, ensure_ascii=True, check_circular=True, allow_nan=True if type(data) == dict: output = json.dumps(data, indent=2, default=default) + elif type(data) == list: + output = json.dumps(data, indent=2, default=default) elif isinstance(data, object): simple = {} for k in data.__dict__: diff --git a/modules/ui_common.py b/modules/ui_common.py index ec8369900..7d4b5766c 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -178,7 +178,7 @@ def create_output_panel(tabname): with gr.Column(variant='panel', elem_id=f"{tabname}_results"): with gr.Group(elem_id=f"{tabname}_gallery_container"): # columns are for <576px, <768px, <992px, <1200px, <1400px, >1400px - result_gallery = gr.Gallery(value=[], label='Output', show_label=False, show_download_button=True, elem_id=f"{tabname}_gallery", container=False, preview=True, columns=[1,2,3,4,5,6], object_fit='scale-down') + result_gallery = gr.Gallery(value=[], label='Output', show_label=False, show_download_button=True, allow_preview=True, elem_id=f"{tabname}_gallery", container=False, preview=True, columns=5, object_fit='scale-down') with gr.Column(elem_id=f"{tabname}_footer", elem_classes="gallery_footer"): dummy_component = gr.Label(visible=False)