"INSTALL/git@developer.sourcefind.cn:dadigang/Ventoy.git" did not exist on "0961ce56247ba25d7fc32f0784f73c095bf0a90a"
Commit 4ee9aad6 authored by comfyanonymous's avatar comfyanonymous
Browse files

Speed up Sharpen node.

parent 644a3ae5
......@@ -227,6 +227,7 @@ class Sharpen:
return (image,)
batch_size, height, width, channels = image.shape
image = image.to(comfy.model_management.get_torch_device())
kernel_size = sharpen_radius * 2 + 1
kernel = gaussian_kernel(kernel_size, sigma, device=image.device) * -(alpha*10)
......@@ -241,7 +242,7 @@ class Sharpen:
result = torch.clamp(sharpened, 0, 1)
return (result,)
return (result.to(comfy.model_management.intermediate_device()),)
class ImageScaleToTotalPixels:
upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment