diff --git a/assets/config.json b/assets/config.json index 7728543..432a5c9 100644 --- a/assets/config.json +++ b/assets/config.json @@ -30,6 +30,7 @@ "draw artist", "draw style", "earings", + "ears decoration", "expression", "eyebrows color", "eyebrows style", diff --git a/assets/zh/ears_decoration_datas.jsonl b/assets/zh/ears_decoration_datas.jsonl new file mode 100644 index 0000000..47d8761 --- /dev/null +++ b/assets/zh/ears_decoration_datas.jsonl @@ -0,0 +1,13 @@ +{"text":"耳环"} +{"text":"十字耳环"} +{"text":"水晶耳环"} +{"text":"花耳环"} +{"text":"心形耳环"} +{"text":"环状耳环"} +{"text":"多个耳环"} +{"text":"药丸样式的耳环"} +{"text":"只一边戴着耳环"} +{"text":"骷髅耳环"} +{"text":"星形耳环"} +{"text":"珍珠耳环"} +{"text":"金色耳环"} \ No newline at end of file diff --git a/modules/build_prompt.py b/modules/build_prompt.py index 645d4ab..b360600 100644 --- a/modules/build_prompt.py +++ b/modules/build_prompt.py @@ -607,6 +607,8 @@ class BuildPromptManager: gloves_weight=0, head_decoration=EMPTY_OPTION, head_decoration_weight=0, + ears_decoration=EMPTY_OPTION, + ears_decoration_weight=0, neck_decoration=EMPTY_OPTION, neck_decoration_weight=0, chest_decoration=EMPTY_OPTION, @@ -698,6 +700,12 @@ class BuildPromptManager: elif head_decoration != EMPTY_OPTION: prompt_words.append(buildPromptWeight(head_decoration, head_decoration_weight)) + if ears_decoration_weight > 0: + if ears_decoration == RANDOM_OPTION: + prompt_words.append(buildPromptWeight(self.ears_decoration_prompt.choice_prompt(seed), ears_decoration_weight)) + elif ears_decoration != EMPTY_OPTION: + prompt_words.append(buildPromptWeight(ears_decoration, ears_decoration_weight)) + if neck_decoration_weight > 0: if neck_decoration == RANDOM_OPTION: prompt_words.append(buildPromptWeight(self.neck_decoration_prompt.choice_prompt(seed), neck_decoration_weight)) diff --git a/nodes/prompt_portrait.py b/nodes/prompt_portrait.py index 827f1c2..fc4657f 100644 --- a/nodes/prompt_portrait.py +++ b/nodes/prompt_portrait.py @@ -793,6 +793,19 @@ class PortraitFashionPrompt: "step": 0.05, "display": "slider", }), + # 耳朵装饰 + "ears_decoration": (buildOptionList(build_prompt_manager.ears_decoration_prompt.get_dataset()), { + "default": EMPTY_OPTION, + }), + # 耳朵装饰权重 + "ears_decoration_weight": ("FLOAT", { + "default": 1, + "min": 0, + "max": max_float_value, + "round": 0.01, + "step": 0.05, + "display": "slider", + }), # 颈部装饰 "neck_decoration": (buildOptionList(build_prompt_manager.neck_decoration_prompt.get_dataset()), { "default": EMPTY_OPTION, @@ -932,6 +945,8 @@ class PortraitFashionPrompt: gloves_weight=0, head_decoration=EMPTY_OPTION, head_decoration_weight=0, + ears_decoration=EMPTY_OPTION, + ears_decoration_weight=0, neck_decoration=EMPTY_OPTION, neck_decoration_weight=0, chest_decoration=EMPTY_OPTION, @@ -989,6 +1004,8 @@ class PortraitFashionPrompt: gloves_weight=gloves_weight, head_decoration=head_decoration, head_decoration_weight=head_decoration_weight, + ears_decoration=ears_decoration, + ears_decoration_weight=ears_decoration_weight, neck_decoration=neck_decoration, neck_decoration_weight=neck_decoration_weight, chest_decoration=chest_decoration,