Browse Source

Fix missing node causing connection error

pull/629/head
Ionite 9 months ago
parent
commit
3653fb475e
No known key found for this signature in database
  1. 5
      StabilityMatrix.Core/Inference/ComfyClient.cs

5
StabilityMatrix.Core/Inference/ComfyClient.cs

@ -471,8 +471,9 @@ public class ComfyClient : InferenceClientBase
{
var response = await comfyApi.GetObjectInfo(nodeName, cancellationToken).ConfigureAwait(false);
var info = response[nodeName];
return info.Input.GetOptionalValueAsNestedList(optionName);
var info = response.GetValueOrDefault(nodeName);
return info?.Input.GetOptionalValueAsNestedList(optionName);
}
protected override void Dispose(bool disposing)

Loading…
Cancel
Save