MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / blur_internal

Function blur_internal

guide.py:9–17  ·  view source on GitHub ↗
(image, blur_radius)

Source from the content-addressed store, hash-verified

7
8
9def blur_internal(image, blur_radius):
10 if blur_radius > 0:
11 # https://docs.opencv.org/2.4/modules/imgproc/doc/filtering.html#getgaussiankernel
12 # sigma = 0.3 * blur_radius + 0.5 is what is recommended in the OpenCV doc for the
13 # relationship between sigma and kernel size 2*blur_radius + 1, however we want somewhat weaker
14 # blurring, so we use 0.3 * blur_radius instead, reducing the sigma value by 0.5
15 sigma = 0.3 * blur_radius
16 image = post_processing.Blur.execute(image, blur_radius, sigma)[0]
17 return image
18
19
20@comfy_node(name="LTXVAddGuideAdvanced")

Callers 4

sampleMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected