{"id":13676188,"url":"https://github.com/KonH/StableDiffusionUnityTools","last_synced_at":"2025-04-29T03:30:37.214Z","repository":{"id":148161218,"uuid":"588857568","full_name":"KonH/StableDiffusionUnityTools","owner":"KonH","description":"Editor utility to generate assets in Unity Editor via self-hosted \u0026 managed Stable Diffusion installations","archived":false,"fork":false,"pushed_at":"2023-01-14T13:52:16.000Z","size":203,"stargazers_count":64,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T09:40:58.065Z","etag":null,"topics":["game-development","image-generation","stable-diffusion","unity","unity-editor","unity3d"],"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/KonH.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-01-14T08:55:42.000Z","updated_at":"2025-04-01T07:02:07.000Z","dependencies_parsed_at":"2023-05-19T08:30:54.279Z","dependency_job_id":null,"html_url":"https://github.com/KonH/StableDiffusionUnityTools","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/KonH%2FStableDiffusionUnityTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonH%2FStableDiffusionUnityTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonH%2FStableDiffusionUnityTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonH%2FStableDiffusionUnityTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KonH","download_url":"https://codeload.github.com/KonH/StableDiffusionUnityTools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251426708,"owners_count":21587635,"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":["game-development","image-generation","stable-diffusion","unity","unity-editor","unity3d"],"created_at":"2024-08-02T13:00:19.859Z","updated_at":"2025-04-29T03:30:36.841Z","avatar_url":"https://github.com/KonH.png","language":"C#","readme":"﻿# Stable Diffusion Unity Tools\n\n## Summary\n\nEditor utility to generate assets in Unity Editor via self-hosted \u0026 managed Stable Diffusion installations\n\n## Installation\n\n1) Setup Stable Diffusion on your local machine - https://github.com/CompVis/stable-diffusion (skip if you will use managed services)\n2) Add package in Packages/manifest.json:\n   ```\n    \"com.konh.stable-diffusion-unity-tools\": \"https://github.com/KonH/StableDiffusionUnityTools.git?path=Packages/com.konh.stable-diffusion-unity-tools\"\n   ```\n3) Click **SD Tools/Setup**, it creates settings file\u003cbr/\u003e\n![](Images/setup.png)\n4) Open settings at **Edit/Project Settings/Stable Diffusion** and configure:\n   - **Command** - command to execute stable diffusion:\n      - Should contain required placeholders: `$PROMPT` for generation prompt, `$OUT_DIR` for destination directory, `$WIDTH` and `$HEIGHT` for image dimensions (these arguments assigned at generation process)\n      - Could be multiline for better usability, line breaks are ignored\n      - Windows WSL example (in that case paths should be related to Linux file system): `wsl\n        --cd \"linux-mnt-path-to-stable-diffusion\"\n        python3 scripts/txt2img.py\n        --prompt \"$PROMPT\" --plms --n_samples 1 --n_iter 1 --outdir \"outputs/txt2img-custom/$GUID\"`\n      - If you want to use managed service - write custom script which communicate with it and store results on file system in txt2img.py compatible format\n   - **ResultPath** - full path to directory with generated files on local file system (in case of WSL - Windows host machine)\n![](Images/project_settings.png)\n5) Additionally, you could add **Assets/StableDiffusionUnityTools** to .gitignore (it's related to current machine, unfortunately we can't use UserSettings for that)\n\n## Asset file generation\n\nNow you can use **SD Tools/Generate Image** to generate images, it provide you ability to tweak settings for next generation:\n - Required settings: **Prompt**, **Directory**, **Width**, **Height**\n - Optional settings: **Name** (if not assigned, GUID is used)\n![](Images/generate_window.png)\n\nWhen generation finished, you will see result in given directory\n![](Images/generate_result.png)","funding_links":[],"categories":["Open Source Repositories","Design","Open Source Packages"],"sub_categories":["Art Tools","AI Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKonH%2FStableDiffusionUnityTools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKonH%2FStableDiffusionUnityTools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKonH%2FStableDiffusionUnityTools/lists"}