|
|
@ -108,6 +108,16 @@ public partial class SamplerCardViewModel |
|
|
|
/// <inheritdoc /> |
|
|
|
/// <inheritdoc /> |
|
|
|
public void ApplyStep(ModuleApplyStepEventArgs e) |
|
|
|
public void ApplyStep(ModuleApplyStepEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// Provide temp values |
|
|
|
|
|
|
|
e.Temp.Conditioning = ( |
|
|
|
|
|
|
|
e.Builder.Connections.GetRefinerOrBaseConditioning(), |
|
|
|
|
|
|
|
e.Builder.Connections.GetRefinerOrBaseNegativeConditioning() |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
e.Temp.RefinerConditioning = ( |
|
|
|
|
|
|
|
e.Builder.Connections.RefinerConditioning!, |
|
|
|
|
|
|
|
e.Builder.Connections.RefinerNegativeConditioning! |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Apply steps from our addons |
|
|
|
// Apply steps from our addons |
|
|
|
ApplyAddonSteps(e); |
|
|
|
ApplyAddonSteps(e); |
|
|
|
|
|
|
|
|
|
|
@ -157,12 +167,8 @@ public partial class SamplerCardViewModel |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Steps = Steps, |
|
|
|
Steps = Steps, |
|
|
|
Cfg = CfgScale, |
|
|
|
Cfg = CfgScale, |
|
|
|
Positive = |
|
|
|
Positive = e.Temp.Conditioning.Positive, |
|
|
|
e.Builder.Connections.BaseConditioning |
|
|
|
Negative = e.Temp.Conditioning.Negative, |
|
|
|
?? throw new ArgumentException("No BaseConditioning"), |
|
|
|
|
|
|
|
Negative = |
|
|
|
|
|
|
|
e.Builder.Connections.BaseNegativeConditioning |
|
|
|
|
|
|
|
?? throw new ArgumentException("No BaseNegativeConditioning"), |
|
|
|
|
|
|
|
LatentImage = primaryLatent, |
|
|
|
LatentImage = primaryLatent, |
|
|
|
Denoise = DenoiseStrength, |
|
|
|
Denoise = DenoiseStrength, |
|
|
|
} |
|
|
|
} |
|
|
@ -186,12 +192,8 @@ public partial class SamplerCardViewModel |
|
|
|
Cfg = CfgScale, |
|
|
|
Cfg = CfgScale, |
|
|
|
SamplerName = e.Builder.Connections.PrimarySampler?.Name!, |
|
|
|
SamplerName = e.Builder.Connections.PrimarySampler?.Name!, |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Positive = |
|
|
|
Positive = e.Temp.Conditioning.Positive, |
|
|
|
e.Builder.Connections.BaseConditioning |
|
|
|
Negative = e.Temp.Conditioning.Negative, |
|
|
|
?? throw new ArgumentException("No BaseConditioning"), |
|
|
|
|
|
|
|
Negative = |
|
|
|
|
|
|
|
e.Builder.Connections.BaseNegativeConditioning |
|
|
|
|
|
|
|
?? throw new ArgumentException("No BaseNegativeConditioning"), |
|
|
|
|
|
|
|
LatentImage = primaryLatent, |
|
|
|
LatentImage = primaryLatent, |
|
|
|
StartAtStep = 0, |
|
|
|
StartAtStep = 0, |
|
|
|
EndAtStep = Steps, |
|
|
|
EndAtStep = Steps, |
|
|
@ -213,12 +215,8 @@ public partial class SamplerCardViewModel |
|
|
|
Cfg = CfgScale, |
|
|
|
Cfg = CfgScale, |
|
|
|
SamplerName = e.Builder.Connections.PrimarySampler?.Name!, |
|
|
|
SamplerName = e.Builder.Connections.PrimarySampler?.Name!, |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Scheduler = e.Builder.Connections.PrimaryScheduler?.Name!, |
|
|
|
Positive = |
|
|
|
Positive = e.Temp.RefinerConditioning.Positive, |
|
|
|
e.Builder.Connections.RefinerConditioning |
|
|
|
Negative = e.Temp.RefinerConditioning.Negative, |
|
|
|
?? throw new ArgumentException("No RefinerConditioning"), |
|
|
|
|
|
|
|
Negative = |
|
|
|
|
|
|
|
e.Builder.Connections.RefinerNegativeConditioning |
|
|
|
|
|
|
|
?? throw new ArgumentException("No RefinerNegativeConditioning"), |
|
|
|
|
|
|
|
// Connect to previous sampler |
|
|
|
// Connect to previous sampler |
|
|
|
LatentImage = sampler.Output, |
|
|
|
LatentImage = sampler.Output, |
|
|
|
StartAtStep = Steps, |
|
|
|
StartAtStep = Steps, |
|
|
|