This commit is contained in:
wailovet
2024-06-19 02:40:38 +08:00
parent d400134e5d
commit 290ebe106a
2 changed files with 8 additions and 2 deletions
+5
View File
@@ -32,6 +32,9 @@ def MZ_KohyaSSInitWorkspace_call(args={}):
# 查看本地分支是否一致
result = subprocess.run(
["git", "branch"], cwd=kohya_ss_lora_dir, stdout=subprocess.PIPE, check=True)
print(f"current branch: {result.stdout}")
if branch.encode() not in result.stdout:
subprocess.run(
["git", "remote", "set-branches", "origin", branch], cwd=kohya_ss_lora_dir, check=True)
@@ -239,6 +242,8 @@ def check_install():
import accelerate
except ImportError:
os.system(f"{sys.executable} -m pip install accelerate")
import logging
+3 -2
View File
@@ -796,11 +796,12 @@ class Utils:
common_prefix += c
return common_prefix
common_prefix = get_common_prefix(pre_render_texts_x)
if common_prefix != "":
pre_render_texts_x = [x.replace(common_prefix, "") for x in pre_render_texts_x]
pre_render_texts_x = [
x.replace(common_prefix, "") for x in pre_render_texts_x]
x_enable_num = len(pre_render_images)
y_enable_num = len(pre_render_images[0])