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 response = await comfyApi.GetObjectInfo(nodeName, cancellationToken).ConfigureAwait(false);
var info = response[nodeName]; var info = response.GetValueOrDefault(nodeName);
return info.Input.GetOptionalValueAsNestedList(optionName);
return info?.Input.GetOptionalValueAsNestedList(optionName);
} }
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)

Loading…
Cancel
Save