Skip to main content

ImageGenerator

This class defines an interface for image generators.
Concrete implementations of this protocol must provide a generate_image method that takes a string prompt as input and returns a PIL Image object.
NOTE: Current implementation does not allow you to edit a previously existing image.
Parameters:

Instance Methods

cache_key

Generates a unique cache key for the given prompt.
This key can be used to store and retrieve generated images based on the prompt.
Parameters: Returns:

generate_image

Generates an image based on the provided prompt.
Parameters: Returns: