Browse Source

Fix Inference Inherit Primary Sampler Addons not able to disable

pull/629/head
Ionite 8 months ago
parent
commit
c028a51d71
No known key found for this signature in database
  1. 9
      StabilityMatrix.Avalonia/Models/Inference/ModuleApplyStepEventArgs.cs
  2. 11
      StabilityMatrix.Core/Models/Api/Comfy/NodeTypes/ModelConnections.cs

9
StabilityMatrix.Avalonia/Models/Inference/ModuleApplyStepEventArgs.cs

@ -2,8 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.IO.Hashing; using System.IO.Hashing;
using System.Linq;
using System.Text; using System.Text;
using StabilityMatrix.Core.Models.Api.Comfy.Nodes; using StabilityMatrix.Core.Models.Api.Comfy.Nodes;
using StabilityMatrix.Core.Models.Api.Comfy.NodeTypes;
using StabilityMatrix.Core.Models.Inference; using StabilityMatrix.Core.Models.Inference;
namespace StabilityMatrix.Avalonia.Models.Inference; namespace StabilityMatrix.Avalonia.Models.Inference;
@ -36,7 +38,12 @@ public class ModuleApplyStepEventArgs : EventArgs
{ {
Primary = Builder.Connections.Primary, Primary = Builder.Connections.Primary,
PrimaryVAE = Builder.Connections.PrimaryVAE, PrimaryVAE = Builder.Connections.PrimaryVAE,
Models = Builder.Connections.Models Models = new Dictionary<string, ModelConnections>(
Builder.Connections.Models.ToDictionary(
pair => pair.Key,
pair => new ModelConnections(pair.Value)
)
)
}; };
} }

11
StabilityMatrix.Core/Models/Api/Comfy/NodeTypes/ModelConnections.cs

@ -5,6 +5,15 @@
/// </summary> /// </summary>
public record ModelConnections(string Name) public record ModelConnections(string Name)
{ {
public ModelConnections(ModelConnections other)
{
Name = other.Name;
Model = other.Model;
VAE = other.VAE;
Clip = other.Clip;
Conditioning = other.Conditioning;
}
public ModelNodeConnection? Model { get; set; } public ModelNodeConnection? Model { get; set; }
public VAENodeConnection? VAE { get; set; } public VAENodeConnection? VAE { get; set; }
@ -12,6 +21,4 @@ public record ModelConnections(string Name)
public ClipNodeConnection? Clip { get; set; } public ClipNodeConnection? Clip { get; set; }
public ConditioningConnections? Conditioning { get; set; } public ConditioningConnections? Conditioning { get; set; }
public ConditioningConnections? PrimarySamplerConditioning { get; set; }
} }

Loading…
Cancel
Save