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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user