Playbook’s Python SDK integrates any python application with ComfyUI. It allows you to quickly create images and videos using generative diffusion models.

Get the Python SDK

How To Use Playbook’s Python SDK

1

Install our SDK

Pip install is here!. You can install Playbook3d via

pip install playbook3d
2

Import the sdk

Import the sdk into your code with:

from playbook3d.playbookNetworkClient import PlaybookClient
3

Initialize the client

Create an Initialize function and set your api key:

def setup_playbook_client(self):
    self.playbookClient = PlaybookClient()
    self.playbookClient.set_api_key({"insert your api key here"})

Creating a run

After you pull data from the sdk, you can queue a generation using:

self.playbookClient.run_workflow(PlaybookRun: run)

Getting your results

You can either get your results from the Playbook webclient logging in with the same account or by calling:

self.playbookClient.get_run_result({PlaybookRun: run})