feat: add sd model parameter (#2331)

This commit is contained in:
Yeuoly 2024-02-01 13:12:57 +08:00 committed by GitHub
parent fce64d760b
commit ef308fd121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -70,6 +70,10 @@ class StableDiffusionTool(BuiltinTool):
base_url = self.runtime.credentials.get('base_url', None)
if not base_url:
return self.create_text_message('Please input base_url')
if 'model' in tool_parameters:
self.runtime.credentials['model'] = tool_parameters['model']
model = self.runtime.credentials.get('model', None)
if not model:
return self.create_text_message('Please input model')

View File

@ -25,6 +25,18 @@ parameters:
pt_BR: Image prompt, you can check the official documentation of Stable Diffusion
llm_description: Image prompt of Stable Diffusion, you should describe the image you want to generate as a list of words as possible as detailed, the prompt must be written in English.
form: llm
- name: model
type: string
required: false
label:
en_US: Model Name
zh_Hans: 模型名称
pt_BR: Model Name
human_description:
en_US: Model Name
zh_Hans: 模型名称
pt_BR: Model Name
form: form
- name: lora
type: string
required: false