Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Faster blur.

comfyanonymous133dc3351b32
diff --git a/comfy_extras/nodes_post_processing.py b/comfy_extras/nodes_post_processing.py
index 0110b472f..f0e83fc69 100644
--- a/comfy_extras/nodes_post_processing.py
+++ b/comfy_extras/nodes_post_processing.py
@@ -5,6 +5,7 @@ from PIL import Image
import math
import comfy.utils
+import comfy.model_management
class Blend:
@@ -102,6 +103,7 @@ class Blur:
if blur_radius == 0:
return (image,)
+ image = image.to(comfy.model_management.get_torch_device())
batch_size, height, width, channels = image.shape
kernel_size = blur_radius * 2 + 1
@@ -112,7 +114,7 @@ class Blur:
blurred = F.conv2d(padded_image, kernel, padding=kernel_size // 2, groups=channels)[:,:,blur_radius:-blur_radius, blur_radius:-blur_radius]
blurred = blurred.permute(0, 2, 3, 1)
- return (blurred,)
+ return (blurred.to(comfy.model_management.intermediate_device()),)
class Quantize:
def __init__(self):