feat(workflow): 工作流提供方 - 集成 RunningHub 与 ComfyUI Bridge

This commit is contained in:
yepwait
2026-08-26 15:02:24 +08:00
committed by ddCat
parent 6141bd688c
commit 86fc3fda2f
82 changed files with 11405 additions and 248 deletions

View File

@@ -57,7 +57,30 @@ func canRunProviderTask(task model.Task) bool {
func hasExecutableProviderVideoConfig(input map[string]any) bool {
mode, _ := input["mode"].(string)
config, ok := input["config"].(map[string]any)
if mode != "video" || !ok || stringValue(config["model"]) == "" {
if mode != "video" || !ok {
return false
}
interfaceType := stringValue(config["interfaceType"])
if isComfyBridgeInterface(interfaceType) {
workflowJSON, hasWorkflowJSON := config["workflowJson"]
workflowReady := false
if hasWorkflowJSON {
switch value := workflowJSON.(type) {
case map[string]interface{}:
workflowReady = len(value) > 0
case string:
workflowReady = strings.TrimSpace(value) != ""
}
}
return stringValue(config["bridgeId"]) != "" && (stringValue(config["workflowId"]) != "" || workflowReady)
}
if isRunningHubInterface(interfaceType) {
if stringValue(config["workflowId"]) == "" && stringValue(config["webappId"]) == "" && stringValue(config["model"]) == "" {
return false
}
return stringValue(config["baseUrl"]) != "" && stringValue(config["apiKey"]) != ""
}
if stringValue(config["model"]) == "" {
return false
}
return stringValue(config["channelId"]) != "" || (stringValue(config["baseUrl"]) != "" && stringValue(config["apiKey"]) != "")