3. Output batches

Now you have a fine-tuned version of Stable Diffusion, customised to your own dataset (aka input batch), we can create some generations. Here you can pass as many prompts as you want. They'll be generated and stored on our cloud storage platform.

POST /output-batches

Request

Your request must be encoded as application/json.

{ "finetune_id": "0111c2ec-dc83-4004-8ec1-011fdcb39bb9", "prompts": [ "portrait painting of TOKEN by Leonardo da Vinci", "hyperrealistic photo of TOKEN as a forest elf" ], "num_steps": 50, "cfg_scale": 11.0, "seed": 72394, "on_complete_webhook": "https://webhooks.myapp.com/ping", "label": "first test batch of generations" }

finetune_id (required)

Pass the id of your trained model so our servers know from which finetune to generate images.

Make sure you've made a finetune before you try to create an output batch.

prompts (required)

A list of prompts for steering the model's denoising process towards your desired generation. Use TOKEN in place of your subject's identifier. Minimum: 1 prompt. Maximum: 50 prompts.

Write TOKEN wherever you would put the name of your subject. For example: 'portrait painting of TOKEN by Leonardo da Vinci'.

num_steps

Default: 50. Optionally set the number of inference steps (also known as denoising steps). Minimum: 1. Maximum: 100.

cfg_scale

Default: 7.5 Optionally set the classifier-free guidance scale (also known as guidance scale).

seed

Default: 42. Optionally set the seed of your starting noise in order to create reproducible results. Minimum: 0

on_complete_webhook

Default: null. Optionally pass an endpoint which our servers will ping once the finetune is set to state complete. We will send a POST request with this body:

{ "id": "a8a93c2d-dc3a-4ed7-87c2-b58d6f492d29", "state": "complete", "created_at": "2022-11-02T22:59:36.961061+00:00", "completed_at": "2022-11-02T23:06:31.938173+00:00", "label": "first test batch of generations" }

label

Optionally add a label to your output batch, for easier management of your generated images.

Response

{ "id": "a8a93c2d-dc3a-4ed7-87c2-b58d6f492d29", "label": "first test batch of generations", "state": "queue", "created_at": "2022-11-02T22:59:36.961061+00:00", "completed_at": null }

GET /output-batches/{output_batch_id}

Response

{ "id": "a8a93c2d-dc3a-4ed7-87c2-b58d6f492d29", "label": "first test batch of generations", "state": "complete", "created_at": "2022-11-02T22:59:36.961061+00:00", "completed_at": "2022-11-02T23:06:31.938173+00:00", "finetune_id": "0111c2ec-dc83-4004-8ec1-011fdcb39bb9", "prompts": [ "portrait painting of TOKEN by Leonardo da Vinci", "hyperrealistic photo of TOKEN as a forest elf" ], "num_steps": 50, "cfg_scale": 11.0, "seed": 72394, "on_complete_webhook": "https://webhooks.myapp.com/ping-on-output-batch-complete" }