Skip to content

base_image_generation_pipeline_driver

BaseDiffusionImageGenerationPipelineDriver

Bases: ABC

Source code in griptape/drivers/image_generation_pipeline/base_image_generation_pipeline_driver.py
@define
class BaseDiffusionImageGenerationPipelineDriver(ABC):
    @abstractmethod
    def prepare_pipeline(self, model: str, device: Optional[str]) -> Any: ...

    @abstractmethod
    def make_image_param(self, image: Optional[Image]) -> Optional[dict[str, Image]]: ...

    @abstractmethod
    def make_additional_params(self, negative_prompts: Optional[list[str]], device: Optional[str]) -> dict: ...

    @property
    @abstractmethod
    def output_image_dimensions(self) -> tuple[int, int]: ...

output_image_dimensions: tuple[int, int] abstractmethod property

make_additional_params(negative_prompts, device) abstractmethod

Source code in griptape/drivers/image_generation_pipeline/base_image_generation_pipeline_driver.py
@abstractmethod
def make_additional_params(self, negative_prompts: Optional[list[str]], device: Optional[str]) -> dict: ...

make_image_param(image) abstractmethod

Source code in griptape/drivers/image_generation_pipeline/base_image_generation_pipeline_driver.py
@abstractmethod
def make_image_param(self, image: Optional[Image]) -> Optional[dict[str, Image]]: ...

prepare_pipeline(model, device) abstractmethod

Source code in griptape/drivers/image_generation_pipeline/base_image_generation_pipeline_driver.py
@abstractmethod
def prepare_pipeline(self, model: str, device: Optional[str]) -> Any: ...