Commit
·
04bbed4
1
Parent(s):
3597deb
Update custom_node_furniture_mask.py
Browse files
custom_node_furniture_mask.py
CHANGED
|
@@ -1,4 +1,14 @@
|
|
| 1 |
-
# custom_node_furniture_mask.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import torch
|
| 3 |
import numpy as np
|
| 4 |
from PIL import Image
|
|
@@ -10,10 +20,8 @@ class FurnitureMask:
|
|
| 10 |
self.segmentation_model = deeplabv3_resnet50(pretrained=True, progress=False, num_classes=150).eval()
|
| 11 |
|
| 12 |
@classmethod
|
| 13 |
-
def INPUT_TYPES(
|
| 14 |
-
return {
|
| 15 |
-
"required": {
|
| 16 |
-
"image": ("IMAGE",),
|
| 17 |
},
|
| 18 |
}
|
| 19 |
|
|
|
|
| 1 |
+
# custom_node_furniture_mask.py by StyleSpace and GPT4
|
| 2 |
+
|
| 3 |
+
import os
|
| 4 |
+
import sys
|
| 5 |
+
|
| 6 |
+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy"))
|
| 7 |
+
import comfy.samplers
|
| 8 |
+
import comfy.sd
|
| 9 |
+
import comfy.utils
|
| 10 |
+
import model_management
|
| 11 |
+
|
| 12 |
import torch
|
| 13 |
import numpy as np
|
| 14 |
from PIL import Image
|
|
|
|
| 20 |
self.segmentation_model = deeplabv3_resnet50(pretrained=True, progress=False, num_classes=150).eval()
|
| 21 |
|
| 22 |
@classmethod
|
| 23 |
+
def INPUT_TYPES(s):
|
| 24 |
+
return {"required": { "image": ("IMAGE", ),
|
|
|
|
|
|
|
| 25 |
},
|
| 26 |
}
|
| 27 |
|