2022-09-09 17:32:33 +02:00
Hi there, these instructions are meant for the developers of this project.
2023-06-14 11:57:06 +02:00
If you only want to use the Stable Diffusion UI, you've downloaded the wrong file. In that case, please download and follow the instructions at https://github.com/easydiffusion/easydiffusion#installation
2022-09-09 17:32:33 +02:00
Thanks
# For developers:
2022-12-19 15:28:05 +01:00
If you would like to contribute to this project, there is a discord for discussion:
2022-09-09 17:32:33 +02:00
[![Discord Server ](https://badgen.net/badge/icon/discord?icon=discord&label )](https://discord.com/invite/u9yhsFmEkB)
## Development environment for UI (frontend and server) changes
This is in-flux, but one way to get a development environment running for editing the UI of this project is:
(swap `.sh` or `.bat` in instructions depending on your environment, and be sure to adjust any paths to match where you're working)
2023-06-14 11:57:06 +02:00
1) Install the project to a new location using the [usual installation process ](https://github.com/easydiffusion/easydiffusion#installation ), e.g. to `/projects/stable-diffusion-ui-archive`
2022-10-27 17:26:49 +02:00
2) Start the newly installed project, and check that you can view and generate images on `localhost:9000`
3) Next, please clone the project repository using `git clone` (e.g. to `/projects/stable-diffusion-ui-repo` )
4) Close the server (started in step 2), and edit `/projects/stable-diffusion-ui-archive/scripts/on_env_start.sh` (or `on_env_start.bat` )
5) Comment out the lines near the bottom that copies the `files/ui` folder, e.g:
2022-09-10 22:39:38 +02:00
for `.sh`
```
# rm -rf ui
# cp -Rf sd-ui-files/ui .
# cp sd-ui-files/scripts/on_sd_start.sh scripts/
# cp sd-ui-files/scripts/start.sh .
```
for `.bat`
```
REM @xcopy sd-ui-files\ui ui /s /i /Y
REM @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y
REM @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y
```
2022-10-27 17:26:49 +02:00
6) Next, comment out the line at the top of `/projects/stable-diffusion-ui-archive/scripts/on_sd_start.sh` (or `on_sd_start.bat` ) that copies `on_env_start` . For e.g. `@rem @copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y`
2022-09-10 19:14:08 +02:00
8) Delete the current `ui` folder at `/projects/stable-diffusion-ui-archive/ui`
9) Now make a symlink between the repository clone (where you will be making changes) and this archive (where you will be running stable diffusion):
2022-09-09 17:32:33 +02:00
`ln -s /projects/stable-diffusion-ui-repo/ui /projects/stable-diffusion-ui-archive/ui`
or for Windows
2022-10-27 17:26:49 +02:00
`mklink /J \projects\stable-diffusion-ui-archive\ui \projects\stable-diffusion-ui-repo\ui` (link name first, source repo dir second)
9) Run the project again (like in step 2) and ensure you can still use the UI.
2022-09-09 17:32:33 +02:00
10) Congrats, now any changes you make in your repo `ui` folder are linked to this running archive of the app and can be previewed in the browser.
2022-11-16 10:44:56 +01:00
11) Please update CHANGES.md in your pull requests.
2022-09-09 17:32:33 +02:00
## Development environment for Installer changes
Build the Windows installer using Windows, and the Linux installer using Linux. Don't mix the two, and don't use WSL. An Ubuntu VM is fine for building the Linux installer on a Windows host.
2022-10-27 17:26:49 +02:00
1. Run `build.bat` or `./build.sh` depending on whether you're in Windows or Linux.
2. Make a new GitHub release and upload the Windows and Linux installer builds created inside the `dist` folder.