23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
--- 0.21.1:Canny
|
|
+++ 8010:Canny
|
|
@@ -3,9 +3,9 @@
|
|
def define_schema(cls):
|
|
return io.Schema(
|
|
node_id="Canny",
|
|
- display_name="Canny",
|
|
+ display_name="Detect Edges (Canny)",
|
|
search_aliases=["edge detection", "outline", "contour detection", "line art"],
|
|
- category="image/preprocessors",
|
|
+ category="image/filters",
|
|
essentials_category="Image Tools",
|
|
inputs=[
|
|
io.Image.Input("image"),
|
|
@@ -22,6 +22,6 @@
|
|
|
|
@classmethod
|
|
def execute(cls, image, low_threshold, high_threshold) -> io.NodeOutput:
|
|
- output = canny(image.to(device=comfy.model_management.get_torch_device(), dtype=torch.float32).movedim(-1, 1), low_threshold, high_threshold)
|
|
+ output = canny(image[..., :3].to(device=comfy.model_management.get_torch_device(), dtype=torch.float32).movedim(-1, 1), low_threshold, high_threshold)
|
|
img_out = output[1].to(device=comfy.model_management.intermediate_device(), dtype=comfy.model_management.intermediate_dtype()).repeat(1, 3, 1, 1).movedim(1, -1)
|
|
return io.NodeOutput(img_out)
|