Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- .idea/workspace.xml +25 -5
- README.md +2 -1
- promptsModules/__pycache__/basePromptBuilder.cpython-310.pyc +0 -0
- promptsModules/__pycache__/basePromptBuilder.cpython-39.pyc +0 -0
- promptsModules/__pycache__/configDB.cpython-310.pyc +0 -0
- promptsModules/__pycache__/configDB.cpython-39.pyc +0 -0
- promptsModules/__pycache__/lora.cpython-310.pyc +0 -0
- promptsModules/__pycache__/lora.cpython-39.pyc +0 -0
- promptsModules/__pycache__/model_manager.cpython-310.pyc +0 -0
- promptsModules/__pycache__/model_manager.cpython-39.pyc +0 -0
- promptsModules/__pycache__/promptGen.cpython-310.pyc +0 -0
- promptsModules/__pycache__/promptGen.cpython-39.pyc +0 -0
- promptsModules/__pycache__/sd_command_gen.cpython-310.pyc +0 -0
- promptsModules/__pycache__/sd_command_gen.cpython-39.pyc +0 -0
- promptsModules/__pycache__/web_api.cpython-310.pyc +0 -0
- promptsModules/__pycache__/web_api.cpython-39.pyc +0 -0
- promptsModules/basePromptBuilder.py +17 -10
- requirements.txt +1 -0
- scripts/__pycache__/prompt_rg.cpython-310.pyc +0 -0
- scripts/prompt_rg.py +2 -7
.idea/workspace.xml
CHANGED
@@ -5,6 +5,10 @@
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="f6135bf8-df9e-43b2-aa89-fa6954211078" name="Changes" comment="lora issue">
|
|
|
|
|
|
|
|
|
8 |
<change beforePath="$PROJECT_DIR$/scripts/prompt_rg.py" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/prompt_rg.py" afterDir="false" />
|
9 |
</list>
|
10 |
<option name="SHOW_DIALOG" value="false" />
|
@@ -49,6 +53,7 @@
|
|
49 |
"node.js.detected.package.tslint": "true",
|
50 |
"node.js.selected.package.eslint": "(autodetect)",
|
51 |
"node.js.selected.package.tslint": "(autodetect)",
|
|
|
52 |
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
|
53 |
"vue.rearranger.settings.migration": "true"
|
54 |
}
|
@@ -139,7 +144,9 @@
|
|
139 |
<workItem from="1693192262404" duration="7760000" />
|
140 |
<workItem from="1693222831729" duration="4650000" />
|
141 |
<workItem from="1693227796818" duration="194000" />
|
142 |
-
<workItem from="1693228084357" duration="
|
|
|
|
|
143 |
</task>
|
144 |
<task id="LOCAL-00001" summary="init">
|
145 |
<option name="closed" value="true" />
|
@@ -397,7 +404,15 @@
|
|
397 |
<option name="project" value="LOCAL" />
|
398 |
<updated>1693226277283</updated>
|
399 |
</task>
|
400 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
<servers />
|
402 |
</component>
|
403 |
<component name="TypeScriptGeneratedFilesManager">
|
@@ -417,7 +432,6 @@
|
|
417 |
<component name="VcsManagerConfiguration">
|
418 |
<option name="CHECK_NEW_TODO" value="false" />
|
419 |
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
420 |
-
<MESSAGE value="code update" />
|
421 |
<MESSAGE value="修改tab名" />
|
422 |
<MESSAGE value="update ignore" />
|
423 |
<MESSAGE value="format code" />
|
@@ -442,7 +456,8 @@
|
|
442 |
<MESSAGE value="rename code" />
|
443 |
<MESSAGE value="rename module" />
|
444 |
<MESSAGE value="lora issue" />
|
445 |
-
<
|
|
|
446 |
</component>
|
447 |
<component name="XDebuggerManager">
|
448 |
<breakpoint-manager>
|
@@ -452,11 +467,16 @@
|
|
452 |
<line>109</line>
|
453 |
<option name="timeStamp" value="1" />
|
454 |
</line-breakpoint>
|
|
|
|
|
|
|
|
|
|
|
455 |
</breakpoints>
|
456 |
</breakpoint-manager>
|
457 |
</component>
|
458 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
459 |
-
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$prompt_rg.coverage" NAME="prompt_rg Coverage Results" MODIFIED="
|
460 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$model_manager.coverage" NAME="model_manager Coverage Results" MODIFIED="1693226005740" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/promptsModules" />
|
461 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$web_api.coverage" NAME="web_api Coverage Results" MODIFIED="1693223797704" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/scripts/promptsModules" />
|
462 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$sd_nsfw_random.coverage" NAME="sd_nsfw_random Coverage Results" MODIFIED="1692616884549" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/scripts/module" />
|
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="f6135bf8-df9e-43b2-aa89-fa6954211078" name="Changes" comment="lora issue">
|
8 |
+
<change afterPath="$PROJECT_DIR$/.github/workflows/update_space.yml" afterDir="false" />
|
9 |
+
<change afterPath="$PROJECT_DIR$/promptsModules/.~modelsConfig.xlsx" afterDir="false" />
|
10 |
+
<change beforePath="$PROJECT_DIR$/promptsModules/basePromptBuilder.py" beforeDir="false" afterPath="$PROJECT_DIR$/promptsModules/basePromptBuilder.py" afterDir="false" />
|
11 |
+
<change beforePath="$PROJECT_DIR$/promptsModules/modelsConfig.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/promptsModules/modelsConfig.xlsx" afterDir="false" />
|
12 |
<change beforePath="$PROJECT_DIR$/scripts/prompt_rg.py" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/prompt_rg.py" afterDir="false" />
|
13 |
</list>
|
14 |
<option name="SHOW_DIALOG" value="false" />
|
|
|
53 |
"node.js.detected.package.tslint": "true",
|
54 |
"node.js.selected.package.eslint": "(autodetect)",
|
55 |
"node.js.selected.package.tslint": "(autodetect)",
|
56 |
+
"nodejs_package_manager_path": "npm",
|
57 |
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
|
58 |
"vue.rearranger.settings.migration": "true"
|
59 |
}
|
|
|
144 |
<workItem from="1693192262404" duration="7760000" />
|
145 |
<workItem from="1693222831729" duration="4650000" />
|
146 |
<workItem from="1693227796818" duration="194000" />
|
147 |
+
<workItem from="1693228084357" duration="3923000" />
|
148 |
+
<workItem from="1693292652800" duration="4431000" />
|
149 |
+
<workItem from="1693307644817" duration="2314000" />
|
150 |
</task>
|
151 |
<task id="LOCAL-00001" summary="init">
|
152 |
<option name="closed" value="true" />
|
|
|
404 |
<option name="project" value="LOCAL" />
|
405 |
<updated>1693226277283</updated>
|
406 |
</task>
|
407 |
+
<task id="LOCAL-00033" summary="update reqiurements">
|
408 |
+
<option name="closed" value="true" />
|
409 |
+
<created>1693307836718</created>
|
410 |
+
<option name="number" value="00033" />
|
411 |
+
<option name="presentableId" value="LOCAL-00033" />
|
412 |
+
<option name="project" value="LOCAL" />
|
413 |
+
<updated>1693307836718</updated>
|
414 |
+
</task>
|
415 |
+
<option name="localTasksCounter" value="34" />
|
416 |
<servers />
|
417 |
</component>
|
418 |
<component name="TypeScriptGeneratedFilesManager">
|
|
|
432 |
<component name="VcsManagerConfiguration">
|
433 |
<option name="CHECK_NEW_TODO" value="false" />
|
434 |
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
|
|
435 |
<MESSAGE value="修改tab名" />
|
436 |
<MESSAGE value="update ignore" />
|
437 |
<MESSAGE value="format code" />
|
|
|
456 |
<MESSAGE value="rename code" />
|
457 |
<MESSAGE value="rename module" />
|
458 |
<MESSAGE value="lora issue" />
|
459 |
+
<MESSAGE value="update reqiurements" />
|
460 |
+
<option name="LAST_COMMIT_MESSAGE" value="update reqiurements" />
|
461 |
</component>
|
462 |
<component name="XDebuggerManager">
|
463 |
<breakpoint-manager>
|
|
|
467 |
<line>109</line>
|
468 |
<option name="timeStamp" value="1" />
|
469 |
</line-breakpoint>
|
470 |
+
<line-breakpoint suspend="THREAD" type="python-line">
|
471 |
+
<url>file://$PROJECT_DIR$/promptsModules/basePromptBuilder.py</url>
|
472 |
+
<line>951</line>
|
473 |
+
<option name="timeStamp" value="2" />
|
474 |
+
</line-breakpoint>
|
475 |
</breakpoints>
|
476 |
</breakpoint-manager>
|
477 |
</component>
|
478 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
479 |
+
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$prompt_rg.coverage" NAME="prompt_rg Coverage Results" MODIFIED="1693309836604" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/scripts" />
|
480 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$model_manager.coverage" NAME="model_manager Coverage Results" MODIFIED="1693226005740" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/promptsModules" />
|
481 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$web_api.coverage" NAME="web_api Coverage Results" MODIFIED="1693223797704" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/scripts/promptsModules" />
|
482 |
<SUITE FILE_PATH="coverage/prompt_r_gen_sd$sd_nsfw_random.coverage" NAME="sd_nsfw_random Coverage Results" MODIFIED="1692616884549" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/scripts/module" />
|
README.md
CHANGED
@@ -12,7 +12,7 @@ sdk_version: 3.40.1
|
|
12 |
|
13 |
~~目前仅支持画女孩提示词~~,其他待开发。
|
14 |
|
15 |
-
功能预览:https://huggingface.co/spaces/heath1989/prompt-rp
|
16 |
|
17 |
## 功能
|
18 |
|
@@ -60,6 +60,7 @@ sdk_version: 3.40.1
|
|
60 |
1. xyz:Lora/Loha/embedding
|
61 |
2. yxz:Loha/Lora/embedding
|
62 |
3. zxy:embedding/Lora/loha
|
|
|
63 |
......
|
64 |
|
65 |
|
|
|
12 |
|
13 |
~~目前仅支持画女孩提示词~~,其他待开发。
|
14 |
|
15 |
+
功能预览:[https://huggingface.co/spaces/heath1989/prompt-rp](https://huggingface.co/spaces/heath1989/prompt-r-gen-sd)
|
16 |
|
17 |
## 功能
|
18 |
|
|
|
60 |
1. xyz:Lora/Loha/embedding
|
61 |
2. yxz:Loha/Lora/embedding
|
62 |
3. zxy:embedding/Lora/loha
|
63 |
+
|
64 |
......
|
65 |
|
66 |
|
promptsModules/__pycache__/basePromptBuilder.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/basePromptBuilder.cpython-310.pyc and b/promptsModules/__pycache__/basePromptBuilder.cpython-310.pyc differ
|
|
promptsModules/__pycache__/basePromptBuilder.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/basePromptBuilder.cpython-39.pyc and b/promptsModules/__pycache__/basePromptBuilder.cpython-39.pyc differ
|
|
promptsModules/__pycache__/configDB.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/configDB.cpython-310.pyc and b/promptsModules/__pycache__/configDB.cpython-310.pyc differ
|
|
promptsModules/__pycache__/configDB.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/configDB.cpython-39.pyc and b/promptsModules/__pycache__/configDB.cpython-39.pyc differ
|
|
promptsModules/__pycache__/lora.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/lora.cpython-310.pyc and b/promptsModules/__pycache__/lora.cpython-310.pyc differ
|
|
promptsModules/__pycache__/lora.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/lora.cpython-39.pyc and b/promptsModules/__pycache__/lora.cpython-39.pyc differ
|
|
promptsModules/__pycache__/model_manager.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/model_manager.cpython-310.pyc and b/promptsModules/__pycache__/model_manager.cpython-310.pyc differ
|
|
promptsModules/__pycache__/model_manager.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/model_manager.cpython-39.pyc and b/promptsModules/__pycache__/model_manager.cpython-39.pyc differ
|
|
promptsModules/__pycache__/promptGen.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/promptGen.cpython-310.pyc and b/promptsModules/__pycache__/promptGen.cpython-310.pyc differ
|
|
promptsModules/__pycache__/promptGen.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/promptGen.cpython-39.pyc and b/promptsModules/__pycache__/promptGen.cpython-39.pyc differ
|
|
promptsModules/__pycache__/sd_command_gen.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/sd_command_gen.cpython-310.pyc and b/promptsModules/__pycache__/sd_command_gen.cpython-310.pyc differ
|
|
promptsModules/__pycache__/sd_command_gen.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/sd_command_gen.cpython-39.pyc and b/promptsModules/__pycache__/sd_command_gen.cpython-39.pyc differ
|
|
promptsModules/__pycache__/web_api.cpython-310.pyc
CHANGED
Binary files a/promptsModules/__pycache__/web_api.cpython-310.pyc and b/promptsModules/__pycache__/web_api.cpython-310.pyc differ
|
|
promptsModules/__pycache__/web_api.cpython-39.pyc
CHANGED
Binary files a/promptsModules/__pycache__/web_api.cpython-39.pyc and b/promptsModules/__pycache__/web_api.cpython-39.pyc differ
|
|
promptsModules/basePromptBuilder.py
CHANGED
@@ -953,19 +953,25 @@ def get_hair_prompt():
|
|
953 |
if has_hair_length:
|
954 |
prompt = prompt + get_random_from_list(hairLength)
|
955 |
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
if has_hair_length:
|
961 |
-
prompt = prompt + " and " +
|
962 |
else:
|
963 |
-
prompt = prompt +
|
964 |
else:
|
965 |
if has_hair_length:
|
966 |
-
|
|
|
|
|
|
|
967 |
else:
|
968 |
-
|
|
|
|
|
|
|
969 |
|
970 |
return prompt
|
971 |
|
@@ -1141,7 +1147,7 @@ def get_s_bottom_prompt():
|
|
1141 |
def get_assignment_prompt(the_assignment):
|
1142 |
the_value = get_config_value_by_key(the_assignment).lower()
|
1143 |
# check the_value, if is like nil, null, none, then return ""
|
1144 |
-
if the_value == "nil" or the_value == "null" or the_value == "none" or the_value == "空":
|
1145 |
return ""
|
1146 |
else:
|
1147 |
return "(" + get_config_value_by_key(the_assignment) + "), "
|
@@ -1312,7 +1318,7 @@ project_config = {
|
|
1312 |
# 颜色,只用给颜色即可
|
1313 |
"leg_wear_color": "",
|
1314 |
"shoes_color": "",
|
1315 |
-
"hair_color":
|
1316 |
"enable_eye_color": True,
|
1317 |
"disable_all_color": True,
|
1318 |
# 直接指定prompt,这会直接跳过其他配置,并且自动加深prompt权重
|
@@ -1324,6 +1330,7 @@ project_config = {
|
|
1324 |
"assign_body_clothes": "",
|
1325 |
"assign_panties": "",
|
1326 |
"assign_girl_description": "",
|
|
|
1327 |
|
1328 |
# 装饰、物品、形容词
|
1329 |
"accessories_random_tims": 3, # max:6 NOTE:对于某些model,如何这些prompt出现,可能会影响视角效果
|
|
|
953 |
if has_hair_length:
|
954 |
prompt = prompt + get_random_from_list(hairLength)
|
955 |
|
956 |
+
enable_hair_color_random = get_config_value_by_key("hair_color")
|
957 |
+
target_hair_color = get_assignment_prompt("assign_hair_color")
|
958 |
+
|
959 |
+
if target_hair_color != "":
|
960 |
if has_hair_length:
|
961 |
+
prompt = prompt + " and " + get_config_value_by_key("assign_hair_color") + " hair, "
|
962 |
else:
|
963 |
+
prompt = prompt + get_config_value_by_key("assign_hair_color") + " hair, "
|
964 |
else:
|
965 |
if has_hair_length:
|
966 |
+
if enable_hair_color_random:
|
967 |
+
prompt = prompt + " and " + get_standard_prompt(hairColor)
|
968 |
+
else:
|
969 |
+
prompt = prompt + " hair, "
|
970 |
else:
|
971 |
+
if enable_hair_color_random:
|
972 |
+
prompt = prompt + get_standard_prompt(hairColor)
|
973 |
+
else:
|
974 |
+
pass
|
975 |
|
976 |
return prompt
|
977 |
|
|
|
1147 |
def get_assignment_prompt(the_assignment):
|
1148 |
the_value = get_config_value_by_key(the_assignment).lower()
|
1149 |
# check the_value, if is like nil, null, none, then return ""
|
1150 |
+
if the_value == "nil" or the_value == "null" or the_value == "none" or the_value == "空" or the_value == "":
|
1151 |
return ""
|
1152 |
else:
|
1153 |
return "(" + get_config_value_by_key(the_assignment) + "), "
|
|
|
1318 |
# 颜色,只用给颜色即可
|
1319 |
"leg_wear_color": "",
|
1320 |
"shoes_color": "",
|
1321 |
+
"hair_color": False,
|
1322 |
"enable_eye_color": True,
|
1323 |
"disable_all_color": True,
|
1324 |
# 直接指定prompt,这会直接跳过其他配置,并且自动加深prompt权重
|
|
|
1330 |
"assign_body_clothes": "",
|
1331 |
"assign_panties": "",
|
1332 |
"assign_girl_description": "",
|
1333 |
+
"assign_hair_color": "", # 指定头发颜色
|
1334 |
|
1335 |
# 装饰、物品、形容词
|
1336 |
"accessories_random_tims": 3, # max:6 NOTE:对于某些model,如何这些prompt出现,可能会影响视角效果
|
requirements.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
openpyxl==3.1.2
|
|
|
|
1 |
openpyxl==3.1.2
|
2 |
+
gradio==3.40.1
|
scripts/__pycache__/prompt_rg.cpython-310.pyc
CHANGED
Binary files a/scripts/__pycache__/prompt_rg.cpython-310.pyc and b/scripts/__pycache__/prompt_rg.cpython-310.pyc differ
|
|
scripts/prompt_rg.py
CHANGED
@@ -74,13 +74,8 @@ def gen_action(gen_times, widget_lora, widget_lyco, widget_embeddings, model_ord
|
|
74 |
else:
|
75 |
project_config["assign_profession"] = assign_job
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
else:
|
80 |
-
if assign_hair_color == "":
|
81 |
-
project_config["hair_color"] = "null"
|
82 |
-
else:
|
83 |
-
project_config["hair_color"] = assign_hair_color
|
84 |
project_config["add_hair_style"] = add_hair_style
|
85 |
project_config["add_hair_length"] = hair_length
|
86 |
project_config["enable_eye_color"] = enable_eye_color
|
|
|
74 |
else:
|
75 |
project_config["assign_profession"] = assign_job
|
76 |
|
77 |
+
project_config["hair_color"] = hair_color
|
78 |
+
project_config["assign_hair_color"] = assign_hair_color
|
|
|
|
|
|
|
|
|
|
|
79 |
project_config["add_hair_style"] = add_hair_style
|
80 |
project_config["add_hair_length"] = hair_length
|
81 |
project_config["enable_eye_color"] = enable_eye_color
|