tidy: correct attributions for controlnet processors

This commit is contained in:
psychedelicious 2024-03-21 21:15:25 +11:00 committed by Kent Keirsey
parent c36d12a50f
commit e2d7b514e0
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ def get_canny_edges(
) -> Image.Image:
"""Returns the edges of an image using the Canny edge detection algorithm.
This function is adapted from https://github.com/lllyasviel/ControlNet.
Adapted from https://github.com/huggingface/controlnet_aux (Apache-2.0 license).
Args:
image: The input image.

View File

@ -1,4 +1,4 @@
"""Adapted from https://github.com/lllyasviel/ControlNet (Apache-2.0 license)."""
"""Adapted from https://github.com/huggingface/controlnet_aux (Apache-2.0 license)."""
import cv2
import numpy as np

View File

@ -100,7 +100,7 @@ def normalize_image_channel_count(image: np.ndarray) -> np.ndarray:
If the image has 1 channel, a third empty channel will be added.
If the image has 4 channels, the alpha channel will be used to blend the image with a white background.
This function is adapted from https://github.com/lllyasviel/ControlNet.
Adapted from https://github.com/huggingface/controlnet_aux (Apache-2.0 license).
Args:
image: The input image.
@ -131,7 +131,7 @@ def normalize_image_channel_count(image: np.ndarray) -> np.ndarray:
def fit_image_to_resolution(input_image: np.ndarray, resolution: int) -> np.ndarray:
"""Resizes an image, fitting it to the given resolution.
This function is adapted from https://github.com/lllyasviel/ControlNet.
Adapted from https://github.com/huggingface/controlnet_aux (Apache-2.0 license).
Args:
input_image: The input image.
@ -190,7 +190,7 @@ def safe_step(x: np.ndarray, step: int = 2) -> np.ndarray:
I don't fully understand the purpose of this function, but it appears to be normalizing/quantizing the array.
This function is adapted from https://github.com/lllyasviel/ControlNet.
Adapted from https://github.com/huggingface/controlnet_aux (Apache-2.0 license).
Args:
x: The input array.