ImageMaskingRequestParam class

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

ImageMaskingRequestParam({required MaskSource maskSource, required List<TextPrompt> textPrompts, Uint8List? maskImage, int cfgScale = 7, ClipGuidancePreset clipGuidancePreset = ClipGuidancePreset.none, Sampler? sampler, int samples = 1, int seed = 0, int steps = 50, required StylePreset stylePreset})
ImageMaskingRequestParam.fromJson(Map<String, dynamic> json)
factory
ImageMaskingRequestParam.initImageAlpha({required List<TextPrompt> textPrompts, required Uint8List maskImage, int cfgScale = 7, ClipGuidancePreset clipGuidancePreset = ClipGuidancePreset.none, Sampler? sampler, int samples = 1, int seed = 0, int steps = 50, required StylePreset stylePreset})
will use the alpha channel of the init_image as the mask, where fully transparent pixels are completely replaced and fully opaque pixels are unchanged
factory
ImageMaskingRequestParam.maskImageBlack({required List<TextPrompt> textPrompts, required Uint8List maskImage, int cfgScale = 7, ClipGuidancePreset clipGuidancePreset = ClipGuidancePreset.none, Sampler? sampler, int samples = 1, int seed = 0, int steps = 50, required StylePreset stylePreset})
will use the black pixels of the mask_image as the mask, where black pixels are completely replaced and white pixels are unchanged
factory
ImageMaskingRequestParam.maskImageWhite({required List<TextPrompt> textPrompts, required Uint8List maskImage, int cfgScale = 7, ClipGuidancePreset clipGuidancePreset = ClipGuidancePreset.none, Sampler? sampler, int samples = 1, int seed = 0, int steps = 50, required StylePreset stylePreset})
will use the white pixels of the mask_image as the mask, where white pixels are completely replaced and black pixels are unchanged
factory

Properties

cfgScale int
How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)
getter/setter pair
clipGuidancePreset ClipGuidancePreset
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maskImage Uint8List?
getter/setter pair
maskSource MaskSource
Image used to initialize the diffusion process, in lieu of random noise.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampler Sampler?
Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you.
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
Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.
getter/setter pair
textPrompts List<TextPrompt>
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.
inherited