BBrother commited on
Commit
531c33d
·
1 Parent(s): b890475

Update SW_run.py

Browse files
Files changed (1) hide show
  1. SW_run.py +13 -1
SW_run.py CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  import subprocess
2
  import sys
3
  import logging
@@ -5,6 +13,8 @@ import os
5
  import binascii # 用于将文本转换为十六进制
6
  import re # 用于正则表达式
7
 
 
 
8
  # 检查是否存在 logs_run.txt 文件,如果存在则删除它
9
  log_file = '/root/main/logs_run.txt'
10
  if os.path.exists(log_file):
@@ -35,7 +45,9 @@ os.chdir('/root/main/')
35
  try:
36
  # 在 try 块中运行 /root/main/webui.py,并将输出重定向到日志文件
37
  with open(log_file, 'a') as log_file_handle, open(url_file, 'a') as url_file_handle:
38
- process = subprocess.Popen(['python', '/root/main/launch.py', '--skip-torch-cuda-test', '--xformers', '--enable-insecure-extension-access', '--gradio-queue', '--multiple', '--disable-nan-check', '--no-hashing', '--opt-split-attention', '--disable-safe-unpickle', '--api', '--theme', 'dark', '--disable-console-progressbars', '--administrator'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
 
 
39
 
40
  url_pattern = re.compile(r'https?://\S+')
41
 
 
1
+ '''
2
+ Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
3
+ Date: 2023-09-30 13:25:39
4
+ LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
5
+ LastEditTime: 2023-09-30 20:28:50
6
+ FilePath: \AI绘图配置\SDW\SW_run.py
7
+ Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ '''
9
  import subprocess
10
  import sys
11
  import logging
 
13
  import binascii # 用于将文本转换为十六进制
14
  import re # 用于正则表达式
15
 
16
+ from pathlib import Path
17
+
18
  # 检查是否存在 logs_run.txt 文件,如果存在则删除它
19
  log_file = '/root/main/logs_run.txt'
20
  if os.path.exists(log_file):
 
45
  try:
46
  # 在 try 块中运行 /root/main/webui.py,并将输出重定向到日志文件
47
  with open(log_file, 'a') as log_file_handle, open(url_file, 'a') as url_file_handle:
48
+ #'--skip-torch-cuda-test', '--xformers', '--enable-insecure-extension-access', '--gradio-queue', '--disable-nan-check', '--no-hashing', '--opt-split-attention', '--disable-safe-unpickle', '--api', '--theme', 'dark', '--disable-console-progressbars', '--administrator', '--upcast-sampling', ' --enable-insecure-extension-access', '--multiple'
49
+ process = subprocess.Popen(['python', '/root/main/webui.py', '--share', '--api', '--disable-safe-unpickle', '--enable-insecure-extension-access', '--no-download-sd-model', '--no-half-vae', '--xformers', '--disable-console-progressbars', '--theme', 'dark', '--upcast-sampling'
50
+ ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
51
 
52
  url_pattern = re.compile(r'https?://\S+')
53