41 Commits
Author SHA1 Message Date
Apple d4cb6b54f2 added output path 2024-02-04 12:27:42 +05:30
Apple 7f6a116695 added output path 2024-02-04 12:05:22 +05:30
Apple 559f15292c added output path 2024-02-04 12:04:06 +05:30
Apple 773e0d0dc1 added output path 2024-02-04 12:00:56 +05:30
Apple 28268b08b6 added output path 2024-02-04 11:58:59 +05:30
Apple 72a009634b added output path 2024-02-04 11:56:31 +05:30
Apple 8fe268af81 added output path 2024-02-04 11:50:32 +05:30
Apple 6efd2f0b75 added output path 2024-02-04 11:40:35 +05:30
Apple 779bc16ec7 added output path 2024-02-04 10:58:24 +05:30
Apple 8f7c66f608 Merge branch 'ram-changes2' of github.com:TRI3D-LC/tri3d-comfyui-nodes into ram-changes2 2024-02-04 10:29:36 +05:30
Apple 98750db9c9 .env in gitignore 2024-02-04 10:29:15 +05:30
Ram Deshmukh 6f7508f4d5 Modified pose adaption so that it can now refer face from another pose, Added node to compare body proportion ratio for the given 2 poses and body part 2024-02-03 10:41:17 +05:30
Ram Deshmukh df5cb0625f Modified pose adaption so that it can now refer face from another pose, Added node to compare body proportion ratio for the given 2 poses and body part 2024-02-03 10:30:31 +05:30
Ram Deshmukh 4fce2dcf57 Addeed 4 nodes for M2M, load ref pose, load face, load asset, prompt builder 2024-02-01 16:10:06 +05:30
Apple bfc018e1cc v2.3 , clipdrop remove bg , skip torso check for trousers, flip based on center of pose , backpose.json ears corrected 2024-01-30 17:48:22 +05:30
Apple a20b5788d0 v2.3 , clipdrop remove bg , skip torso check for trousers, flip based on center of pose , backpose.json ears corrected 2024-01-30 17:46:46 +05:30
Apple 6b5c9b700a v2.3 , clipdrop remove bg , skip torso check for trousers, flip based on center of pose , backpose.json ears corrected 2024-01-30 17:45:39 +05:30
Apple d7b2027dec v2.3 , clipdrop remove bg , skip torso check for trousers, flip based on center of pose , backpose.json ears corrected 2024-01-30 17:43:17 +05:30
Ram Deshmukh 8fe532dc7b Added clipdop background remov api + misc changes 2024-01-30 17:29:25 +05:30
NitishTRI3D 9bb07aa14e Merge pull request #10 from TRI3D-LC/aravind-1
Merged zoom workflow related nodes
2024-01-25 13:51:55 +05:30
aravind e34ba793ed Merged zoom workflow related nodes 2024-01-25 12:58:57 +05:30
Apple 47faf15e0c adding back_fixed logic in pose adaption 2024-01-24 11:36:40 +05:30
Apple 9fe4553111 adding back_fixed logic in pose adaption 2024-01-24 11:30:30 +05:30
Apple f88a264aa5 adding back_fixed logic in pose adaption 2024-01-24 10:50:27 +05:30
Apple 389e5a86d6 adding back_fixed logic in pose adaption 2024-01-24 10:49:20 +05:30
Apple c2821630ca adding back_fixed logic in pose adaption 2024-01-24 10:47:19 +05:30
Apple 993073cded adding back_fixed logic in pose adaption 2024-01-24 10:44:20 +05:30
Apple 407adfab9e adding back_fixed logic in pose adaption 2024-01-24 10:43:39 +05:30
Apple d0831c5fd1 adding back_fixed logic in pose adaption 2024-01-24 10:42:04 +05:30
Apple 9af0981904 adding back_fixed logic in pose adaption 2024-01-24 10:39:01 +05:30
Apple 28fa91ca0d adding back_fixed logic in pose adaption 2024-01-24 10:36:53 +05:30
Apple a85ab0fd2e Merge branch 'main' of github.com:TRI3D-LC/tri3d-comfyui-nodes 2024-01-24 10:36:09 +05:30
Apple 83af720121 adding back_fixed logic in pose adaption 2024-01-24 10:35:43 +05:30
NitishTRI3D cd1a175b81 Merge pull request #9 from TRI3D-LC/main2
v2.0 release, added 3 nodes from aravind-2 & kwargs -> filenamepath
2024-01-24 07:45:35 +05:30
Apple 9d6a0f6cdb v2.0 release, added 3 nodes from aravind-2 & kwargs -> filenamepath 2024-01-24 07:44:34 +05:30
Apple 82030c7992 recolor node; 1.8 2024-01-11 19:18:26 +05:30
NitishTRI3D 5528ef185e Merge pull request #6 from TRI3D-LC/ram-changes
Added new mode to lock pose for the given garment category
2024-01-10 15:41:19 +05:30
Ram Deshmukh 978c2919b6 Added new mode to lock pose for the given garment category 2024-01-10 15:31:16 +05:30
Apple c8ce45660f v1.7.1 2024-01-09 17:37:34 +05:30
Apple 26e07a1d24 Merge branch 'main' of github.com:TRI3D-LC/tri3d-comfyui-nodes 2024-01-09 17:37:09 +05:30
NitishTRI3D df4851e820 Merge pull request #5 from TRI3D-LC/aravind-3
Aravind 3
2024-01-08 21:45:15 +05:30
11 changed files with 4290 additions and 103 deletions
+1
View File
@@ -0,0 +1 @@
CLIPDROP_API_KEY=
+1
View File
@@ -5,5 +5,6 @@ venv
.DS_Store
checkpoints/
checkpoint/
.env
dwpose/keypoints/
+906 -87
View File
File diff suppressed because it is too large Load Diff
+33 -14
View File
@@ -35,7 +35,7 @@ def draw_bodypose(canvas: np.ndarray, keypoints: list) -> np.ndarray:
keypoint1 = keypoints[k1_index - 1]
keypoint2 = keypoints[k2_index - 1]
if -1 in keypoint1 or -1 in keypoint2:
if any(i < 0 for i in keypoint1) or any(i < 0 for i in keypoint2):
continue
Y = np.array([keypoint1[0], keypoint2[0]])
@@ -46,8 +46,9 @@ def draw_bodypose(canvas: np.ndarray, keypoints: list) -> np.ndarray:
angle = math.degrees(math.atan2(X[0] - X[1], Y[0] - Y[1]))
polygon = cv2.ellipse2Poly((int(mY), int(mX)), (int(length / 2), stickwidth), int(angle), 0, 360, 1)
cv2.fillConvexPoly(canvas, polygon, [int(float(c) * 0.6) for c in color])
for i, (keypoint, color) in enumerate(zip(keypoints, colors)):
if -1 in keypoint:
if any(i < 0 for i in keypoint1):
continue
x, y = keypoint[0], keypoint[1]
@@ -106,25 +107,38 @@ def rotate(src_keypoints, dest_keypoints, point1_idx, point2_idx):
return dest_keypoints
def scale(src_keypoints, dest_keypoints, ref_point1_idx, ref_point2_idx, point1_idx, point2_idx):
ref_x1,ref_y1 = src_keypoints[ref_point1_idx]
ref_x2,ref_y2 = src_keypoints[ref_point2_idx]
ref_x3,ref_y3 = dest_keypoints[ref_point1_idx]
ref_x4,ref_y4 = dest_keypoints[ref_point2_idx]
def scale(src_keypoints, dest_keypoints, ref_point1_idx, ref_point2_idx, point1_idx, point2_idx, ref_torso=False):
if ref_torso == True:
ref_x1,ref_y1 = src_keypoints[1]
ref_x3,ref_y3 = dest_keypoints[1]
ref_x2 = int((src_keypoints[8][0] + src_keypoints[11][0]) / 2)
ref_y2 = int((src_keypoints[8][1] + src_keypoints[11][1]) / 2)
ref_x4 = int((dest_keypoints[8][0] + dest_keypoints[11][0]) / 2)
ref_y4 = int((dest_keypoints[8][1] + dest_keypoints[11][1]) / 2)
else:
ref_x1,ref_y1 = src_keypoints[ref_point1_idx]
ref_x2,ref_y2 = src_keypoints[ref_point2_idx]
ref_x3,ref_y3 = dest_keypoints[ref_point1_idx]
ref_x4,ref_y4 = dest_keypoints[ref_point2_idx]
x1,y1 = src_keypoints[point1_idx]
x2,y2 = src_keypoints[point2_idx]
x3,y3 = dest_keypoints[point1_idx]
x4,y4 = dest_keypoints[point2_idx]
src_ref_len = np.linalg.norm(np.array([ref_x1, ref_y1]) - np.array([ref_x2, ref_y2])) #src ref part distance
dest_ref_len = np.linalg.norm(np.array([ref_x3, ref_y3]) - np.array([ref_x4, ref_y4])) #dest ref part distance
# src_ref_len = np.linalg.norm(np.array([ref_x1, ref_y1]) - np.array([ref_x2, ref_y2])) #src ref part distance
# dest_ref_len = np.linalg.norm(np.array([ref_x3, ref_y3]) - np.array([ref_x4, ref_y4])) #dest ref part distance
src_targ_len = np.linalg.norm(np.array([x1, y1]) - np.array([x2, y2])) #src targ part distance
dest_targ_len = np.linalg.norm(np.array([x3, y3]) - np.array([x4,y4])) #dest targ part distance
# src_targ_len = np.linalg.norm(np.array([x1, y1]) - np.array([x2, y2])) #src targ part distance
# dest_targ_len = np.linalg.norm(np.array([x3, y3]) - np.array([x4,y4])) #dest targ part distance
src_targ_ref_ratio = src_targ_len / src_ref_len #src targ to ref ratio
dest_targ_ref_ratio = dest_targ_len / dest_ref_len #dest targ to ref ratio
# src_targ_ref_ratio = src_targ_len / src_ref_len #src targ to ref ratio
# dest_targ_ref_ratio = dest_targ_len / dest_ref_len #dest targ to ref ratio
src_targ_ref_ratio = get_ratio(ref_x1, ref_y1, ref_x2, ref_y2, x1, y1, x2, y2) #src targ to ref ratio
dest_targ_ref_ratio = get_ratio(ref_x3, ref_y3, ref_x4, ref_y4, x3, y3, x4, y4) #dest targ to ref ratio
scale = src_targ_ref_ratio / dest_targ_ref_ratio
@@ -135,6 +149,11 @@ def scale(src_keypoints, dest_keypoints, ref_point1_idx, ref_point2_idx, point1_
return dest_keypoints
def get_ratio(ref_x1, ref_y1, ref_x2, ref_y2, x1, y1, x2, y2):
ref_len = np.linalg.norm(np.array([ref_x1, ref_y1]) - np.array([ref_x2, ref_y2])) #ref body part length
targ_len = np.linalg.norm(np.array([x1, y1]) - np.array([x2, y2])) #targ body part length
return targ_len / ref_len
def scale_hand(src_keypoints, dest_keypoints, ref_point1_idx, ref_point2_idx, starting_idx):
"""
@@ -239,7 +258,7 @@ def get_torso_angles(keypoints):
a,b = keypoints[5],keypoints[1]
angle_radians = math.tan((a[1]-b[1])/(a[0]-b[0]))
rs_angle = abs(math.degrees(angle_radians))
#getting bisector of torso and getting angle with y_axis
a,b,c = keypoints[8], keypoints[1], keypoints[11]
+2 -2
View File
@@ -67,11 +67,11 @@
-1
],
[
246,
279,
74
],
[
279,
246,
74
],
[
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,526 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
259,
75
],
[
261,
127
],
[
222,
133
],
[
208,
196
],
[
199,
253
],
[
296,
132
],
[
316,
192
],
[
333,
246
],
[
241,
249
],
[
242,
348
],
[
255,
448
],
[
277,
248
],
[
296,
344
],
[
322,
448
],
[
251,
69
],
[
268,
67
],
[
237,
77
],
[
280,
73
],
[
239,
71
],
[
239,
77
],
[
241,
81
],
[
243,
87
],
[
243,
91
],
[
247,
95
],
[
251,
96
],
[
255,
100
],
[
261,
100
],
[
264,
98
],
[
270,
96
],
[
272,
93
],
[
276,
89
],
[
278,
83
],
[
278,
79
],
[
278,
73
],
[
278,
69
],
[
243,
66
],
[
245,
66
],
[
249,
64
],
[
251,
64
],
[
255,
64
],
[
262,
64
],
[
266,
62
],
[
268,
62
],
[
272,
62
],
[
274,
64
],
[
259,
69
],
[
259,
71
],
[
259,
73
],
[
261,
77
],
[
255,
79
],
[
259,
79
],
[
261,
79
],
[
262,
79
],
[
264,
79
],
[
247,
69
],
[
249,
69
],
[
251,
67
],
[
255,
69
],
[
251,
69
],
[
249,
69
],
[
264,
69
],
[
266,
67
],
[
268,
67
],
[
272,
67
],
[
268,
69
],
[
266,
69
],
[
251,
87
],
[
255,
83
],
[
259,
83
],
[
261,
83
],
[
262,
83
],
[
264,
83
],
[
268,
85
],
[
266,
87
],
[
264,
91
],
[
261,
91
],
[
257,
91
],
[
253,
89
],
[
251,
87
],
[
255,
85
],
[
261,
85
],
[
264,
85
],
[
268,
85
],
[
264,
87
],
[
261,
89
],
[
255,
89
],
[
251,
69
],
[
268,
67
],
[
333,
249
],
[
328,
255
],
[
324,
262
],
[
322,
270
],
[
320,
278
],
[
331,
270
],
[
329,
278
],
[
324,
278
],
[
322,
276
],
[
335,
272
],
[
329,
278
],
[
326,
278
],
[
322,
276
],
[
337,
272
],
[
331,
278
],
[
328,
278
],
[
326,
276
],
[
337,
270
],
[
333,
276
],
[
329,
276
],
[
328,
276
],
[
199,
256
],
[
203,
263
],
[
207,
267
],
[
209,
275
],
[
209,
283
],
[
199,
277
],
[
203,
285
],
[
207,
283
],
[
211,
281
],
[
197,
279
],
[
201,
285
],
[
207,
283
],
[
209,
281
],
[
196,
277
],
[
201,
283
],
[
205,
283
],
[
209,
281
],
[
197,
277
],
[
201,
281
],
[
203,
281
],
[
205,
279
]
]
}
+526
View File
@@ -0,0 +1,526 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
-1,
-1
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
-1,
-1
],
[
-1,
-1
],
[
279,
74
],
[
246,
74
],
[
240,
66
],
[
240,
72
],
[
240,
76
],
[
242,
82
],
[
242,
86
],
[
246,
88
],
[
248,
92
],
[
252,
94
],
[
258,
94
],
[
262,
94
],
[
266,
94
],
[
270,
92
],
[
274,
90
],
[
276,
86
],
[
278,
82
],
[
280,
78
],
[
282,
74
],
[
248,
58
],
[
250,
56
],
[
252,
56
],
[
256,
56
],
[
260,
56
],
[
268,
58
],
[
272,
58
],
[
274,
60
],
[
278,
62
],
[
280,
64
],
[
264,
64
],
[
262,
66
],
[
262,
68
],
[
262,
68
],
[
258,
74
],
[
258,
74
],
[
262,
74
],
[
264,
74
],
[
266,
74
],
[
250,
62
],
[
252,
62
],
[
256,
62
],
[
258,
62
],
[
254,
64
],
[
252,
62
],
[
268,
64
],
[
272,
64
],
[
274,
64
],
[
276,
68
],
[
274,
68
],
[
270,
66
],
[
252,
80
],
[
256,
78
],
[
258,
78
],
[
260,
78
],
[
262,
78
],
[
266,
80
],
[
268,
82
],
[
266,
84
],
[
262,
84
],
[
260,
84
],
[
256,
84
],
[
254,
82
],
[
252,
80
],
[
256,
78
],
[
260,
78
],
[
264,
80
],
[
268,
82
],
[
264,
84
],
[
260,
82
],
[
256,
82
],
[
254,
62
],
[
272,
64
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314.2191598676356,
257
],
[
308.2191598676356,
262
],
[
306.2191598676356,
266
],
[
303.2191598676356,
270
],
[
301.2191598676356,
276
],
[
312.2191598676356,
279
],
[
311.2191598676356,
284
],
[
308.2191598676356,
290
],
[
303.2191598676356,
292
],
[
313.2191598676356,
279
],
[
312.2191598676356,
284
],
[
311.2191598676356,
290
],
[
307.2191598676356,
292
],
[
314.2191598676356,
279
],
[
313.2191598676356,
284
],
[
312.2191598676356,
289
],
[
311.2191598676356,
293
],
[
317.2191598676356,
279
],
[
314.2191598676356,
283
],
[
313.2191598676356,
287
],
[
312.2191598676356,
290
]
]
}
+526
View File
@@ -0,0 +1,526 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
234,
85
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
-1,
-1
],
[
238,
72
],
[
-1,
-1
],
[
262,
70
],
[
212,
82
],
[
212,
88
],
[
212,
92
],
[
214,
98
],
[
214,
102
],
[
218,
104
],
[
220,
108
],
[
224,
110
],
[
230,
110
],
[
234,
110
],
[
238,
110
],
[
242,
108
],
[
246,
106
],
[
248,
102
],
[
250,
98
],
[
252,
94
],
[
254,
90
],
[
220,
74
],
[
222,
72
],
[
224,
72
],
[
228,
72
],
[
232,
72
],
[
240,
74
],
[
244,
74
],
[
246,
76
],
[
250,
78
],
[
252,
80
],
[
236,
80
],
[
234,
82
],
[
232,
84
],
[
255,
85
],
[
230,
90
],
[
230,
90
],
[
234,
90
],
[
236,
90
],
[
238,
90
],
[
222,
78
],
[
224,
78
],
[
228,
78
],
[
230,
78
],
[
226,
80
],
[
224,
78
],
[
240,
80
],
[
244,
80
],
[
246,
80
],
[
248,
84
],
[
246,
84
],
[
242,
82
],
[
224,
96
],
[
228,
94
],
[
230,
94
],
[
232,
94
],
[
234,
94
],
[
238,
96
],
[
240,
98
],
[
238,
100
],
[
234,
100
],
[
232,
100
],
[
228,
100
],
[
226,
98
],
[
224,
96
],
[
228,
94
],
[
232,
94
],
[
236,
96
],
[
240,
98
],
[
236,
100
],
[
232,
98
],
[
228,
98
],
[
226,
78
],
[
244,
80
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314,
257
],
[
308,
262
],
[
306,
266
],
[
303,
270
],
[
301,
276
],
[
312,
279
],
[
311,
284
],
[
308,
290
],
[
303,
292
],
[
313,
279
],
[
312,
284
],
[
311,
290
],
[
307,
292
],
[
314,
279
],
[
313,
284
],
[
312,
289
],
[
311,
293
],
[
317,
279
],
[
314,
283
],
[
313,
287
],
[
312,
290
]
]
}
+526
View File
@@ -0,0 +1,526 @@
{
"height": 512,
"width": 512,
"keypoints": [
[
298,
85
],
[
264,
125
],
[
298,
125
],
[
310,
193
],
[
314,
254
],
[
230,
125
],
[
216,
192
],
[
211,
252
],
[
286,
244
],
[
292,
339
],
[
294,
448
],
[
240,
247
],
[
242,
336
],
[
246,
444
],
[
293.3658724790831,
75
],
[
-1,
-1
],
[
270.3658724790831,
73
],
[
-1,
-1
],
[
276.3658724790831,
82
],
[
276.3658724790831,
88
],
[
276.3658724790831,
92
],
[
278.3658724790831,
98
],
[
278.3658724790831,
102
],
[
282.3658724790831,
104
],
[
284.3658724790831,
108
],
[
288.3658724790831,
110
],
[
294.3658724790831,
110
],
[
298.3658724790831,
110
],
[
302.3658724790831,
110
],
[
306.3658724790831,
108
],
[
310.3658724790831,
106
],
[
312.3658724790831,
102
],
[
314.3658724790831,
98
],
[
316.3658724790831,
94
],
[
318.3658724790831,
90
],
[
284.3658724790831,
74
],
[
286.3658724790831,
72
],
[
288.3658724790831,
72
],
[
292.3658724790831,
72
],
[
296.3658724790831,
72
],
[
304.3658724790831,
74
],
[
308.3658724790831,
74
],
[
310.3658724790831,
76
],
[
314.3658724790831,
78
],
[
316.3658724790831,
80
],
[
300.3658724790831,
80
],
[
298.3658724790831,
82
],
[
296.3658724790831,
84
],
[
319.3658724790831,
85
],
[
294.3658724790831,
90
],
[
294.3658724790831,
90
],
[
298.3658724790831,
90
],
[
300.3658724790831,
90
],
[
302.3658724790831,
90
],
[
286.3658724790831,
78
],
[
288.3658724790831,
78
],
[
292.3658724790831,
78
],
[
294.3658724790831,
78
],
[
290.3658724790831,
80
],
[
288.3658724790831,
78
],
[
304.3658724790831,
80
],
[
308.3658724790831,
80
],
[
310.3658724790831,
80
],
[
312.3658724790831,
84
],
[
310.3658724790831,
84
],
[
306.3658724790831,
82
],
[
288.3658724790831,
96
],
[
292.3658724790831,
94
],
[
294.3658724790831,
94
],
[
296.3658724790831,
94
],
[
298.3658724790831,
94
],
[
302.3658724790831,
96
],
[
304.3658724790831,
98
],
[
302.3658724790831,
100
],
[
298.3658724790831,
100
],
[
296.3658724790831,
100
],
[
292.3658724790831,
100
],
[
290.3658724790831,
98
],
[
288.3658724790831,
96
],
[
292.3658724790831,
94
],
[
296.3658724790831,
94
],
[
300.3658724790831,
96
],
[
304.3658724790831,
98
],
[
300.3658724790831,
100
],
[
296.3658724790831,
98
],
[
292.3658724790831,
98
],
[
290.3658724790831,
78
],
[
308.3658724790831,
80
],
[
211,
255
],
[
221,
262
],
[
226,
268
],
[
229,
272
],
[
232,
278
],
[
217,
279
],
[
223,
286
],
[
229,
288
],
[
232,
291
],
[
214,
281
],
[
221,
288
],
[
223,
291
],
[
229,
291
],
[
211,
281
],
[
217,
286
],
[
223,
288
],
[
223,
291
],
[
211,
281
],
[
214,
286
],
[
217,
288
],
[
221,
288
],
[
314,
257
],
[
308,
262
],
[
306,
266
],
[
303,
270
],
[
301,
276
],
[
312,
279
],
[
311,
284
],
[
308,
290
],
[
303,
292
],
[
313,
279
],
[
312,
284
],
[
311,
290
],
[
307,
292
],
[
314,
279
],
[
313,
284
],
[
312,
289
],
[
311,
293
],
[
317,
279
],
[
314,
283
],
[
313,
287
],
[
312,
290
]
]
}