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

This commit is contained in:
yepwait authored and ddCat committed 2026-08-26 15:02:42 +08:00
1 parent cbf5b9f054
commit d458ba3f75
82 files changed
+11404 -247

No files matched your search

+24 -1
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"]) != "")