A simple python script that lets you paint on a canvas and sends that image every stroke to the automatic1111 API and updates the canvas when the image is generated
- added the possibility to save the image created by pressing the
skey - You can use the scrollmouse key to change the brush size
- First download the latest AMD-SHARK SD webui .exe from here or follow instructions on the README
- Once you have the .exe where you would like AMD-SHARK to install, run the .exe from terminal/PowerShell with the
--apiflag:
## Run the .exe in API mode:
.\amdshark_sd_<date>_<ver>.exe --api
## For example:
.\amdshark_sd_20230411_671.exe --api
## From a the base directory of a source clone of AMD-SHARK:
./setup_venv.ps1
python apps\stable_diffusion\web\index.py --api
Your local SD server should start and look something like this:

-
Note: When running in api mode with
--api, the .exe will not function as a webUI. Thus, the address in the terminal output will only be useful for API requests. -
If you are modifying
server_portvia AMD-SHARK's sd webui, then ensure you modify the port inScripts/SdPaint.pyas well. -
Now run
Start.shafter setting the permission usingchmodcommand. Or runStart.batfor Windows.
left mouse to draw and middlemouse to erase
press backspace to erase the image.
Enter prompt (default amdshark) in the toolbar above as well as change steps (default 20).
the program is bound to 512x512 images right now and doesn't have the ability to save the image right now.
I may add more features at a later time.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.