diff --git a/None b/None new file mode 100644 index 0000000..b06ffb5 --- /dev/null +++ b/None @@ -0,0 +1 @@ +{"height": 1600, "width": 512, "keypoints": [[246.62915205022568, 269.60325614215964], [253.44882580389572, 441.06933909157897], [130.87622018158436, 441.06933909157897], [85.6552588840326, 660.0339937955141], [73.75500591099262, 855.1981425533693], [376.0214314262071, 441.06933909157897], [418.8623421291509, 669.5541961739459], [430.76259510219097, 857.5781931479771], [176.0971814791361, 814.7372824450335], [187.9974344521761, 1152.7044668793678], [195.13758623600006, 1459.7309935837984], [333.1805207232634, 812.3572318504253], [321.2802677502235, 1152.7044668793678], [316.5201665610075, 1464.491094773014], [220.44859550953777, 248.18280079068774], [272.8097085909135, 250.5628513852958], [191.8879883742419, 279.12345852059167], [308.51046751003344, 279.12345852059167], [190.37748504678405, 222.10468438764406], [190.37748504678405, 236.384987955292], [192.7575356413921, 253.045342117548], [197.517636830608, 267.3256456851959], [199.89768742521608, 279.2258986582358], [209.417889803648, 293.5062022258837], [218.9380921820799, 303.02640460431576], [230.8383451551199, 307.78650579353166], [245.11864872276783, 310.1665563881397], [261.7790028850237, 307.78650579353166], [273.6792558580637, 300.6463540097077], [285.5795088311037, 291.1261516312759], [292.71966061492753, 279.2258986582358], [297.47976180414366, 267.3256456851959], [299.8598123987516, 253.045342117548], [302.23986299335957, 238.76503854990005], [304.6199135879675, 224.48473498225212], [199.89768742521608, 205.44433022538828], [207.03783920904004, 198.30417844156432], [216.55804158747196, 198.30417844156432], [226.07824396590388, 200.68422903617216], [233.21839574972785, 200.68422903617216], [259.39895229041576, 200.68422903617216], [266.53910407423973, 200.68422903617216], [276.05930645267176, 198.30417844156432], [285.5795088311037, 200.68422903617216], [292.71966061492753, 205.44433022538828], [245.11864872276783, 212.58448200921225], [245.11864872276783, 219.72463379303622], [245.11864872276783, 226.86478557686019], [242.73859812815988, 234.00493736068415], [233.21839574972785, 245.90519033372402], [237.97849693894386, 245.90519033372402], [245.11864872276783, 245.90519033372402], [249.87874991198385, 245.90519033372402], [257.0189016958078, 245.90519033372402], [209.417889803648, 214.9645326038201], [216.55804158747196, 210.2044314146042], [223.69819337129593, 210.2044314146042], [230.8383451551199, 214.9645326038201], [223.69819337129593, 217.34458319842815], [216.55804158747196, 217.34458319842815], [261.7790028850237, 214.9645326038201], [268.9191546688477, 212.58448200921225], [276.05930645267176, 212.58448200921225], [285.5795088311037, 214.9645326038201], [276.05930645267176, 217.34458319842815], [268.9191546688477, 217.34458319842815], [226.07824396590388, 267.3256456851959], [230.8383451551199, 262.56554449598], [240.3585475335518, 257.8054433067639], [245.11864872276783, 257.8054433067639], [249.87874991198385, 257.8054433067639], [259.39895229041576, 260.18549390137196], [266.53910407423973, 267.3256456851959], [259.39895229041576, 274.4657974690199], [254.63885110119986, 276.84584806362795], [245.11864872276783, 276.84584806362795], [237.97849693894386, 276.84584806362795], [230.8383451551199, 274.4657974690199], [226.07824396590388, 267.3256456851959], [235.5984463443359, 264.94559509058786], [245.11864872276783, 262.56554449598], [254.63885110119986, 262.56554449598], [264.1590534796318, 267.3256456851959], [254.63885110119986, 272.0857468744118], [245.11864872276783, 272.0857468744118], [235.5984463443359, 269.705696279804], [218.9380921820799, 210.2044314146042], [271.29920526345563, 212.58448200921225], [430.76259510219097, 876.6185979048412], [423.622443318367, 895.659002661705], [414.1022409399352, 914.6994074185689], [411.7221903453269, 936.1198627700408], [409.34213975071907, 955.1602675269048], [433.1426456967988, 931.3597615808249], [428.38254450758313, 950.4001663376887], [418.8623421291509, 964.6804699053366], [411.7221903453269, 974.2006722837687], [435.5226962914071, 931.3597615808249], [430.76259510219097, 952.7802169322968], [418.8623421291509, 964.6804699053366], [411.7221903453269, 971.8206216891606], [435.5226962914071, 931.3597615808249], [430.76259510219097, 950.4001663376887], [423.622443318367, 959.9203687161207], [416.48229153454304, 969.4405710945528], [435.5226962914071, 928.9797109862168], [433.1426456967988, 945.6400651484728], [426.00249391297507, 955.1602675269048], [421.24239272375894, 959.9203687161207], [73.75500591099262, 874.2385473102331], [83.27520828942454, 895.659002661705], [95.17546126246452, 917.0794580131769], [97.55551185707247, 936.1198627700408], [99.93556245168054, 952.7802169322968], [73.75500591099262, 936.1198627700408], [76.13505650560069, 955.1602675269048], [85.6552588840326, 969.4405710945528], [92.79541066785657, 978.9607734729846], [66.61485412716866, 936.1198627700408], [73.75500591099262, 957.5403181215127], [83.27520828942454, 967.0605204999447], [92.79541066785657, 976.5807228783767], [64.23480353256059, 933.7398121754329], [73.75500591099262, 952.7802169322968], [80.89515769481659, 962.3004193107288], [90.41536007324851, 971.8206216891606], [64.23480353256059, 931.3597615808249], [73.75500591099262, 945.6400651484728], [80.89515769481659, 955.1602675269048], [85.6552588840326, 959.9203687161207]]} \ No newline at end of file diff --git a/__init__.py b/__init__.py index fd7299f..c5ecf32 100644 --- a/__init__.py +++ b/__init__.py @@ -2377,7 +2377,41 @@ class HistogramEqualization: return (blended_image_tensor,) +class TRI3DCompositeImageSplitter: + """ + This node splits composite (horizontally concatenated) image into half. + """ + def __init__(self): + pass + + @classmethod + def INPUT_TYPES(cls): + """ + Input Types + """ + return { + "required": { + "image": ("IMAGE",) + }, + } + RETURN_TYPES = ("IMAGE","IMAGE") + RETURN_NAMES = ("image1","image2") + FUNCTION = "main" + + CATEGORY = "TRI3D" + + def main(self, image): + image = from_torch_image(image) + h,w,_ = image.shape + image1 = image[:,:w//2,:] + image2 = image[:,w//2:,:] + + image1 = torch.from_numpy(image1.astype(np.float32)/255.0)[None,] + image2 = torch.from_numpy(image2.astype(np.float32)/255.0)[None,] + + return (image1, image2) + # A dictionary that contains all nodes you want to export with their names # NOTE: names should be globally unique NODE_CLASS_MAPPINGS = { @@ -2403,6 +2437,7 @@ NODE_CLASS_MAPPINGS = { "tri3d-clipdrop-bgremove-api": TRI3D_clipdrop_bgremove_api, "tri3d-adjust-neck": TRI3DAdjustNeck, "tri3d-HistogramEqualization": HistogramEqualization, + "tri3d-composite-image-splitter": TRI3DCompositeImageSplitter } VERSION = "2.7.0" @@ -2432,4 +2467,5 @@ NODE_DISPLAY_NAME_MAPPINGS = { "tri3d-clipdrop-bgremove-api": "RemBG ClipDrop" + " v" + VERSION, "tri3d-adjust-neck": "Adjust Neck" + " v" + VERSION, "tri3d-HistogramEqualization": "Adjust Neck" + " v" + VERSION, + "tri3d-composite-image-splitter": "Composite Image Splitter" + " v" + VERSION }