{"id":19492068,"url":"https://github.com/kylemclaren/cog-flux","last_synced_at":"2025-07-08T18:05:41.053Z","repository":{"id":251736992,"uuid":"837545486","full_name":"kylemclaren/cog-flux","owner":"kylemclaren","description":"Run Flux on Fly GPUs","archived":false,"fork":false,"pushed_at":"2024-09-15T18:41:23.000Z","size":33,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-25T19:37:35.405Z","etag":null,"topics":["ai","flux","flux-dev","flux-schnell","gpu","img2img","text2image"],"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/kylemclaren.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}},"created_at":"2024-08-03T09:46:30.000Z","updated_at":"2024-11-22T00:28:52.000Z","dependencies_parsed_at":"2024-11-10T21:19:41.565Z","dependency_job_id":"6a21849c-5396-429c-b867-579ca522593f","html_url":"https://github.com/kylemclaren/cog-flux","commit_stats":null,"previous_names":["kylemclaren/cog-flux"],"tags_count":0,"template":false,"template_full_name":"fly-apps/cog-sd3","purl":"pkg:github/kylemclaren/cog-flux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fcog-flux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fcog-flux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fcog-flux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fcog-flux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylemclaren","download_url":"https://codeload.github.com/kylemclaren/cog-flux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemclaren%2Fcog-flux/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264320949,"owners_count":23590561,"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","flux","flux-dev","flux-schnell","gpu","img2img","text2image"],"created_at":"2024-11-10T21:19:14.649Z","updated_at":"2025-07-08T18:05:41.029Z","avatar_url":"https://github.com/kylemclaren.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eFlux GPU Demo\u003c/h1\u003e\n    \u003cp\u003eRun \u003cstrong\u003e\u003ca href=\"https://huggingface.co/black-forest-labs/FLUX.1-schnell\"\u003eFlux\u003c/a\u003e\u003c/strong\u003e as a Replicate Cog on Fly.io!\u003c/p\u003e\n\u003c/div\u003e\n\n![Untitled](https://github.com/user-attachments/assets/fec35726-e1c2-48a3-904c-c8c50daa6b54)\n\n\nFlux is one of the most advanced text-to-image model families yet. This demo exposes the Dev model via a simple HTTP server, thanks to [Replicate Cog](https://github.com/replicate/cog). It can be adapted to use the Schnell model which is faster and comes with an Apache-2.0 license. 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\u003c!-- \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). --\u003e\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://cog-flux.fly.dev/predictions/test \\\n    --request PUT \\\n    --header \"Content-Type: application/json\" \\\n    --data @- \u003c\u003c 'EOF' | jq\n{\n    \"input\": {\n        \"prompt\": \"Starry night dreamscape with purple hot-air balloons\",\n        \"aspect_ratio\": \"16:9\",\n        \"guidance_scale\": 3.5,\n        \"num_inference_steps\": 50,\n        \"max_sequence_length\": 512,\n        \"output_format\": \"png\"\n    }\n}\nEOF\n```\n\nNow view your image at `https://fly.storage.tigris.dev/[BUCKET_NAME]/[OUTPUT_IMAGE_NAME]`\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%2Fkylemclaren%2Fcog-flux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylemclaren%2Fcog-flux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemclaren%2Fcog-flux/lists"}