image_generation
__all__ = ['BaseImageGenerationDriver', 'BaseMultiModelImageGenerationDriver']
module-attribute
BaseImageGenerationDriver
Bases: SerializableMixin
, ExponentialBackoffMixin
, ABC
Source code in griptape/drivers/image_generation/base_image_generation_driver.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
model: str = field(kw_only=True, metadata={'serializable': True})
class-attribute
instance-attribute
after_run()
before_run(prompts, negative_prompts=None)
run_image_inpainting(prompts, image, mask, negative_prompts=None)
Source code in griptape/drivers/image_generation/base_image_generation_driver.py
run_image_outpainting(prompts, image, mask, negative_prompts=None)
Source code in griptape/drivers/image_generation/base_image_generation_driver.py
run_image_variation(prompts, image, negative_prompts=None)
Source code in griptape/drivers/image_generation/base_image_generation_driver.py
run_text_to_image(prompts, negative_prompts=None)
Source code in griptape/drivers/image_generation/base_image_generation_driver.py
try_image_inpainting(prompts, image, mask, negative_prompts=None)
abstractmethod
try_image_outpainting(prompts, image, mask, negative_prompts=None)
abstractmethod
try_image_variation(prompts, image, negative_prompts=None)
abstractmethod
BaseMultiModelImageGenerationDriver
Bases: BaseImageGenerationDriver
, ABC
Image Generation Driver for platforms like Amazon Bedrock that host many LLM models.
Instances of this Image Generation Driver require a Image Generation Model Driver which is used to structure the image generation request in the format required by the model and to process the output.
Attributes:
Name | Type | Description |
---|---|---|
image_generation_model_driver |
BaseImageGenerationModelDriver
|
Image Model Driver to use. |