Skip to content

griptape-ai/griptape-black-forest

Repository files navigation

Griptape Black Forest Extension

Overview

This extension provides an Image Generation Driver for Black Forest Labs.

from griptape.black_forest.drivers.black_forest_image_generation_driver import (
    BlackForestImageGenerationDriver,
)
from griptape.structures import Agent
from griptape.tools import FileManagerTool, PromptImageGenerationTool

agent = Agent(
    tools=[
        PromptImageGenerationTool(
            image_generation_driver=BlackForestImageGenerationDriver(
                    model="flux-pro-1.1"
            ),
            off_prompt=True,
        ),
        FileManagerTool(),
    ]
)

agent.run(
    "Save a cinematic, realistic picture of a dog riding a skateboard to the assets directory as dog_skateboard_cinematic.jpeg"
)

Output image:

Realistic picture of a dog riding a skateboard

Variations

The model offers opportunities to create variations of images using the PromptImageVariationTool. You can find examples of agents performing the task in the examples/drivers folder.

Redux


InPainting


OutPainting

  • example_agent_outpainting.py
  • model: flux-pro-1.0
  • prompt: "Replace the environment with boat at sea, using the assets/dog_skateboard_env_mask.jpeg."

Depth

  • example_agent_depth.py
  • model: flux-pro-1.0-depth
  • prompt: "Set in a jungle, dog rides on a skateboard, use assets/dog_skateboard_cinematic.jpeg as the control image."

Canny

  • example_agent_canny.py
  • model: flux-pro-1.0-canny
  • prompt: "Childrens messy crayon drawing of a dog on a skateboard, use assets/dog_skateboard_cinematic.jpeg as the control image"

Installation

Poetry:

poetry add git+https://github.com/griptape-ai/griptape-black-forest.git

Pip:

pip install git+https://github.com/griptape-ai/griptape-black-forest.git

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published