ImageToImageUsingImageStrengthRequestBody class final

Constructors

ImageToImageUsingImageStrengthRequestBody({List<TextPrompt> textPrompts = const [], required MultipartFile initImage, InitImageMode? initImageMode, double imageStrength = 0.35, num cfgScale = 7, ClipGuidancePreset? clipGuidancePreset, Sampler? sampler, int samples = 1, int seed = 0, int steps = 50, StylePreset? stylePreset, Object? extras})
Returns a new ImageToImageUsingImageStrengthRequestBody instance.

Properties

cfgScale num
How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)
getter/setter pair
clipGuidancePreset ClipGuidancePreset?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
extras Object?
Extra parameters passed to the engine. These parameters are used for in-development or experimental features and may change without warning, so please use with caution.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
imageStrength double
How much influence the init_image has on the diffusion process. Values close to 1 will yield images very similar to the init_image while values close to 0 will yield images wildly different than the init_image. The behavior of this is meant to mirror DreamStudio's "Image Strength" slider.

This parameter is just an alternate way to set step_schedule_start, which is done via the calculation 1 - image_strength. For example, passing in an Image Strength of 35% (0.35) would result in a step_schedule_start of 0.65.
getter/setter pair
initImage ↔ MultipartFile
Image used to initialize the diffusion process, in lieu of random noise.
getter/setter pair
initImageMode InitImageMode?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampler Sampler?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
samples int
Number of images to generate
getter/setter pair
seed int
Random noise seed (omit this option or use 0 for a random seed)
getter/setter pair
steps int
Number of diffusion steps to run
getter/setter pair
stylePreset StylePreset?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
textPrompts List<TextPrompt>
An array of text prompts to use for generation. Due to how arrays are represented in multipart/form-data requests, prompts must adhere to the format text_prompts[index][text|weight], where index is some integer used to tie the text and weight together. While index does not have to be sequential, duplicate entries will override previous entries, so it is recommended to use sequential indices. Given a text prompt with the text A lighthouse on a cliff and a weight of 0.5, it would be represented as: text_prompts[0][text]: \"A lighthouse on a cliff\" text_prompts[0][weight]: 0.5 To add another prompt to that request simply provide the values under a new index: text_prompts[0][text]: \"A lighthouse on a cliff\" text_prompts[0][weight]: 0.5 text_prompts[1][text]: \"land, ground, dirt, grass\" text_prompts[1][weight]: -0.9
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) ImageToImageUsingImageStrengthRequestBody?
Returns a new ImageToImageUsingImageStrengthRequestBody instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<ImageToImageUsingImageStrengthRequestBody>
mapFromJson(dynamic json) Map<String, ImageToImageUsingImageStrengthRequestBody>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<ImageToImageUsingImageStrengthRequestBody>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.