Skip to content

Commit

Permalink
use cubic is safer
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Apr 18, 2023
1 parent 7e5c153 commit a682fc5
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 a682fc5

Please sign in to comment.