{"id":18678505,"url":"https://github.com/kamalkraj/stable-diffusion-tritonserver","last_synced_at":"2025-04-12T02:41:22.253Z","repository":{"id":99699491,"uuid":"531224703","full_name":"kamalkraj/stable-diffusion-tritonserver","owner":"kamalkraj","description":"Deploy stable diffusion model with onnx/tenorrt + tritonserver","archived":false,"fork":false,"pushed_at":"2023-08-15T10:21:07.000Z","size":2744,"stargazers_count":123,"open_issues_count":6,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T22:21:21.041Z","etag":null,"topics":["deploy","docker","fp16","inference","machine-learning","nvidia","onnx","python3","pytorch","stablediffusion","tensorrt","tensorrt-inference","transformers","triton-inference-server"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/kamalkraj.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":"2022-08-31T19:13:43.000Z","updated_at":"2025-02-21T03:26:50.000Z","dependencies_parsed_at":"2024-11-07T09:40:04.276Z","dependency_job_id":"fb1a120a-000e-46f0-93e9-b9d30ef35edd","html_url":"https://github.com/kamalkraj/stable-diffusion-tritonserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalkraj%2Fstable-diffusion-tritonserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalkraj%2Fstable-diffusion-tritonserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalkraj%2Fstable-diffusion-tritonserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalkraj%2Fstable-diffusion-tritonserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamalkraj","download_url":"https://codeload.github.com/kamalkraj/stable-diffusion-tritonserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507468,"owners_count":21115607,"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":["deploy","docker","fp16","inference","machine-learning","nvidia","onnx","python3","pytorch","stablediffusion","tensorrt","tensorrt-inference","transformers","triton-inference-server"],"created_at":"2024-11-07T09:38:01.824Z","updated_at":"2025-04-12T02:41:22.248Z","avatar_url":"https://github.com/kamalkraj.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stable-diffusion-tritonserver\n\nPlease checkout branch [v2](https://github.com/kamalkraj/stable-diffusion-tritonserver/tree/v2) for converting new models\n\nPlease checkout branch [v3](https://github.com/kamalkraj/stable-diffusion-tritonserver/tree/v2) for converting models to TensorRT for fastest inference \n\n## Download models\n```bash\n# clone this repo\ngit clone https://github.com/kamalkraj/stable-diffusion-tritonserver.git\ncd stable-diffusion-tritonserver\n# clone model repo from huggingface\ngit lfs install\ngit clone https://huggingface.co/kamalkraj/stable-diffusion-v1-4-onnx\n```\n\nUnzip the model weights\n```bash\ncd stable-diffusion-v1-4-onnx\ntar -xvzf models.tar.gz\n```\n\n\n## Triton Inference Server\n\n### Build\n```bash\ndocker build -t tritonserver .\n```\n\n### Run\n```\ndocker run -it --rm --gpus all -p8000:8000 -p8001:8001 -p8002:8002 --shm-size 16384m   \\\n-v $PWD/stable-diffusion-v1-4-onnx/models:/models tritonserver \\\ntritonserver --model-repository /models/\n```\n\n\n## Inference\n\nInstall `tritonclient` and run the [notebook](Inference.ipynb) for inference.\n```bash\npip install \"tritonclient[http]\"\n```\n\n## Credits\n- ONNX conversion script from - [harishanand95/diffusers](https://github.com/harishanand95/diffusers/blob/dml/examples/inference/save_onnx.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamalkraj%2Fstable-diffusion-tritonserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamalkraj%2Fstable-diffusion-tritonserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamalkraj%2Fstable-diffusion-tritonserver/lists"}