📦Installation for Unity
Last updated
Last updated
Create a unity URP project with Unity2020 or higher version
Download the unitypackage for stable-diffusion-foar-unity from released page
Import the downloaded unitypackage into the Unity project craeted above.
After importing, Preferences > StableDiffusion For Unity window will be shown. If not automatically shown, please open from Menu Edit > Preferences > StableDiffusion For Unity.
press the Witchpot > StartServer button on the menu bar.
※If nothing starts after pressing StartServer (especially if you have updated stable-diffusion-for-unity), please restart UnityEditor once.
When you start the server, CommandPrompt will open. This initial startup will take some time as it is downloading necessary files.
If CommandPrompt displays
Running on local URL: http://127.0.0.1:7860
and stops, the installation is complete and you are ready to generate image.
Open Assets\Plugins\Witchpot\Packages\StableDiffusion\Runtime\Settings\StableDiffusionWebUISettings and confirm ModelNames and ModelNamesForLora is not empty.
Open2DStageDemo scene
Assets\Plugins\Witchpot\Packages\StableDiffusion\Example\Demo\Scenes\2DStageDemo
After Open the scene. Open Canvas > RawImage-Depth2Img and press Generate.
Image generation progress bar will be shown on Command Prompt when you generating image.
Texture will be assigned to the RawImage after image generation completed.
If an error occurs and you are unable to proceed the image generation, you may have insufficient VRAM. Please lower the resolution or try Text2Img.
Type | About |
---|---|
Internal
Default WebUI. Use this if you are not familiar with StableDiffusion. The Witchpot's custom StableDiffusionWebUI will be automatically installed in your C drive user folder.
External
If you want to use StableDiffusion WebUI installed and cutomized by yourself. Please specify the path to the WebUI's webui-user.bat file in API mode. For more information on installation, please see About WebUI install/uninstall