DiffusionGenerationParams

data class DiffusionGenerationParams(val prompt: String, val negativePrompt: String = "", val width: Int = DEFAULT_SIZE, val height: Int = DEFAULT_SIZE, val sampleSteps: Int = DEFAULT_SAMPLE_STEPS, val cfgScale: Float = DEFAULT_CFG_SCALE, val distilledGuidance: Float = DEFAULT_DISTILLED_GUIDANCE, val seed: Long = RANDOM_SEED, val sampler: DiffusionSampler = DiffusionSampler.MODEL_DEFAULT, val scheduler: DiffusionScheduler = DiffusionScheduler.MODEL_DEFAULT, val clipSkip: Int = CLIP_SKIP_MODEL_DEFAULT, val vaeTiling: Boolean = false)(source)

One txt2img request. Validated on construction (including via copy); invalid values throw IllegalArgumentException before any native call.

Constructors

Link copied to clipboard
constructor(prompt: String, negativePrompt: String = "", width: Int = DEFAULT_SIZE, height: Int = DEFAULT_SIZE, sampleSteps: Int = DEFAULT_SAMPLE_STEPS, cfgScale: Float = DEFAULT_CFG_SCALE, distilledGuidance: Float = DEFAULT_DISTILLED_GUIDANCE, seed: Long = RANDOM_SEED, sampler: DiffusionSampler = DiffusionSampler.MODEL_DEFAULT, scheduler: DiffusionScheduler = DiffusionScheduler.MODEL_DEFAULT, clipSkip: Int = CLIP_SKIP_MODEL_DEFAULT, vaeTiling: Boolean = false)

Types

Link copied to clipboard
object Companion

Constants and factory functions of DiffusionGenerationParams.

Properties

Link copied to clipboard

classifier-free guidance scale (finite, >= 0; 1 disables CFG and the negative prompt).

Link copied to clipboard

CLIP layers to skip, CLIP_SKIP_MODEL_DEFAULT (-1) = the model's default.

Link copied to clipboard

guidance of distilled-guidance models such as Flux (finite, >= 0).

Link copied to clipboard
val height: Int

image height in pixels: a positive multiple of 8, at most MAX_DIMENSION.

Link copied to clipboard

what to steer away from (only used when cfgScale != 1).

Link copied to clipboard

what to draw; must not be blank.

Link copied to clipboard

sampling method.

Link copied to clipboard

denoising steps, 1..MAX_SAMPLE_STEPS. Cancellation takes effect between steps.

Link copied to clipboard

noise schedule.

Link copied to clipboard
val seed: Long

RNG seed; any negative value (RANDOM_SEED) picks a random one. The same seed, parameters, model and backend reproduce the same image.

Link copied to clipboard

decode the latent in tiles (lower peak memory for large images; reported as DiffusionPhase.VAE_TILES progress).

Link copied to clipboard
val width: Int

image width in pixels: a positive multiple of 8, at most MAX_DIMENSION.