Text elements that specify the content to include in the image.
Use this type to wrap pieces of text describing the image you
want to create. You can also specify larger pieces of text
that contain important concepts to extract and use to guide
the image-creation process.
Creates a concept structure that includes a short text description.
- Parameters:
- text: The text that describes the image. Your text must be relatively
short, so specify single words or brief sentences. If you specify a
string that exceeds the model’s supported maximum string length, the
system tries to extract important or interesting concepts and use those instead.
- Returns: A concept object that encapsulates the specified text.
Call this method when you want to use short strings to generate an image.
The system passes short strings in their entirety as input to the diffusion
model. If you provide a long string, the system tries to extract only the
relevant details and pass those to the model instead.
Creates a concept structure from the image at the specified URL.
- Parameters:
- url: The URL of a local file that contains the image you want to
pass to the diffusion model.
Call this method when you want to use an image as the basis for generating
a new image. Typically, you include other text-based concept structures in
addition to this one. Include at most one image among the collection of
concepts. Including more than one image yields unpredictable image results.
Creates a concept structure from the specified image object.
- Parameters:
- image: The image you want to pass to the diffusion model.
Call this method when you want to use an image as the basis for generating a
new image. Typically, you include other text-based concept structures in
addition to this one. Include at most one image among the collection of
concepts. Including more than one image yields unpredictable image results.
Creates a concept structure from a PencilKit drawing.
- Parameters:
- drawing: A PencilKit drawing object that contains a set of strokes.
The system uses this drawing, along with other concepts, to guide the
image creation.
Call this method when you want to use a PencilKit drawing as the basis for
generating a new image. Typically, you include other text-based concept structures
in addition to this one. Include at most one PencilKit drawing among a collection
of concepts. Including more than one drawing yields unpredictable image results.
Creates a concept structure from a long-form string and a title that
guides the extraction of concepts from that string.
- Parameters:
- text: A long text description, such as a paragraph or document. You
can specify any length string you want. For strings above a minimum
length, the system extracts important or interesting concepts using
the contents of `title` as a guide. It converts the concepts it extracts
into a separate input prompts for the diffusion model. For strings
below the minimum length, the system passes the entire string to the model.
- title: A concise summary of the text you pass in the `text` parameter.
The system uses this string as a guide to extract concepts from the `text` parameter.
- Returns: A concept object that encapsulates the concepts from the specified text.
Call this method when you want to use long-form text to generate an image. The
method extracts relevant details from the text and uses them to create the returned object.