Skip to content

Commit

Permalink
Optimize resize (#2390)
Browse files Browse the repository at this point in the history
Optimized resize
  • Loading branch information
RunDevelopment authored Dec 9, 2023
1 parent 86ede7c commit 0b83d65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions backend/src/nodes/impl/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def resize(
# no resize needed
return img.copy()

if filter == ResizeFilter.NEAREST:
# we don't need premultiplied alpha for NN
separate_alpha = True

native_filter = _FILTER_MAP[filter]

if not separate_alpha and c == 4:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/packages/chaiNNer_standard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
Dependency(
display_name="ChaiNNer Extensions",
pypi_name="chainner_ext",
version="0.3.7",
version="0.3.8",
size_estimate=2.0 * MB,
),
],
Expand Down

0 comments on commit 0b83d65

Please sign in to comment.