@ -110,6 +110,9 @@ public class ComfyNodeBuilder
[Range(1, 10)]
public required int Steps { get ; init ; }
[Range(0, 1.0)]
public required double Denoise { get ; init ; }
}
public record EmptyLatentImage : ComfyTypedNodeBase < LatentNodeConnection >
@ -147,7 +150,11 @@ public class ComfyNodeBuilder
return new NamedComfyNode < ImageNodeConnection > ( name )
{
ClassType = "ImageUpscaleWithModel" ,
Inputs = new Dictionary < string , object? > { [ "upscale_model" ] = upscaleModel . Data , [ "image" ] = image . Data }
Inputs = new Dictionary < string , object? >
{
["upscale_model"] = upscaleModel . Data ,
["image"] = image . Data
}
} ;
}
@ -272,7 +279,8 @@ public class ComfyNodeBuilder
public required string ControlNetName { get ; init ; }
}
public record ControlNetApplyAdvanced : ComfyTypedNodeBase < ConditioningNodeConnection , ConditioningNodeConnection >
public record ControlNetApplyAdvanced
: ComfyTypedNodeBase < ConditioningNodeConnection , ConditioningNodeConnection >
{
public required ConditioningNodeConnection Positive { get ; init ; }
public required ConditioningNodeConnection Negative { get ; init ; }
@ -365,7 +373,9 @@ public class ComfyNodeBuilder
. Output ,
image = >
Nodes
. AddNamedNode ( ImageScale ( $"{name}_ImageUpscale" , image , upscaleInfo . Name , height , width , false ) )
. AddNamedNode (
ImageScale ( $"{name}_ImageUpscale" , image , upscaleInfo . Name , height , width , false )
)
. Output
) ;
}
@ -376,7 +386,11 @@ public class ComfyNodeBuilder
var samplerImage = GetPrimaryAsImage ( primary , vae ) ;
// Do group upscale
var modelUpscaler = Group_UpscaleWithModel ( $"{name}_ModelUpscale" , upscaleInfo . Name , samplerImage ) ;
var modelUpscaler = Group_UpscaleWithModel (
$"{name}_ModelUpscale" ,
upscaleInfo . Name ,
samplerImage
) ;
// Since the model upscale is fixed to model (2x/4x), scale it again to the requested size
var resizedScaled = Nodes . AddNamedNode (
@ -432,7 +446,11 @@ public class ComfyNodeBuilder
) ;
// Do group upscale
var modelUpscaler = Group_UpscaleWithModel ( $"{name}_ModelUpscale" , upscaleInfo . Name , samplerImage . Output ) ;
var modelUpscaler = Group_UpscaleWithModel (
$"{name}_ModelUpscale" ,
upscaleInfo . Name ,
samplerImage . Output
) ;
// Since the model upscale is fixed to model (2x/4x), scale it again to the requested size
var resizedScaled = Nodes . AddNamedNode (
@ -506,7 +524,11 @@ public class ComfyNodeBuilder
) ;
// Do group upscale
var modelUpscaler = Group_UpscaleWithModel ( $"{name}_ModelUpscale" , upscaleInfo . Name , samplerImage . Output ) ;
var modelUpscaler = Group_UpscaleWithModel (
$"{name}_ModelUpscale" ,
upscaleInfo . Name ,
samplerImage . Output
) ;
// Since the model upscale is fixed to model (2x/4x), scale it again to the requested size
var resizedScaled = Nodes . AddNamedNode (
@ -706,7 +728,10 @@ public class ComfyNodeBuilder
return Connections . Primary . AsT1 ;
}
return GetPrimaryAsImage ( Connections . Primary ? ? throw new NullReferenceException ( "No primary connection" ) , vae ) ;
return GetPrimaryAsImage (
Connections . Primary ? ? throw new NullReferenceException ( "No primary connection" ) ,
vae
) ;
}
/// <summary>
@ -756,7 +781,9 @@ public class ComfyNodeBuilder
public ConditioningNodeConnection GetRefinerOrBaseConditioning ( )
{
return RefinerConditioning ? ? BaseConditioning ? ? throw new NullReferenceException ( "No Conditioning" ) ;
return RefinerConditioning
? ? BaseConditioning
? ? throw new NullReferenceException ( "No Conditioning" ) ;
}
public ConditioningNodeConnection GetRefinerOrBaseNegativeConditioning ( )