{"id":26397244,"url":"https://github.com/jhj0517/comfyui-backend","last_synced_at":"2026-04-16T12:03:46.224Z","repository":{"id":282451324,"uuid":"931174671","full_name":"jhj0517/ComfyUI-backend","owner":"jhj0517","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-14T17:39:59.000Z","size":143,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T08:44:58.190Z","etag":null,"topics":["aws","backend","comfyui","fastapi","nginx","open-source"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhj0517.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["jhj0517"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2025-02-11T20:49:56.000Z","updated_at":"2025-03-14T17:40:02.000Z","dependencies_parsed_at":"2025-03-14T18:42:00.526Z","dependency_job_id":"f34cecd8-4bed-4a67-b179-6c80e8108c8e","html_url":"https://github.com/jhj0517/ComfyUI-backend","commit_stats":null,"previous_names":["jhj0517/comfyui-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhj0517/ComfyUI-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhj0517%2FComfyUI-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhj0517%2FComfyUI-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhj0517%2FComfyUI-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhj0517%2FComfyUI-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhj0517","download_url":"https://codeload.github.com/jhj0517/ComfyUI-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhj0517%2FComfyUI-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31884929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","backend","comfyui","fastapi","nginx","open-source"],"created_at":"2025-03-17T12:16:53.667Z","updated_at":"2026-04-16T12:03:46.206Z","avatar_url":"https://github.com/jhj0517.png","language":"Python","funding_links":["https://github.com/sponsors/jhj0517"],"categories":[],"sub_categories":[],"readme":"# ComfyUI backend\nA fastapi backend for ComfyUI with AWS S3 and CloudFront integration. The AWS stuffs are completely optional and only enabled when you setup `.env` file.\n\n## 🛠️ Archictecture\n![architecture-3](https://github.com/user-attachments/assets/88d916c8-84cf-4cec-abc0-aee75ef9f874)\n\n\n## 🐳 Setup with Docker Compose\n\n1. **Git clone repository. Make sure you add `--recursive` at the end to clone submodule together.**\n```\ngit clone https://github.com/jhj0517/ComfyUI-backend.git --recursive\ncd ComfyUI-backend\n```\n\n2. **(Optional) Setup AWS configs in the `ComfyUI-fastapi/.env`.**\n\nhttps://github.com/jhj0517/ComfyUI-backend/blob/859559f3cee6202a691c6424a59eb5372a29fb10/ComfyUI-fastapi/.env.example#L1-L22\n\n3. **(Optional) Setup key files for signed URL with CloudFront.**\n\n  Place your CloudFront key files in [`ComfyUI-fastapi/credentials/`](https://github.com/jhj0517/ComfyUI-backend/tree/master/ComfyUI-fastapi/credentials):\n   - `private_key.pem` \n   - `public_key.pem` \n\n\u003e[!NOTE]\n📝 To create these keys, see [AWS Documentation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-trusted-signers.html#private-content-creating-cloudfront-key-pairs)\n\n4. **(Optioanl) Setup the Nginx config for your inference server.** \n    \n    1. Register your domain name in [`docker/nginx/https.conf`](https://github.com/jhj0517/ComfyUI-backend/blob/master/docker/nginx/https.conf)\n\n    2. Place SSL certificates to [`docker/nginx/ssl/`](https://github.com/jhj0517/ComfyUI-backend/tree/master/docker/nginx/ssl):\n       - `fullchain.pem`\n       - `privkey.pem`\n\n\u003e[!NOTE]\n📝 To create certificates for your domain name in Windows, see [How to create a \"Let's Encrypt\" certificate on Windows](https://trueconf.com/blog/knowledge-base/how-to-create-a-lets-encrypt-certificate-on-windows)\n\n\n5. **Build with the Docker Compose**\n```\ndocker compose -f docker/docker-compose.yml build\n```\n\n6. **Run with Docker Compose**\n```\ndocker compose -f docker/docker-compose.yml up\n```\n\n7. **Access, Test with**\n- ComfyUI: http://localhost:8188 \n- FastAPI Backend: http://localhost:8000/docs (or your domain name with nginx)\n\nSwaggerUI is enabled in `/docs` by default, so you can test endpoints there.\n\n## 🧮 ComfyUI Workflows\n\nThe default ComfyUI workflow directory for your backend is [`ComfyUI-fastapi/workflows/`](https://github.com/jhj0517/ComfyUI-backend/tree/master/ComfyUI-fastapi/workflows). \n\u003cbr\u003ePlace your JSON workflows in the **API compatible** format to use them with the backend.\n\nWhen you make requests to the `/generation` endpoint, you can modify workflow parameters like this:\n#### Example Workflow JSON\n```json\n{\n    \"6\": {\n        \"class_type\": \"CLIPTextEncode\",\n        \"inputs\": {\n            \"clip\": [\"4\", 1],\n            \"text\": \"masterpiece best quality\"\n        }\n    }\n}\n```\n\n#### Example API Request\n```python\nimport requests\n\nrequests.post(\n    \"http://localhost:8000/generate\",\n    data={\n        \"workflow_name\": \"sdxl_t2i\",\n        \"modifications\": {\n            \"6\": {\n                \"text\": \"Picture of dog smiles\"\n            }\n        }   \n    }\n)\n```\n\nThe backend assumes that you have your own proxy server for the client. \u003cbr\u003e\nSo for the sophisticated API parameterization, the proxy server is responsible for it.\u003cbr\u003e\nThis provides several advantages, including flexibility for workflows in the inference server. \u003cbr\u003e\nOr you can just add another endpoint that wraps `/generation` and use it in the fastapi. \n\n## 🖥️ Device Matching\nThe backend assumes that you're using Nvidia GPU by default.\n\nIf not, edit [`docker/comfyui.Dockerfile`](https://github.com/jhj0517/ComfyUI-backend/blob/master/docker/comfyui.Dockerfile) to match your Device. Update `--extra-index-url` to match your device.\n\nhttps://github.com/jhj0517/ComfyUI-backend/blob/a66e7750ba9410ddaba6149100a3b8852262a69e/docker/comfyui.Dockerfile#L15-L17\n\n## 📦 Installing Custom Nodes\n\nThe custom nodes directory is mapped as volume to `ComfyUI/custom_nodes` in the container.\n\nTo install custom nodes:\n1. Add your custom node to the `ComfyUI/custom_nodes` directory\n2. Add required dependencies for custom node to `ComfyUI/requirements.txt`\n3. Rebuild the ComfyUI container:\n```bash\ndocker compose -f docker/docker-compose.yml build comfyui\n```\n\nAfter rebuilding, your custom nodes will be available in ComfyUI!\n\n## 📚 Misc\n\nRedis db is stored in [`redis-data/`](https://github.com/jhj0517/ComfyUI-backend/tree/master/redis-data)\u003cbr\u003e\nLogs for Nginx is saved in `logs/nginx/`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhj0517%2Fcomfyui-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhj0517%2Fcomfyui-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhj0517%2Fcomfyui-backend/lists"}