Browse Source

Fix missing JsonIgnore on TypedNodeBase properties

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

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

@ -45,10 +45,9 @@ public abstract record ComfyTypedNodeBase
public abstract record ComfyTypedNodeBase<TOutput> : ComfyTypedNodeBase public abstract record ComfyTypedNodeBase<TOutput> : ComfyTypedNodeBase
where TOutput : NodeConnectionBase, new() where TOutput : NodeConnectionBase, new()
{ {
[JsonIgnore]
public TOutput Output => new() { Data = new object[] { Name, 0 } }; public TOutput Output => new() { Data = new object[] { Name, 0 } };
// public static implicit operator NamedComfyNode(ComfyTypedNodeBase<TOutput> node) => node.ToNamedNode();
public static implicit operator NamedComfyNode<TOutput>(ComfyTypedNodeBase<TOutput> node) => public static implicit operator NamedComfyNode<TOutput>(ComfyTypedNodeBase<TOutput> node) =>
(NamedComfyNode<TOutput>)node.ToNamedNode(); (NamedComfyNode<TOutput>)node.ToNamedNode();
} }
@ -57,12 +56,12 @@ public abstract record ComfyTypedNodeBase<TOutput1, TOutput2> : ComfyTypedNodeBa
where TOutput1 : NodeConnectionBase, new() where TOutput1 : NodeConnectionBase, new()
where TOutput2 : NodeConnectionBase, new() where TOutput2 : NodeConnectionBase, new()
{ {
[JsonIgnore]
public TOutput1 Output1 => new() { Data = new object[] { Name, 0 } }; public TOutput1 Output1 => new() { Data = new object[] { Name, 0 } };
[JsonIgnore]
public TOutput1 Output2 => new() { Data = new object[] { Name, 1 } }; public TOutput1 Output2 => new() { Data = new object[] { Name, 1 } };
// public static implicit operator NamedComfyNode(ComfyTypedNodeBase<TOutput1, TOutput2> node) => node.ToNamedNode();
public static implicit operator NamedComfyNode<TOutput1, TOutput2>( public static implicit operator NamedComfyNode<TOutput1, TOutput2>(
ComfyTypedNodeBase<TOutput1, TOutput2> node ComfyTypedNodeBase<TOutput1, TOutput2> node
) => (NamedComfyNode<TOutput1, TOutput2>)node.ToNamedNode(); ) => (NamedComfyNode<TOutput1, TOutput2>)node.ToNamedNode();

Loading…
Cancel
Save