{"id":23177294,"url":"https://github.com/haoming02/stable-diffusion-for-unity","last_synced_at":"2025-08-18T11:32:39.890Z","repository":{"id":155826405,"uuid":"628804251","full_name":"Haoming02/stable-diffusion-for-unity","owner":"Haoming02","description":"A project that allows you to run Stable Diffusion NATIVELY inside Unity at runtime","archived":false,"fork":false,"pushed_at":"2024-01-19T12:23:02.000Z","size":80,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-19T18:46:39.894Z","etag":null,"topics":["csharp","deprecated","onnx","stable-diffusion","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Haoming02.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}},"created_at":"2023-04-17T02:37:14.000Z","updated_at":"2024-01-19T12:22:54.000Z","dependencies_parsed_at":"2023-06-25T23:57:54.665Z","dependency_job_id":null,"html_url":"https://github.com/Haoming02/stable-diffusion-for-unity","commit_stats":null,"previous_names":["haoming02/stable-diffusion-for-unity"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoming02%2Fstable-diffusion-for-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoming02%2Fstable-diffusion-for-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoming02%2Fstable-diffusion-for-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoming02%2Fstable-diffusion-for-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haoming02","download_url":"https://codeload.github.com/Haoming02/stable-diffusion-for-unity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230227335,"owners_count":18193293,"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":["csharp","deprecated","onnx","stable-diffusion","unity"],"created_at":"2024-12-18T06:32:46.557Z","updated_at":"2024-12-18T06:32:47.195Z","avatar_url":"https://github.com/Haoming02.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eNo Longer Maintained\u003c/h1\u003e\n\u003cp align=\"center\"\u003eThis project was originally just a proof of concept. With so many new optimization techniques, such as \u003ca href=\"https://huggingface.co/blog/sdxl_ort_inference\"\u003eTurbo\u003c/a\u003e, this implementation is extremely slow by today's standard...\u003c/p\u003e\n\n# Stable Diffusion for Unity\nThis is an Unity project that allows you to run the Stable Diffusion pipeline within Unity, \nachieved by using `ONNX` version of the models and `OnnxRuntime` to inference at runtime. \n\n## Requirements\n- [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit-archive)\n- [CUDA Deep Neural Network](https://developer.nvidia.com/cudnn)\n- [ONNX Runtime](https://onnxruntime.ai/docs/tutorials/csharp/csharp-gpu.html)\n    \u003e as shown in the `Plugins` folder\n\n#### Supported Versions\n- This project was built on **ONNX Runtime** `1.15.1`\n    - Tested on **CUDA** `v11.6` and `v11.8`\n    - Tested on **CUDNN** `v8.5.0.96`\n\n## Getting Started\n- Download the models from [**Release**](https://github.com/Haoming02/stable-diffusion-for-unity/releases), and put them into the `StreamingAssets` folder.\n- 2 sample scenes are included:\n    - One is a simple UI where you can enter any prompt and adjust some settings to generate an image\n    - Another is a 3D scene where you can generate a skybox and a painting\n\n## Implemented Features\n- Positive Prompt\n- Steps\n- **Euler a** sampling method\n- CFG Scale\n- Inference `fp16` Precision\n\n# References\n- https://onnxruntime.ai/docs/tutorials/csharp/stable-diffusion-csharp.html\n- https://github.com/cassiebreviu/StableDiffusion\n- https://onnxruntime.ai/docs/get-started/with-csharp.html\n- https://onnxruntime.ai/docs/tutorials/csharp/csharp-gpu.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoming02%2Fstable-diffusion-for-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaoming02%2Fstable-diffusion-for-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoming02%2Fstable-diffusion-for-unity/lists"}