Compare commits

...

12 Commits

Author SHA1 Message Date
324226f87d Merge pull request #1379 from easydiffusion/yaml-legacy-path
Handle the legacy yaml config path
2023-06-30 16:31:16 +05:30
3120b593c6 Handle the legacy yaml config path 2023-06-30 16:30:29 +05:30
d98e4772ac Merge pull request #1378 from easydiffusion/yaml-to-json
Allow main to switch back from yaml to json config files
2023-06-30 15:55:02 +05:30
cf87c34bef Allow main to switch back from yaml to json config files 2023-06-30 15:53:54 +05:30
656acafed3 Don't read config.yaml just yet in the main branch 2023-06-30 09:52:10 +05:30
5bc0d1f762 Merge pull request #1366 from easydiffusion/beta
Fix broken save settings
2023-06-26 15:35:34 +05:30
07e30ae4ad Merge pull request #1365 from easydiffusion/beta
Beta
2023-06-26 15:05:40 +05:30
8ced5b7199 Merge pull request #1344 from easydiffusion/beta
Beta
2023-06-13 17:08:46 +05:30
a2856b2b77 Update README.md 2023-06-08 16:47:50 +05:30
3045f5211f Merge pull request #1321 from cmdr2/beta
Tiling and other bug fixes
2023-06-01 16:53:51 +05:30
41ecc822df Merge pull request #1305 from JeLuF/patch-27
Update "How to install and run.txt"
2023-05-26 15:25:31 +05:30
ce2a42ca13 Update "How to install and run.txt" 2023-05-25 20:18:19 +02:00
4 changed files with 37 additions and 14 deletions

View File

@ -5,10 +5,10 @@ If you haven't downloaded Stable Diffusion UI yet, please download from https://
After downloading, to install please follow these instructions:
For Windows:
- Please double-click the "Start Stable Diffusion UI.cmd" file inside the "stable-diffusion-ui" folder.
- Please double-click the "Easy-Diffusion-Windows.exe" file and follow the instructions.
For Linux:
- Please open a terminal, and go to the "stable-diffusion-ui" directory. Then run ./start.sh
- Please open a terminal, unzip the Easy-Diffusion-Linux.zip file and go to the "easy-diffusion" directory. Then run ./start.sh
That file will automatically install everything. After that it will start the Stable Diffusion interface in a web browser.
@ -21,4 +21,4 @@ If you have any problems, please:
3. Or, file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues
Thanks
cmdr2 (and contributors to the project)
cmdr2 (and contributors to the project)

View File

@ -23,6 +23,7 @@ Click the download button for your operating system:
- Minimum 8 GB of system RAM.
- Atleast 25 GB of space on the hard disk.
The installer will take care of whatever is needed. If you face any problems, you can join the friendly [Discord community](https://discord.com/invite/u9yhsFmEkB) and ask for assistance.
## On Windows:

View File

@ -4,7 +4,7 @@ import sys
# The config file is in the same directory as this script
config_directory = os.path.dirname(__file__)
config_yaml = os.path.join(config_directory, "config.yaml")
# config_yaml = os.path.join(config_directory, "config.yaml")
config_json = os.path.join(config_directory, "config.json")
parser = argparse.ArgumentParser(description='Get values from config file')
@ -16,15 +16,16 @@ parser.add_argument('key', metavar='key', nargs='+',
args = parser.parse_args()
if os.path.isfile(config_yaml):
import yaml
with open(config_yaml, 'r') as configfile:
try:
config = yaml.safe_load(configfile)
except Exception as e:
print(e, file=sys.stderr)
config = {}
elif os.path.isfile(config_json):
# if os.path.isfile(config_yaml):
# import yaml
# with open(config_yaml, 'r') as configfile:
# try:
# config = yaml.safe_load(configfile)
# except Exception as e:
# print(e, file=sys.stderr)
# config = {}
# el
if os.path.isfile(config_json):
import json
with open(config_json, 'r') as configfile:
try:

View File

@ -100,7 +100,28 @@ def init():
def getConfig(default_val=APP_CONFIG_DEFAULTS):
try:
config_json_path = os.path.join(CONFIG_DIR, "config.json")
if not os.path.exists(config_json_path):
# compatibility with upcoming yaml changes, switching from beta to main
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
# migrate the old config yaml location
config_legacy_yaml = os.path.join(CONFIG_DIR, "config.yaml")
if os.path.isfile(config_legacy_yaml):
shutil.move(config_legacy_yaml, config_yaml_path)
if os.path.exists(config_yaml_path):
try:
import yaml
with open(config_yaml_path, "r", encoding="utf-8") as f:
config = yaml.safe_load(f)
setConfig(config) # save to config.json
os.remove(config_yaml_path) # delete the yaml file
except:
log.warn(traceback.format_exc())
config = default_val
elif not os.path.exists(config_json_path):
config = default_val
else:
with open(config_json_path, "r", encoding="utf-8") as f: