Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SpawnTerror authored Jun 15, 2023
1 parent b121362 commit 682a878
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions stablediffusion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Stable Diffusion Exe
# Python 3
# Execute stable diffusion .bat file

import subprocess
import os

print('#-------------------------------------------#')
print('# Stable Diffusion Quick Exe by SpawnTerror #')
print('#-------------------------------------------#')
print(f' ')
current_dir = os.getcwd()
print(f'Detecting current dir = ', current_dir)

file_name = "webui-user.bat"
file_path = current_dir + '\\' + file_name
print(f'Generating the filepath = ', file_path)
print(f' ')

if os.path.exists(file_path):
print(f'#-----------------------------------#')
print(f'# Executing the webui-user.bat file #')
print(f'#-----------------------------------#')
print(f' ')
os.chdir(current_dir)
subprocess.call(file_path, shell=True)
else:
print(f'This exe has to be located within your \'stable-diffusion-webui\' folder!')
input(f'Press any key to exit...')

0 comments on commit 682a878

Please sign in to comment.