dgenerate.pipelinewrapper.constants.LATENTS_PROCESSOR_SEP = '+'

Used to separate unique latents processor chains when running processors on batched latents input.

dgenerate.pipelinewrapper.constants.DEFAULT_INFERENCE_STEPS = 30

Default value for inference steps.

dgenerate.pipelinewrapper.constants.DEFAULT_GUIDANCE_SCALE = 5.0

Default value for guidance scale.

dgenerate.pipelinewrapper.constants.DEFAULT_IMAGE_SEED_STRENGTH = 0.8

Default image seed strength for img2img.

dgenerate.pipelinewrapper.constants.DEFAULT_IMAGE_GUIDANCE_SCALE = 1.5

Default image guidance scale for pix2pix.

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_HIGH_NOISE_FRACTION = 0.8

Default SDXL high noise fraction.

dgenerate.pipelinewrapper.constants.DEFAULT_X4_UPSCALER_NOISE_LEVEL = 20

Default x4 upscaler noise level.

dgenerate.pipelinewrapper.constants.DEFAULT_FLOYD_SUPERRESOLUTION_NOISE_LEVEL = 250

Default noise level for floyd super resolution upscalers.

dgenerate.pipelinewrapper.constants.DEFAULT_FLOYD_SUPERRESOLUTION_IMG2IMG_NOISE_LEVEL = 250

Default noise level for floyd super resolution upscalers when performing img2img.

dgenerate.pipelinewrapper.constants.DEFAULT_FLOYD_SUPERRESOLUTION_INPAINT_NOISE_LEVEL = 0

Default noise level for floyd super resolution upscalers when inpainting.

dgenerate.pipelinewrapper.constants.DEFAULT_OUTPUT_WIDTH = 512

Default output width for txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_OUTPUT_HEIGHT = 512

Default output height for txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_OUTPUT_WIDTH = 1024

Default output width for SDXL txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_OUTPUT_HEIGHT = 1024

Default output height for SDXL txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_KOLORS_OUTPUT_WIDTH = 1024

Default output width for Kolors txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_KOLORS_OUTPUT_HEIGHT = 1024

Default output height for Kolors txt2img.

dgenerate.pipelinewrapper.constants.DEFAULT_FLOYD_IF_OUTPUT_WIDTH = 64

Default output width for Deep Floyd IF txt2img first stage.

dgenerate.pipelinewrapper.constants.DEFAULT_FLOYD_IF_OUTPUT_HEIGHT = 64

Default output height for Deep Floyd IF txt2img first stage.

dgenerate.pipelinewrapper.constants.DEFAULT_SEED = 0

Default RNG seed.

dgenerate.pipelinewrapper.constants.DEFAULT_INPAINT_CROP_PADDING = 32

Default padding in pixels for inpaint crop operations. Applied on all sides around the mask bounds.

dgenerate.pipelinewrapper.constants.DEFAULT_S_CASCADE_DECODER_GUIDANCE_SCALE = 0

Default guidance scale for the Stable Cascade decoder.

dgenerate.pipelinewrapper.constants.DEFAULT_S_CASCADE_DECODER_INFERENCE_STEPS = 10

Default inference steps for the Stable Cascade decoder.

dgenerate.pipelinewrapper.constants.DEFAULT_S_CASCADE_OUTPUT_HEIGHT = 1024

Default output height for Stable Cascade.

dgenerate.pipelinewrapper.constants.DEFAULT_S_CASCADE_OUTPUT_WIDTH = 1024

Default output width for Stable Cascade.

dgenerate.pipelinewrapper.constants.DEFAULT_SD3_OUTPUT_HEIGHT = 1024

Default output height for Stable Diffusion 3.

dgenerate.pipelinewrapper.constants.DEFAULT_SD3_OUTPUT_WIDTH = 1024

Default output width for Stable Diffusion 3.

dgenerate.pipelinewrapper.constants.DEFAULT_FLUX_OUTPUT_HEIGHT = 1024

Default output height for Flux.

dgenerate.pipelinewrapper.constants.DEFAULT_FLUX_OUTPUT_WIDTH = 1024

Default output width for Flux.

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_MASK_SHAPE = 'rectangle'

Default detector mask shape

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_MASK_PADDING = 32

Default adetailer mask padding

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_DETECTOR_PADDING = 0

Default detector padding

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_DETECTOR_CONFIDENCE = 0.3

Default detector confidence

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_MASK_DILATION = 4

Default adetailer mask dilation

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_MODEL_MASKS = False

Default adetailer model masks setting.

dgenerate.pipelinewrapper.constants.DEFAULT_ADETAILER_MASK_BLUR = 4

Default adetailer mask blur.

dgenerate.pipelinewrapper.constants.DEFAULT_YOLO_DETECTOR_PADDING = 0

Default YOLO detector padding.

dgenerate.pipelinewrapper.constants.DEFAULT_YOLO_MASK_SHAPE = 'rectangle'

Default YOLO mask shape.

dgenerate.pipelinewrapper.constants.DEFAULT_PAG_SCALE = 3.0

Default pag scale

dgenerate.pipelinewrapper.constants.DEFAULT_PAG_ADAPTIVE_SCALE = 0.0

Default pag adaptive scale

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_REFINER_PAG_SCALE = 3.0

Default sdxl refiner pag scale

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_REFINER_PAG_ADAPTIVE_SCALE = 0.0

Default sdxl refiner pag adaptive scale

dgenerate.pipelinewrapper.constants.DEFAULT_TEA_CACHE_REL_L1_THRESHOLD = 0.6

Default relative L1 threshold for TeaCache (Timestep Embedding Aware Cache) for Flux.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_SAMPLE_RATIO = 0.5

Default sample ratio for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls the average sample ratio for each RAS step, must be between 0 and 1.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_HIGH_RATIO = 1.0

Default high ratio for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls the ratio of high-value tokens to be cached in RAS, must be between 0 and 1.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_STARVATION_SCALE = 0.1

Default starvation scale for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls the starvation scale in RAS patch selection, typically between 0 and 1.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_ERROR_RESET_STEPS = [12, 22]

Default error reset steps for RAS (Reinforcement Attention System) for Stable Diffusion 3. Comma-separated string of step numbers for dense sampling steps to reset accumulated error in RAS.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_METRIC = 'std'

Default RAS metric for RAS (Reinforcement Attention System) for Stable Diffusion 3.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_START_STEP = 4

Default starting step for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls when RAS begins applying its sampling strategy.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_SKIP_NUM_STEP = 0

Default skip num step for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls the number of steps to skip between RAS steps. The actual number of tokens skipped will be rounded down to the nearest multiple of 64 to ensure efficient memory access patterns for attention computation. When used with skip_num_step_length greater than 0, this value determines how the number of skipped tokens changes over time.

dgenerate.pipelinewrapper.constants.DEFAULT_RAS_SKIP_NUM_STEP_LENGTH = 0

Default skip num step length for RAS (Reinforcement Attention System) for Stable Diffusion 3. Controls the length of steps to skip between RAS steps. When set to 0, static dropping is used where the number of skipped tokens remains constant. When greater than 0, dynamic dropping is enabled where the number of skipped tokens varies over time based on skip_num_step. The pattern of skipping will repeat every skip_num_step_length steps.

dgenerate.pipelinewrapper.constants.DEFAULT_DEEP_CACHE_INTERVAL = 5

Default cache interval for DeepCache. Controls how frequently the attention layers are cached during the diffusion process.

dgenerate.pipelinewrapper.constants.DEFAULT_DEEP_CACHE_BRANCH_ID = 1

Default branch ID for DeepCache. Controls which branches to apply DeepCache to in the UNet.

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_REFINER_DEEP_CACHE_INTERVAL = 5

Default cache interval for DeepCache on SDXL Refiner. Controls how frequently the attention layers are cached during the diffusion process.

dgenerate.pipelinewrapper.constants.DEFAULT_SDXL_REFINER_DEEP_CACHE_BRANCH_ID = 1

Default branch ID for DeepCache on SDXL Refiner. Controls which branches to apply DeepCache to in the UNet.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_MAX_DOWNSAMPLE = 1

Maximum downsample factor for SD models. Controls the maximum downsample factor in the SADA algorithm. Lower values can improve quality but may reduce speedup.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_SX = 3

Spatial downsample factor X for SD models. Controls the spatial downsample factor in the X dimension. Higher values can increase speedup but may affect quality.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_SY = 3

Spatial downsample factor Y for SD models. Controls the spatial downsample factor in the Y dimension. Higher values can increase speedup but may affect quality.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_LAGRANGE_TERM = 4

Lagrangian interpolation terms for SD models. Number of terms to use in Lagrangian interpolation. Set to 0 to disable Lagrangian interpolation.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_LAGRANGE_INT = 4

Lagrangian interpolation interval for SD models. Interval for Lagrangian interpolation. Must be compatible with lagrange_step.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_LAGRANGE_STEP = 24

Lagrangian interpolation step for SD models. Step value for Lagrangian interpolation. Must be compatible with lagrange_int.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SD_MAX_FIX = 5 * 1024

Maximum fixed memory for SD models. Maximum amount of fixed memory to use in SADA optimization.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_MAX_DOWNSAMPLE = 2

Maximum downsample factor for SDXL/Kolors models. Controls the maximum downsample factor in the SADA algorithm. Higher than SD defaults for better speedup on larger models.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_SX = 3

Spatial downsample factor X for SDXL/Kolors models. Controls the spatial downsample factor in the X dimension.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_SY = 3

Spatial downsample factor Y for SDXL/Kolors models. Controls the spatial downsample factor in the Y dimension.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_LAGRANGE_TERM = 4

Lagrangian interpolation terms for SDXL/Kolors models. Number of terms to use in Lagrangian interpolation.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_LAGRANGE_INT = 4

Lagrangian interpolation interval for SDXL/Kolors models. Interval for Lagrangian interpolation. Must be compatible with lagrange_step.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_LAGRANGE_STEP = 24

Lagrangian interpolation step for SDXL/Kolors models. Step value for Lagrangian interpolation. Must be compatible with lagrange_int.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_SDXL_MAX_FIX = 10 * 1024

Maximum fixed memory for SDXL/Kolors models. Maximum amount of fixed memory to use in SADA optimization. Higher than SD defaults due to larger model size.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_MAX_DOWNSAMPLE = 0

Maximum downsample factor for Flux models. Set to 0 as Flux uses a different architecture that doesn’t use spatial downsampling.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_SX = 0

Spatial downsample factor X for Flux models. Not used for Flux architecture, set to 0.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_SY = 0

Spatial downsample factor Y for Flux models. Not used for Flux architecture, set to 0.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_LAGRANGE_TERM = 3

Lagrangian interpolation terms for Flux models. Number of terms to use in Lagrangian interpolation. Lower than SD/SDXL defaults for Flux architecture.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_LAGRANGE_INT = 4

Lagrangian interpolation interval for Flux models. Interval for Lagrangian interpolation. Must be compatible with lagrange_step.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_LAGRANGE_STEP = 20

Lagrangian interpolation step for Flux models. Step value for Lagrangian interpolation. Must be compatible with lagrange_int. Lower than SD/SDXL defaults for Flux architecture.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_FLUX_MAX_FIX = 0

Maximum fixed memory for Flux models. Set to 0 as Flux uses a different optimization approach.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_ACC_RANGE = (10, 47)

Acceleration range start / end step for all models. Defines the starting step for SADA acceleration.

Start step must be at least 3 as SADA leverages third-order dynamics.

dgenerate.pipelinewrapper.constants.DEFAULT_SADA_MAX_INTERVAL = 4

Maximum interval for optimization for all models. Maximum interval between optimizations in the SADA algorithm.

dgenerate.pipelinewrapper.constants.PIPELINE_CACHE_MEMORY_CONSTRAINTS = ['pipeline_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side diffusion pipeline cache upon a new diffusion pipeline being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached diffusion pipeline objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and pipeline_size (the estimated size of the new pipeline before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.UNET_CACHE_MEMORY_CONSTRAINTS = ['unet_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side unet model cache upon a new unet model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached unet objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and unet_size (the estimated size of the new UNet before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.VAE_CACHE_MEMORY_CONSTRAINTS = ['vae_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side vae model cache upon a new vae model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached vae objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and vae_size (the estimated size of the new VAE before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.CONTROLNET_CACHE_MEMORY_CONSTRAINTS = ['controlnet_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side controlnet model cache upon a new controlnet model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached controlnet objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and controlnet_size (the estimated size of the new ControlNet before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.ADAPTER_CACHE_MEMORY_CONSTRAINTS = ['adapter_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side adapter model cache upon a new adapter model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached adapter objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and adapter_size (the estimated size of the new T2IAdapter before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.TEXT_ENCODER_CACHE_MEMORY_CONSTRAINTS = ['text_encoder_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side text encoder model cache upon a new text encoder model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached text encoder objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and text_encoder_size (the estimated size of the new Text Encoder before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.IMAGE_ENCODER_CACHE_MEMORY_CONSTRAINTS = ['image_encoder_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side image encoder model cache upon a new image encoder model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached image encoder objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and image_encoder_size (the estimated size of the new Image Encoder before it is brought into memory, in bytes)

dgenerate.pipelinewrapper.constants.TRANSFORMER_CACHE_MEMORY_CONSTRAINTS = ['transformer_size > (available * 0.75)']

Cache constraint expressions for when to clear the CPU side transformer model cache upon a new transformer model being created, syntax provided via dgenerate.memory.memory_constraints()

If any of these constraints are met, all cached transformer objects will be garbage collected.

Extra variables include: cache_size (the current estimated cache size in bytes), and transformer_size (the estimated size of the new transformer model before it is brought into memory, in bytes)