https://github.com/runpod-workers/worker-sdxl-turbo
Template for building custom RunPod Endpoint API workers using SDXL Turbo for image generation.
https://github.com/runpod-workers/worker-sdxl-turbo
Last synced: 12 months ago
JSON representation
Template for building custom RunPod Endpoint API workers using SDXL Turbo for image generation.
- Host: GitHub
- URL: https://github.com/runpod-workers/worker-sdxl-turbo
- Owner: runpod-workers
- License: mit
- Created: 2024-01-27T02:50:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T20:25:09.000Z (over 1 year ago)
- Last Synced: 2025-05-30T09:27:48.106Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 15.6 KB
- Stars: 9
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SDXL Turbo Worker Template
A specialized worker template for building custom RunPod Endpoint API workers utilizing the SDXL Turbo model.
## Example Input
```json
{
"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:
```python
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()
```