ImageMaskingRequestParam.maskImageBlack constructor

ImageMaskingRequestParam.maskImageBlack({
  1. required List<TextPrompt> textPrompts,
  2. required Uint8List maskImage,
  3. int cfgScale = 7,
  4. ClipGuidancePreset clipGuidancePreset = ClipGuidancePreset.none,
  5. Sampler? sampler,
  6. int samples = 1,
  7. int seed = 0,
  8. int steps = 50,
  9. 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

Implementation

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}) {
  return ImageMaskingRequestParam(
    maskSource: MaskSource.maskImageBlack,
    maskImage: maskImage,
    textPrompts: textPrompts,
    stylePreset: stylePreset,
    cfgScale: cfgScale,
    clipGuidancePreset: clipGuidancePreset,
    sampler: sampler,
    samples: samples,
    seed: seed,
    steps: steps,
  );
}