2020import torch
2121import torch .nn .functional as NNF
2222from torchvision import transforms
23+ import torchvision .transforms .functional as f
2324
2425import base64
2526import sys
2627from comfy .comfy_types .node_typing import IO
2728
2829from .modulation import process_modulation , process_modulation_ProcessPool
2930
30- # tensor [b,c,h,w]
31- # pil [h,w,c]
32- # np [h,w,c]
33- # comfy image [b,h,w,c]
31+
32+ # tensor [B,C,H,W]
33+ # pil [H,W,C]
34+ # np [H,W,C]
35+ # comfyui image [B,H,W,C]
3436
3537
3638def pil2tensor_mask (pil ):
@@ -97,7 +99,7 @@ def list_to_batch(tensor_list):
9799 return torch .cat (tensor_list )
98100
99101
100- def tensorlist_to_batch (tensors ):
102+ def tensor_list_to_batch (tensors ):
101103 return torch .stack (tensors , dim = 0 )
102104
103105
@@ -1102,8 +1104,7 @@ def INPUT_TYPES(cls):
11021104 "albedo" : (IO .IMAGE ,),
11031105 "normal" : (IO .IMAGE ,),
11041106 "smoothness" : (IO .IMAGE ,),
1105- },
1106- "optional" : {},
1107+ }
11071108 }
11081109
11091110 FUNCTION = "node_function"
@@ -1145,6 +1146,7 @@ def node_function(self, albedo, normal, smoothness):
11451146 detail_map = pil_to_tensor (detail_map_pil )
11461147 detail_maps .append (detail_map )
11471148 detail_maps = torch .stack (detail_maps , dim = 0 )
1149+
11481150 return (detail_maps ,)
11491151
11501152
@@ -1171,6 +1173,7 @@ def node_function(self, roughness):
11711173
11721174
11731175class PureColorImageNode :
1176+
11741177 def __init__ (self ):
11751178 pass
11761179
0 commit comments