IDallE3Model<T>

Interfaces · AiDotNet.Interfaces

Defines the contract for DALL-E 3-style text-to-image generation models.

Known implementations: DallE3Model<T>

For Beginners

DALL-E 3 creates images from text descriptions!

Key capabilities:

  • High-fidelity image generation from text prompts
  • Accurate text rendering within images
  • Complex scene composition with multiple objects
  • Style control (vivid vs natural)
  • Multiple aspect ratios and sizes

Architecture concepts:

  1. Text Encoder: Understands and expands prompts
  2. Diffusion Model: Generates images through iterative denoising
  3. Safety Systems: Filters inappropriate content
  4. Quality Enhancement: Upscaling and refinement

How It Works

DALL-E 3 represents a significant advancement in text-to-image generation, with improved prompt following, text rendering, and overall image quality. It uses a combination of diffusion models and language understanding.

Properties

Property Summary
IReadOnlyList<DallE3ImageSize> SupportedSizes { get; } Gets the supported image sizes.
bool SupportsEditing { get; } Gets whether the model supports image editing (inpainting).
bool SupportsVariations { get; } Gets whether the model supports image variations.
int MaxPromptLength { get; } Gets the maximum prompt length in characters.

Methods

Method Summary
IEnumerable<Tensor<T>> CreateVariations(Tensor<T> image, int count, double variationStrength, DallE3ImageSize size) Generates variations of an existing image.
IEnumerable<Tensor<T>> GenerateConsistentSet(string basePrompt, IEnumerable<string> variations, int consistencySeed, DallE3ImageSize size) Generates a consistent set of images (same character/scene, different poses/angles).
IEnumerable<Tensor<T>> GenerateMultiple(string prompt, int count, DallE3ImageSize size, DallE3Quality quality, DallE3Style style) Generates multiple images from a text prompt.
Tensor<T> Edit(Tensor<T> image, Tensor<T> mask, string prompt, DallE3ImageSize size) Edits an existing image based on a prompt and mask.
Tensor<T> Generate(string prompt, DallE3ImageSize size, DallE3Quality quality, DallE3Style style, int? seed) Generates an image from a text prompt.
Tensor<T> GenerateForUseCase(string prompt, string useCase, DallE3ImageSize size) Generates an image optimized for a specific use case.
Tensor<T> GenerateTileable(string prompt, DallE3ImageSize size) Generates a seamlessly tileable image.
Tensor<T> GenerateWithComposition(string prompt, IEnumerable<ValueTuple<string, string, double>> compositionGuide, DallE3ImageSize size) Generates an image with controlled composition.
Tensor<T> GenerateWithStyle(string prompt, string artisticStyle, DallE3ImageSize size, DallE3Quality quality) Generates an image in a specific artistic style.
Tensor<T> GenerateWithText(string prompt, string textToRender, string textPlacement, DallE3ImageSize size) Generates an image with specific text rendered in it.
Tensor<T> Outpaint(Tensor<T> image, string direction, int extensionPixels, string prompt) Outpaints an image, extending it beyond its original boundaries.
Tensor<T> Upscale(Tensor<T> image, int scaleFactor, bool enhanceDetails) Upscales an image to higher resolution.
ValueTuple<T, IEnumerable<string>> EstimateQuality(string prompt) Estimates the generation quality before actually generating.
ValueTuple<Tensor<T>, string> GenerateWithPrompt(string prompt, DallE3ImageSize size, DallE3Quality quality, DallE3Style style) Generates an image with the revised/expanded prompt returned.
ValueTuple<bool, IEnumerable<string>> CheckPromptSafety(string prompt) Checks if a prompt is likely to be rejected for safety reasons.
string ExpandPrompt(string simplePrompt, DallE3Style style) Expands a simple prompt into a more detailed description.