Browse Source

Fix set Data for NodeConnectionBase types

pull/333/head
Ionite 1 year ago
parent
commit
241c5f1475
No known key found for this signature in database
  1. 10
      StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyTypedNodeBase.cs

10
StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyTypedNodeBase.cs

@ -32,7 +32,15 @@ public abstract record ComfyTypedNodeBase
property.GetCustomAttribute<JsonPropertyNameAttribute>()?.Name
?? namingPolicy.ConvertName(property.Name);
inputs.Add(key, value);
// For connection types, use data property
if (value is NodeConnectionBase connection)
{
inputs.Add(key, connection.Data);
}
else
{
inputs.Add(key, value);
}
}
return new NamedComfyNode(Name) { ClassType = ClassType, Inputs = inputs };

Loading…
Cancel
Save