-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ComfyUI tool for Stable Diffusion (#8160)
- Loading branch information
Showing
6 changed files
with
853 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import Any | ||
|
||
from core.tools.errors import ToolProviderCredentialValidationError | ||
from core.tools.provider.builtin.comfyui.tools.comfyui_stable_diffusion import ComfyuiStableDiffusionTool | ||
from core.tools.provider.builtin_tool_provider import BuiltinToolProviderController | ||
|
||
|
||
class ComfyUIProvider(BuiltinToolProviderController): | ||
def _validate_credentials(self, credentials: dict[str, Any]) -> None: | ||
try: | ||
ComfyuiStableDiffusionTool().fork_tool_runtime( | ||
runtime={ | ||
"credentials": credentials, | ||
} | ||
).validate_models() | ||
except Exception as e: | ||
raise ToolProviderCredentialValidationError(str(e)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
identity: | ||
author: Qun | ||
name: comfyui | ||
label: | ||
en_US: ComfyUI | ||
zh_Hans: ComfyUI | ||
pt_BR: ComfyUI | ||
description: | ||
en_US: ComfyUI is a tool for generating images which can be deployed locally. | ||
zh_Hans: ComfyUI 是一个可以在本地部署的图片生成的工具。 | ||
pt_BR: ComfyUI is a tool for generating images which can be deployed locally. | ||
icon: icon.png | ||
tags: | ||
- image | ||
credentials_for_provider: | ||
base_url: | ||
type: text-input | ||
required: true | ||
label: | ||
en_US: Base URL | ||
zh_Hans: ComfyUI服务器的Base URL | ||
pt_BR: Base URL | ||
placeholder: | ||
en_US: Please input your ComfyUI server's Base URL | ||
zh_Hans: 请输入你的 ComfyUI 服务器的 Base URL | ||
pt_BR: Please input your ComfyUI server's Base URL | ||
model: | ||
type: text-input | ||
required: true | ||
label: | ||
en_US: Model with suffix | ||
zh_Hans: 模型, 需要带后缀 | ||
pt_BR: Model with suffix | ||
placeholder: | ||
en_US: Please input your model | ||
zh_Hans: 请输入你的模型名称 | ||
pt_BR: Please input your model | ||
help: | ||
en_US: The checkpoint name of the ComfyUI server, e.g. xxx.safetensors | ||
zh_Hans: ComfyUI服务器的模型名称, 比如 xxx.safetensors | ||
pt_BR: The checkpoint name of the ComfyUI server, e.g. xxx.safetensors | ||
url: https://docs.dify.ai/tutorials/tool-configuration/comfyui |
Oops, something went wrong.