Skip to content

Commit

Permalink
Fixed upscaling with transparency (#2457)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Jan 12, 2024
1 parent 3e00f94 commit acd6b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/nodes/impl/upscale/convenient_upscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def denoise_and_flatten_alpha(img: np.ndarray) -> np.ndarray:
alpha_max = np.max(img, axis=2)
alpha_mean = np.mean(img, axis=2)
alpha = alpha_max * alpha_mean + alpha_min * (1 - alpha_mean)
return alpha
return alpha.clip(0, 1)


def convenient_upscale(
Expand Down

0 comments on commit acd6b17

Please sign in to comment.