Fix Bria model CFGScale validation and add image parameter to inference inputs

- Cast CFGScale to int for Bria models to fix API validation error (Bria requires integer, not float)
- Add 'image' parameter to Runware Image Inference Inputs node
- Fix CFGScale handling to properly validate and format for Bria models
- Add workflow file for Bria Fibo image inference
This commit is contained in:
Sirshendu Ganguly
2025-10-29 13:00:14 -04:00
parent 47696ff476
commit 22e2aa1da8
4 changed files with 19 additions and 2 deletions
+9 -1
View File
@@ -252,7 +252,13 @@ class txt2img:
if useSteps:
genConfig[0]["steps"] = steps
if useCFGScale:
genConfig[0]["CFGScale"] = cfgScale
# Extract provider name from model (e.g., "bria:20@1" -> "bria")
provider_name = runwareModel.split(":")[0] if ":" in runwareModel else runwareModel
# Cast to int for Bria models
if provider_name.lower() == "bria":
genConfig[0]["CFGScale"] = int(cfgScale)
else:
genConfig[0]["CFGScale"] = cfgScale
if useSeed:
genConfig[0]["seed"] = seed
if useScheduler:
@@ -336,6 +342,8 @@ class txt2img:
print(f"[DEBUG] Sending Image Inference Request:")
print(f"[DEBUG] Request Payload: {json.dumps(genConfig, indent=2)}")
print(f"[DEBUG] CFGScale value from kwargs: {cfgScale}")
genResult = rwUtils.inferenecRequest(genConfig)
# Debug: Print the response received