Update v2_3.py
Browse files
v2_3.py
CHANGED
|
@@ -190,7 +190,7 @@ for repo_url, destination in extensions_to_clone:
|
|
| 190 |
|
| 191 |
print ("修改启动文件...")
|
| 192 |
# 第一个命令:在导入行后插入 import os
|
| 193 |
-
launch_file_path = "/
|
| 194 |
with open(launch_file_path, 'r') as file:
|
| 195 |
content = file.read()
|
| 196 |
|
|
@@ -200,7 +200,7 @@ with open(launch_file_path, 'w') as file:
|
|
| 200 |
file.write(content)
|
| 201 |
|
| 202 |
# 第二个命令:在 prepare_environment() 行后执行 sed 命令
|
| 203 |
-
util_file_path = "/
|
| 204 |
with open(util_file_path, 'r') as file:
|
| 205 |
content = file.read()
|
| 206 |
|
|
@@ -213,7 +213,7 @@ with open(util_file_path, 'w') as file:
|
|
| 213 |
file.write(content)
|
| 214 |
|
| 215 |
# 第三个命令:将列表中添加元素
|
| 216 |
-
shared_file_path = "/
|
| 217 |
with open(shared_file_path, 'r') as file:
|
| 218 |
content = file.read()
|
| 219 |
|
|
@@ -306,7 +306,7 @@ if T2I_:
|
|
| 306 |
|
| 307 |
print ("修改启动文件...")
|
| 308 |
# 第一个命令:在导入行后插入 import os
|
| 309 |
-
launch_file_path = "/
|
| 310 |
with open(launch_file_path, 'r') as file:
|
| 311 |
content = file.read()
|
| 312 |
|
|
@@ -316,7 +316,7 @@ with open(launch_file_path, 'w') as file:
|
|
| 316 |
file.write(content)
|
| 317 |
|
| 318 |
# 第二个命令:在 prepare_environment() 行后执行 sed 命令
|
| 319 |
-
util_file_path = "/
|
| 320 |
with open(util_file_path, 'r') as file:
|
| 321 |
content = file.read()
|
| 322 |
|
|
@@ -326,7 +326,7 @@ with open(util_file_path, 'w') as file:
|
|
| 326 |
file.write(content)
|
| 327 |
|
| 328 |
# 第三个命令:将列表中添加元素
|
| 329 |
-
shared_file_path = "/
|
| 330 |
with open(shared_file_path, 'r') as file:
|
| 331 |
content = file.read()
|
| 332 |
|
|
|
|
| 190 |
|
| 191 |
print ("修改启动文件...")
|
| 192 |
# 第一个命令:在导入行后插入 import os
|
| 193 |
+
launch_file_path = "/bushu/ui/launch.py"
|
| 194 |
with open(launch_file_path, 'r') as file:
|
| 195 |
content = file.read()
|
| 196 |
|
|
|
|
| 200 |
file.write(content)
|
| 201 |
|
| 202 |
# 第二个命令:在 prepare_environment() 行后执行 sed 命令
|
| 203 |
+
util_file_path = "/bushu/ui/repositories/diffusion-stability-stable/ldm/util.py"
|
| 204 |
with open(util_file_path, 'r') as file:
|
| 205 |
content = file.read()
|
| 206 |
|
|
|
|
| 213 |
file.write(content)
|
| 214 |
|
| 215 |
# 第三个命令:将列表中添加元素
|
| 216 |
+
shared_file_path = "/bushu/ui/modules/shared.py"
|
| 217 |
with open(shared_file_path, 'r') as file:
|
| 218 |
content = file.read()
|
| 219 |
|
|
|
|
| 306 |
|
| 307 |
print ("修改启动文件...")
|
| 308 |
# 第一个命令:在导入行后插入 import os
|
| 309 |
+
launch_file_path = "/bushu/ui/launch.py"
|
| 310 |
with open(launch_file_path, 'r') as file:
|
| 311 |
content = file.read()
|
| 312 |
|
|
|
|
| 316 |
file.write(content)
|
| 317 |
|
| 318 |
# 第二个命令:在 prepare_environment() 行后执行 sed 命令
|
| 319 |
+
util_file_path = "/bushu/ui/repositories/stable-diffusion-stability-ai/ldm/util.py"
|
| 320 |
with open(util_file_path, 'r') as file:
|
| 321 |
content = file.read()
|
| 322 |
|
|
|
|
| 326 |
file.write(content)
|
| 327 |
|
| 328 |
# 第三个命令:将列表中添加元素
|
| 329 |
+
shared_file_path = "/bushu/ui/modules/shared.py"
|
| 330 |
with open(shared_file_path, 'r') as file:
|
| 331 |
content = file.read()
|
| 332 |
|