Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#899 from Mikubill/lvmin
Browse files Browse the repository at this point in the history
use cubic is safer
  • Loading branch information
lllyasviel authored Apr 18, 2023
2 parents e1c5efe + a682fc5 commit 7d28d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def get_pytorch_control(x):
def high_quality_resize(x, size):
old_size = x.shape[0] * x.shape[1]
new_size = size[0] * size[1]
return cv2.resize(x, size, interpolation=cv2.INTER_LANCZOS4 if new_size > old_size else cv2.INTER_AREA)
return cv2.resize(x, size, interpolation=cv2.INTER_CUBIC if new_size > old_size else cv2.INTER_AREA)

if resize_mode == external_code.ResizeMode.RESIZE:
detected_map = cv2.resize(detected_map, (w, h), interpolation=cv2.INTER_CUBIC)
Expand Down

0 comments on commit 7d28d00

Please sign in to comment.