From 75999d816a0303fb331d984a364105feb2940b2c Mon Sep 17 00:00:00 2001 From: puke <1129090915@qq.com> Date: Thu, 29 Jan 2026 19:19:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E5=AD=97=E4=BA=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E9=85=8D=E7=BD=AE=E5=88=9D=E5=A7=8B=E5=8C=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=BA=90=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=97=B6=E5=8F=98=E9=87=8F=E5=A7=8B=E7=BB=88=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/pipelines/digital_human.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/web/pipelines/digital_human.py b/web/pipelines/digital_human.py index 6dd569b..2f61216 100644 --- a/web/pipelines/digital_human.py +++ b/web/pipelines/digital_human.py @@ -151,27 +151,32 @@ class DigitalHumanPipelineUI(PipelineUI): label_visibility="collapsed" ) + # Initialize workflow_config with default value based on source selection + # This ensures the variable is always defined even if the backend is not configured + if source == "runninghub": + workflow_config = { + "first_workflow_path": "workflows/runninghub/digital_image.json", + "second_workflow_path": "workflows/runninghub/digital_combination.json", + "third_workflow_path": "workflows/runninghub/digital_customize.json" + } + else: + workflow_config = { + "first_workflow_path": "workflows/selfhost/digital_image.json", + "second_workflow_path": "workflows/selfhost/digital_combination.json", + "third_workflow_path": "workflows/selfhost/digital_customize.json" + } + # Show hint based on selection if source == "runninghub": if not has_runninghub: st.warning(tr("asset_based.source.runninghub_not_configured")) else: st.info(tr("asset_based.source.runninghub_hint")) - workflow_config = { - "first_workflow_path": "workflows/runninghub/digital_image.json", - "second_workflow_path": "workflows/runninghub/digital_combination.json", - "third_workflow_path": "workflows/runninghub/digital_customize.json" - } else: if not has_selfhost: st.warning(tr("asset_based.source.selfhost_not_configured")) else: st.info(tr("asset_based.source.selfhost_hint")) - workflow_config = { - "first_workflow_path": "workflows/selfhost/digital_image.json", - "second_workflow_path": "workflows/selfhost/digital_combination.json", - "third_workflow_path": "workflows/selfhost/digital_customize.json" - } # Check and warn for selfhost workflows (auto popup if not confirmed) # Warn for the first workflow as representative # TODO: need to check if the workflow is valid