Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

bugfix: model str maybe empty (#2660)

nan jiangbc65ee10c089
diff --git a/api/core/tools/provider/builtin/stablediffusion/tools/stable_diffusion.py b/api/core/tools/provider/builtin/stablediffusion/tools/stable_diffusion.py
index 2bacfa07e70..cda89036dcf 100644
--- a/api/core/tools/provider/builtin/stablediffusion/tools/stable_diffusion.py
+++ b/api/core/tools/provider/builtin/stablediffusion/tools/stable_diffusion.py
@@ -70,7 +70,7 @@ class StableDiffusionTool(BuiltinTool):
if not base_url:
return self.create_text_message('Please input base_url')
- if 'model' in tool_parameters:
+ if 'model' in tool_parameters and tool_parameters['model']:
self.runtime.credentials['model'] = tool_parameters['model']
model = self.runtime.credentials.get('model', None)