Skip to content

Commit

Permalink
Merge pull request #66 from banodoco/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
piyushK52 authored Dec 26, 2023
2 parents e8f5ed9 + b2ef715 commit 6a61c8a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion ui_components/components/explorer_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")




Expand Down
11 changes: 8 additions & 3 deletions ui_components/widgets/variant_comparison_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6a61c8a

Please sign in to comment.