ItchyFingaz commited on
Commit
c789cd8
·
1 Parent(s): c7b7455

Update custom_node_furniture_mask.py

Browse files
Files changed (1) hide show
  1. custom_node_furniture_mask.py +9 -4
custom_node_furniture_mask.py CHANGED
@@ -1,4 +1,5 @@
1
  # custom_node_furniture_mask.py by StyleSpace (and GPT4)
 
2
  import torch
3
  import torchvision.transforms as T
4
  from torchvision.models.segmentation import deeplabv3_resnet50
@@ -22,7 +23,13 @@ class FurnitureMaskNode:
22
  },
23
  }
24
 
25
- RETURN_TYPES = ("IMAGE", "MASK")
 
 
 
 
 
 
26
  FUNCTION = "detect_furniture"
27
 
28
  CATEGORY = "custom"
@@ -46,9 +53,7 @@ class FurnitureMaskNode:
46
  masked_image = input_image * mask.unsqueeze(-1).float()
47
 
48
  return masked_image, mask
49
-
50
- #yehesss
51
-
52
  NODE_CLASS_MAPPINGS = {
53
  "FurnitureMask": FurnitureMaskNode
54
  }
 
1
  # custom_node_furniture_mask.py by StyleSpace (and GPT4)
2
+
3
  import torch
4
  import torchvision.transforms as T
5
  from torchvision.models.segmentation import deeplabv3_resnet50
 
23
  },
24
  }
25
 
26
+ @classmethod
27
+ def RETURN_TYPES(cls):
28
+ return {
29
+ "image": ("IMAGE",),
30
+ "mask": ("MASK",),
31
+ }
32
+
33
  FUNCTION = "detect_furniture"
34
 
35
  CATEGORY = "custom"
 
53
  masked_image = input_image * mask.unsqueeze(-1).float()
54
 
55
  return masked_image, mask
56
+
 
 
57
  NODE_CLASS_MAPPINGS = {
58
  "FurnitureMask": FurnitureMaskNode
59
  }