{"id":28384435,"url":"https://github.com/runpod-workers/worker-sdxl","last_synced_at":"2025-06-25T23:30:45.570Z","repository":{"id":186952558,"uuid":"676009519","full_name":"runpod-workers/worker-sdxl","owner":"runpod-workers","description":"RunPod worker for Stable Diffusion XL","archived":false,"fork":false,"pushed_at":"2025-06-13T16:33:56.000Z","size":3357,"stargazers_count":32,"open_issues_count":3,"forks_count":60,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-13T17:38:14.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runpod-workers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-08T08:21:08.000Z","updated_at":"2025-06-13T16:33:26.000Z","dependencies_parsed_at":"2023-10-02T16:25:51.620Z","dependency_job_id":"153c4980-7885-4815-a418-409c7d3e5ae1","html_url":"https://github.com/runpod-workers/worker-sdxl","commit_stats":null,"previous_names":["runpod-workers/worker-sdxl"],"tags_count":24,"template":false,"template_full_name":"runpod-workers/worker-template","purl":"pkg:github/runpod-workers/worker-sdxl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fworker-sdxl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fworker-sdxl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fworker-sdxl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fworker-sdxl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runpod-workers","download_url":"https://codeload.github.com/runpod-workers/worker-sdxl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fworker-sdxl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261972456,"owners_count":23238535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-30T08:38:38.888Z","updated_at":"2025-06-25T23:30:45.562Z","avatar_url":"https://github.com/runpod-workers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SDXL Worker Banner](https://cpjrphpz3t5wbwfe.public.blob.vercel-storage.com/worker-sdxl_banner-c7nsJLBOGHnmsxcshN7kSgALHYawnW.jpeg)\n\n---\n\nRun [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) as a serverless endpoint to generate images.\n\n---\n\n[![RunPod](https://api.runpod.io/badge/runpod-workers/worker-sdxl)](https://www.runpod.io/console/hub/runpod-workers/worker-sdxl)\n\n---\n\n## Usage\n\nThe worker accepts the following input parameters:\n\n| Parameter                 | Type    | Default  | Required  | Description                                                                                                         |\n| :------------------------ | :------ | :------- | :-------- | :------------------------------------------------------------------------------------------------------------------ |\n| `prompt`                  | `str`   | `None`   | **Yes\\*** | The main text prompt describing the desired image.                                                                  |\n| `negative_prompt`         | `str`   | `None`   | No        | Text prompt specifying concepts to exclude from the image                                                           |\n| `height`                  | `int`   | `1024`   | No        | The height of the generated image in pixels                                                                         |\n| `width`                   | `int`   | `1024`   | No        | The width of the generated image in pixels                                                                          |\n| `seed`                    | `int`   | `None`   | No        | Random seed for reproducibility. If `None`, a random seed is generated                                              |\n| `scheduler`               | `str`   | `'DDIM'` | No        | The noise scheduler to use. Options include `PNDM`, `KLMS`, `DDIM`, `K_EULER`, `DPMSolverMultistep`                 |\n| `num_inference_steps`     | `int`   | `25`     | No        | Number of denoising steps for the base model                                                                        |\n| `refiner_inference_steps` | `int`   | `50`     | No        | Number of denoising steps for the refiner model                                                                     |\n| `guidance_scale`          | `float` | `7.5`    | No        | Classifier-Free Guidance scale. Higher values lead to images closer to the prompt, lower values more creative       |\n| `strength`                | `float` | `0.3`    | No        | The strength of the noise added when using an `image_url` for image-to-image or refinement                          |\n| `image_url`               | `str`   | `None`   | No        | URL of an initial image to use for image-to-image generation (runs only refiner). If `None`, performs text-to-image |\n| `num_images`              | `int`   | `1`      | No        | Number of images to generate per prompt (Constraint: must be 1 or 2)                                                |\n| `high_noise_frac`         | `float` | `None`   | No        | Fraction of denoising steps performed by the base model (e.g., 0.8 for 80%). `denoising_end` for base               |\n\n\u003e [!NOTE]  \n\u003e `prompt` is required unless `image_url` is provided\n\n### Example Request\n\n```json\n{\n  \"input\": {\n    \"prompt\": \"A majestic steampunk dragon soaring through a cloudy sky, intricate clockwork details, golden hour lighting, highly detailed\",\n    \"negative_prompt\": \"blurry, low quality, deformed, ugly, text, watermark, signature\",\n    \"height\": 1024,\n    \"width\": 1024,\n    \"num_inference_steps\": 25,\n    \"refiner_inference_steps\": 50,\n    \"guidance_scale\": 7.5,\n    \"strength\": 0.3,\n    \"high_noise_frac\": 0.8,\n    \"seed\": 42,\n    \"scheduler\": \"K_EULER\",\n    \"num_images\": 1\n  }\n}\n```\n\nwhich is producing an output like this:\n\n```json\n{\n  \"delayTime\": 11449,\n  \"executionTime\": 6120,\n  \"id\": \"447f10b8-c745-4c3b-8fad-b1d4ebb7a65b-e1\",\n  \"output\": {\n    \"image_url\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zU...\",\n    \"images\": [\n      \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zU...\"\n    ],\n    \"seed\": 42\n  },\n  \"status\": \"COMPLETED\",\n  \"workerId\": \"462u6mrq9s28h6\"\n}\n```\n\nand when you convert the base64-encoded image into an actual image, it looks like this:\n\n\u003cimg src=\"https://cpjrphpz3t5wbwfe.public.blob.vercel-storage.com/worker-sdxl_output_1-AedTpZlz1eIwIgAEShlod6syLo6Jq6.jpeg\" alt=\"SDXL Generated Image: 'A majestic steampunk dragon soaring through a cloudy sky, intricate clockwork details, golden hour lighting, highly detailed'\" width=\"512\" height=\"512\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunpod-workers%2Fworker-sdxl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunpod-workers%2Fworker-sdxl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunpod-workers%2Fworker-sdxl/lists"}