EasyUse/PreSamplinggenerated

PreSampling (DynamicCFG)(dynamicCFGSettings)

PreSampling (DynamicCFG) node from ComfyUI-Easy-Use.

dynamic CFG Settings

pipe
image_to_latent
latent
pipe
steps
20
cfg
8
cfg_mode
COMBO
cfg_scale_min
3.5
sampler_name
COMBO
scheduler
COMBO
denoise
1.00
seed
INT
Easy Use

The PreSampling (DynamicCFG) node prepares a PIPE_LINE for sampling using a dynamic CFG schedule instead of a single fixed CFG value. The effective CFG is scaled from cfg toward cfg_scale_min according to the selected cfg_mode. It is grouped under EasyUse/PreSampling and is intended to be used before a downstream sampler that consumes the returned pipeline.

Inputs

InputTypeRequiredDefaultDescription
pipePIPE_LINEYesThe incoming pipeline containing model, conditioning, VAE, latent, and related sampler data.
stepsINTYes20Number of sampling steps. Range: 1–10000.
cfgFLOATYes8The upper CFG value used by the dynamic CFG schedule. Range: 0–100.
cfg_modeCOMBOYesSelects the dynamic CFG schedule shape. The available modes are provided by the node's combo box.
cfg_scale_minFLOATYes3.5The lower CFG value reached by the dynamic schedule. Range: 0–100, step 0.5.
sampler_nameCOMBOYesThe sampler to use for the updated pipeline.
schedulerCOMBOYesThe scheduler to use for the updated pipeline.
denoiseFLOATYes1How much of the latent to denoise. Range: 0–1, step 0.01. Use 1 for full denoise, or a lower value for image-to-image and similar workflows.
seedINTYesRandom seed for sampling. Use the same seed with the same settings for reproducible results.
image_to_latentIMAGENoOptional image used to provide the latent for the returned pipeline when no latent is supplied.
latentLATENTNoOptional pre-encoded latent to use for sampling. When provided, it is carried through the returned pipeline.

Outputs

OutputTypeDescription
pipePIPE_LINEThe updated pipeline with the chosen steps, CFG schedule, sampler, scheduler, denoise, seed, and optional latent/image-to-latent applied.

Usage Notes

  • The dynamic CFG range is bounded by cfg on the upper end and cfg_scale_min on the lower end. Setting cfg_scale_min equal to cfg makes the CFG effectively static.
  • cfg_mode determines how the CFG value changes across the sampling steps. The exact choices depend on the mode list available in the node's combo box.
  • This node does not sample by itself; it configures and returns a pipeline for another sampling node to consume.
  • For text-to-image from a pure noise latent, keep denoise at 1. Lower denoise is useful for image-to-image, inpainting, or workflows that preserve part of the original latent.
  • If neither image_to_latent nor latent is provided, the latent already contained in the incoming pipe is used.

Comments

Sign in with GitHub to join the discussion.

Loading comments…