Creates a batch of images from multiple individual images or batches.
| 1092 | return (image[mean >= 0.5],) |
| 1093 | |
| 1094 | class MakeImageBatch: |
| 1095 | """ |
| 1096 | Creates a batch of images from multiple individual images or batches. |
| 1097 | """ |
| 1098 | def __init__(self): |
| 1099 | pass |
| 1100 | |
| 1101 | @classmethod |
| 1102 | def INPUT_TYPES(cls): |
| 1103 | return { |
| 1104 | "required": { |
| 1105 | "image1": ("IMAGE",), |
| 1106 | }, |
| 1107 | "optional": { |
| 1108 | "image2": ("IMAGE",), |
| 1109 | "image3": ("IMAGE",), |
| 1110 | "image4": ("IMAGE",), |
| 1111 | "image5": ("IMAGE",), |
| 1112 | "image6": ("IMAGE",), |
| 1113 | }, |
| 1114 | } |
| 1115 | |
| 1116 | RETURN_TYPES = ("IMAGE",) |
| 1117 | FUNCTION = "append" |
| 1118 | |
| 1119 | CATEGORY = "Masquerade Nodes" |
| 1120 | |
| 1121 | def append(self, image1, image2 = None, image3 = None, image4 = None, image5 = None, image6 = None): |
| 1122 | result = image1 |
| 1123 | if image2 is not None: |
| 1124 | result = torch.cat((result, image2), 0) |
| 1125 | if image3 is not None: |
| 1126 | result = torch.cat((result, image3), 0) |
| 1127 | if image4 is not None: |
| 1128 | result = torch.cat((result, image4), 0) |
| 1129 | if image5 is not None: |
| 1130 | result = torch.cat((result, image5), 0) |
| 1131 | if image6 is not None: |
| 1132 | result = torch.cat((result, image6), 0) |
| 1133 | return (result,) |
| 1134 | |
| 1135 | class CreateQRCodeNode: |
| 1136 | def __init__(self): |
nothing calls this directly
no outgoing calls
no test coverage detected