Skip to content

Template for building custom RunPod Endpoint API workers using SDXL Turbo for image generation.

License

Notifications You must be signed in to change notification settings

runpod-workers/worker-sdxl-turbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDXL Turbo Worker Template

A specialized worker template for building custom RunPod Endpoint API workers utilizing the SDXL Turbo model.

Example Input

{
    "input": {
        "prompt": "An image of a cat with a hat on.",
    }
}

Example Output

The output from the SDXL Turbo Worker is a base64 encoded string of the generated image. Below is an example of what this output might look like:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...

To view the image, you can decode this base64 string into an image file using a suitable tool or programming library. For instance, in Python, you can use the following snippet:

import base64
from PIL import Image
import io

# Replace 'base64_string' with your actual base64 string
base64_string = "iVBORw0KGgoAAAANSUhEUgAA..."
image_data = base64.b64decode(base64_string)
image = Image.open(io.BytesIO(image_data))
image.show()