From ab6942b3e23fabbe997c4dbeba6a3f9c220c5468 Mon Sep 17 00:00:00 2001 From: piyushK52 Date: Tue, 26 Dec 2023 17:00:37 +0530 Subject: [PATCH 1/2] generated params fix --- ui_components/widgets/variant_comparison_grid.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui_components/widgets/variant_comparison_grid.py b/ui_components/widgets/variant_comparison_grid.py index 88708d2e..9a4e0197 100644 --- a/ui_components/widgets/variant_comparison_grid.py +++ b/ui_components/widgets/variant_comparison_grid.py @@ -134,7 +134,9 @@ def variant_inference_detail_element(variant, stage, shot_uuid, timing_list="", inf_data = fetch_inference_data(variant) if 'image_prompt_list' in inf_data: del inf_data['image_prompt_list'] + if 'image_list' in inf_data: del inf_data['image_list'] + if 'output_format' in inf_data: del inf_data['output_format'] st.write(inf_data) @@ -221,9 +223,12 @@ def fetch_inference_data(file: InternalFileObject): # NOTE: generated videos also have other params stored inside origin_data > settings if file.inference_log and file.inference_log.input_params: inf_data = json.loads(file.inference_log.input_params) - for data_type in InferenceParamType.value_list(): - if data_type in inf_data: - del inf_data[data_type] + if 'origin_data' in inf_data and inf_data['origin_data']['inference_type'] == 'frame_interpolation': + inf_data = inf_data['origin_data']['settings'] + else: + for data_type in InferenceParamType.value_list(): + if data_type in inf_data: + del inf_data[data_type] inf_data = inf_data or not_found_msg From e9b4954ea06119a3a22c406fb0ba39d9684ce55f Mon Sep 17 00:00:00 2001 From: piyushK52 Date: Tue, 26 Dec 2023 18:15:56 +0530 Subject: [PATCH 2/2] temp btn fix --- ui_components/components/explorer_page.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui_components/components/explorer_page.py b/ui_components/components/explorer_page.py index efd1a581..8b935b82 100644 --- a/ui_components/components/explorer_page.py +++ b/ui_components/components/explorer_page.py @@ -162,7 +162,7 @@ def generate_images_element(position='explorer', project_uuid=None, timing_uuid= with d3: st.write(" ") - if st.button("Generate images", key="generate_images", use_container_width=True, type="primary"): + if st.session_state.get('generate_images'): ml_client = get_ml_client() counter = 0 for _ in range(number_to_generate): @@ -260,6 +260,11 @@ def generate_images_element(position='explorer', project_uuid=None, timing_uuid= process_inference_output(**inference_data) st.info("Check the Generation Log to the left for the status.") + st.rerun() + + # ----------- generate btn -------------- + st.button("Generate images", key="generate_images", use_container_width=True, type="primary") +