save code

This commit is contained in:
xsl
2025-08-18 21:01:51 +08:00
parent e1a03d8e20
commit 929bd1e18c
+7 -4
View File
@@ -334,11 +334,14 @@ class RenderPeopleKpsMask:
"default": 0
}),
"left_right_line_width": ("FLOAT", {
"default": 0.4
"default": 1
}),
"human_head2_yao_times": ("FLOAT", {
"default": 2.5
}),
"more_clip": ("FLOAT", {
"default": 0.2
}),
}
}
@@ -347,7 +350,7 @@ class RenderPeopleKpsMask:
FUNCTION = "render"
CATEGORY = "ControlNet Preprocessors/Pose Keypoint Postprocess"
def render(self, kps, cloth_len, line_len, cloth_short, width, height, left_right_line_width, human_head2_yao_times) -> tuple[torch.Tensor]:
def render(self, kps, cloth_len, line_len, cloth_short, width, height, left_right_line_width, human_head2_yao_times, more_clip) -> tuple[torch.Tensor]:
if isinstance(kps, list):
kps = kps[0]
@@ -365,8 +368,8 @@ class RenderPeopleKpsMask:
)
w = Right - Left
x = Left
h = head2yao_base * human_head2_yao_times
y = head_y
h = head2yao_base * human_head2_yao_times + head_y - (more_clip*head2yao_base)
y = 0
print(f"RenderPeopleKpsMask w:{w} h{h} x{x} y{y}")
return (mask, int(neck_y), float(Head2YaoTimes), int(Left), int(Right), int(w), int(h), int(x), int(y))