{"id":20697957,"url":"https://github.com/fly-apps/cog-sd3","last_synced_at":"2025-09-27T08:31:13.669Z","repository":{"id":244266110,"uuid":"814610649","full_name":"fly-apps/cog-sd3","owner":"fly-apps","description":"Run Stable Diffusion 3 Medium as a Replicate Cog on Fly.io","archived":false,"fork":false,"pushed_at":"2024-06-14T12:14:05.000Z","size":5416,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-17T00:25:19.333Z","etag":null,"topics":["ai","gpu","stable-diffusion","stable-diffusion-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fly-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-06-13T10:48:11.000Z","updated_at":"2024-10-18T10:41:13.000Z","dependencies_parsed_at":"2024-06-13T19:09:45.313Z","dependency_job_id":null,"html_url":"https://github.com/fly-apps/cog-sd3","commit_stats":null,"previous_names":["fly-apps/cog-sd3"],"tags_count":0,"template":true,"template_full_name":"fly-apps/cog-whisper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fcog-sd3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fcog-sd3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fcog-sd3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fcog-sd3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-apps","download_url":"https://codeload.github.com/fly-apps/cog-sd3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234414739,"owners_count":18829129,"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":["ai","gpu","stable-diffusion","stable-diffusion-3"],"created_at":"2024-11-17T00:20:56.804Z","updated_at":"2025-09-27T08:31:13.337Z","avatar_url":"https://github.com/fly-apps.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eSD3 Medium GPU Demo\u003c/h1\u003e\n    \u003cp\u003eRun \u003cstrong\u003e\u003ca href=\"https://stability.ai/news/stable-diffusion-3-medium\"\u003eStable Diffusion 3 Medium\u003c/a\u003e\u003c/strong\u003e as a Replicate Cog on Fly.io!\u003c/p\u003e\n\u003c/div\u003e\n\n![0614](https://github.com/fly-apps/cog-sd3/assets/3727384/c026fcf9-79a9-40eb-ae7c-6f1be6801b84)\n\nStable Diffusion 3 Medium is Stability AI's most advanced text-to-image open model yet. This demo exposes the model via a simple HTTP server, thanks to [Replicate Cog](https://github.com/replicate/cog). Cog is an open-source tool that lets you package machine learning models in a standard, production-ready container. When you're up and running, you can generate images using the `/predictions` endpoint. Images are automatically stored in object-storage on [Tigris](https://www.tigrisdata.com/) (you'll need to make sure you add a bucket to the app).\n\n## Deploy to Fly.io\n\n\u003e [!IMPORTANT]  \n\u003e Before you deploy, you'll need to get access to the model on Hugging Face by filling out the form in the model [repo](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers/tree/main).\n\n```sh\nfly apps create --name [APP_NAME]\n\nfly storage create\n\nfly secrets set HUGGING_FACE_HUB_TOKEN=\u003cHUGGING_FACE_TOKEN\u003e\n\ncog push registry.fly.io/[APP_NAME]:latest --use-cuda-base-image false\n\n```\nNow replace `image` in your fly.toml, then:\n\n```sh\nfly deploy\n```\n\n## Example Request\n\n```sh\ncurl --silent https://[APP_NAME].fly.dev/predictions \\\n    --request POST \\\n    --header \"Content-Type: application/json\" \\\n    --data @- \u003c\u003c 'EOF'\n{\n    \"input\": {\n        \"prompt\": \"a magical forest\",\n        \"aspect_ratio\": \"3:2\",\n        \"output_quality\": 100\n    }\n}\nEOF\n```\n\nNow view your image at `https://fly.storage.tigris.dev/[BUCKET_NAME]/[OUTPUT_IMAGE_NAME]`\n\n## How can I make the endpoint private?\n\n## Having trouble?\n\nCreate an issue or ask a question here: https://community.fly.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fcog-sd3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-apps%2Fcog-sd3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fcog-sd3/lists"}