Stable Diffusion Upscaler
In order to deploy the model you can use the identifier below:
- Stable Diffusion Upscaler:
sd-upscaler
This model was trained for 1.25M steps on a 10M subset of LAION containing images >2048x2048. The model was trained on crops of size 512x512 and is a text-guided latent upscaling diffusion model.
Your image must be smaller than 510px x 510px and if not, please add a width and height parameter to resize it. It does a 4x upscale so you will get a 2000x2000px image
You can follow this example of how to call the deployed endpoint:
Request Parameters
curl --location --request POST 'https://run.cerebrium.ai/sd-upscaler-webhook/predict' \
--header 'Authorization: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "A photo of a dog",
"image": <BASE_64_STRING>,
"height": 350,
"width": 350,
"file_url": "https://your-url.com",
"webhook_endpoint": "https://your-url.com"
}'
This is the Cerebrium API key used to authenticate your request. You can get it from your Cerebrium dashboard.
The prompt you would like your upscaler model to use.
A base64 encoded string of the image you would like to upscale.
The height to which you would like to resize the original image before being upscaled. It defaults to 350px. This is an optional parameter
The width to which you would like to resize the original image before being upscaled. It defaults to 350px. This is an optional parameter
A publicly accessible url of a image you would like to upscale
The url endpoint you would like us to send the image results to once it has finished generating
{
"run_id": "<UUID_STRING>",
"message": "Successfully generated image",
"result": [<BASE_64_STRING>]
}
Response Parameters
A unique identifier for the run that you can use to associate prompts with webhook endpoints.
Whether of not the response was successful
An array of base64 encoded strings of the image that you can convert into an image
curl --location --request POST 'https://run.cerebrium.ai/sd-upscaler-webhook/predict' \
--header 'Authorization: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "A photo of a dog",
"image": <BASE_64_STRING>,
"height": 350,
"width": 350,
"file_url": "https://your-url.com",
"webhook_endpoint": "https://your-url.com"
}'
{
"run_id": "<UUID_STRING>",
"message": "Successfully generated image",
"result": [<BASE_64_STRING>]
}