修正参数默认值bug

This commit is contained in:
binary-husky
2023-05-19 12:23:01 +08:00
parent d8540d42a6
commit c46a8d27e6
3 changed files with 3 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ def 图片生成(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_pro
history = [] # 清空历史,以免输入溢出
chatbot.append(("这是什么功能?", "[Local Message] 生成图像, 请先把模型切换至gpt-xxxx或者api2d-xxxx。如果中文效果不理想, 尝试Prompt。正在处理中 ....."))
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 # 由于请求gpt需要一段时间我们先及时地做一次界面更新
if ("advanced_arg" in plugin_kwargs) and (plugin_kwargs["advanced_arg"] == ""): plugin_kwargs.pop("advanced_arg")
resolution = plugin_kwargs.get("advanced_arg", '256x256')
image_url, image_path = gen_image(llm_kwargs, prompt, resolution)
chatbot.append([prompt,