接口 ImageModel

所有已知实现类:
DisabledImageModel

public interface ImageModel
Text to Image generator model.
  • 方法概要

    修饰符和类型
    方法
    说明
    default Response<Image>
    edit(Image image, Image mask, String prompt)
    Given an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.
    default Response<Image>
    edit(Image image, String prompt)
    Given an existing image, edit this image following the given prompt.
    generate(String prompt)
    Given a prompt, generate an image.
    default Response<List<Image>>
    generate(String prompt, int n)
    Given a prompt, generate n images.
  • 方法详细资料

    • generate

      Response<Image> generate(String prompt)
      Given a prompt, generate an image.
      参数:
      prompt - The prompt to generate an image from.
      返回:
      The generated image Response.
    • generate

      default Response<List<Image>> generate(String prompt, int n)
      Given a prompt, generate n images.

      Not supported by all models; as explicit support is needed to generate different images from the same prompt.

      参数:
      prompt - The prompt to generate images from.
      n - The number of images to generate.
      返回:
      The generated images Response.
      抛出:
      IllegalArgumentException - if the operation is not supported.
    • edit

      default Response<Image> edit(Image image, String prompt)
      Given an existing image, edit this image following the given prompt.
      参数:
      image - The image to be edited.
      prompt - The prompt to edit the image.
      返回:
      The generated image Response.
    • edit

      default Response<Image> edit(Image image, Image mask, String prompt)
      Given an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.
      参数:
      image - The image to be edited.
      mask - The image mask to apply to delimit the area to edit.
      prompt - The prompt to edit the image.
      返回:
      The generated image Response.