优化
This commit is contained in:
@@ -971,7 +971,7 @@ class BuildPromptManager:
|
||||
def _init_build_prompt_manager():
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
config_dir = os.path.join(script_dir, "../assets")
|
||||
config_dir = os.path.join(script_dir, "..", "assets")
|
||||
return BuildPromptManager(config_dir, config)
|
||||
|
||||
# 初始化
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class Config:
|
||||
def _load_config():
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
config_file = os.path.join(script_dir, "../assets", "config.json")
|
||||
config_file = os.path.join(script_dir, "..", "assets", "config.json")
|
||||
return Config(config_file)
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class GeneratePrompt:
|
||||
|
||||
classify_datas = buildClassifyDatas(classify)
|
||||
file_name = f"{classify_datas}.jsonl"
|
||||
data_file = os.path.join(script_dir, "../assets", language_dir, file_name)
|
||||
data_file = os.path.join(script_dir, "..", "assets", language_dir, file_name)
|
||||
|
||||
build = BuildPrompt(data_file)
|
||||
prompt = build.generate_prompt(seed)
|
||||
|
||||
@@ -29,7 +29,7 @@ class NegativePrompt:
|
||||
# 获取Script的目录路径
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__)) # Script directory
|
||||
language_dir = "zh" if language == "Chinese" else "en"
|
||||
data_file = os.path.join(script_dir, "../assets", language_dir, "negative_datas.jsonl")
|
||||
data_file = os.path.join(script_dir, "..", "assets", language_dir, "negative_datas.jsonl")
|
||||
|
||||
build = BuildPrompt(data_file)
|
||||
negative_prompt = build.generate_prompt(seed)
|
||||
|
||||
@@ -69,7 +69,7 @@ class SceneryPrompt:
|
||||
# 获取Script的目录路径
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__)) # Script directory
|
||||
language_dir = "zh" if language == "Chinese" else "en"
|
||||
data_file = os.path.join(script_dir, "../assets", language_dir, "scenery_datas.jsonl")
|
||||
data_file = os.path.join(script_dir, "..", "assets", language_dir, "scenery_datas.jsonl")
|
||||
|
||||
build = BuildPrompt(data_file)
|
||||
scenery_prompt = build.generate_prompt(seed, styles, artists)
|
||||
|
||||
Reference in New Issue
Block a user