Skip to content

Optimize Clamp node#2785

Merged
joeyballentine merged 1 commit intochaiNNer-org:mainfrom
RunDevelopment:optimize-clamp
Apr 11, 2024
Merged

Optimize Clamp node#2785
joeyballentine merged 1 commit intochaiNNer-org:mainfrom
RunDevelopment:optimize-clamp

Conversation

@RunDevelopment
Copy link
Member

Since the minimum and maximum and numbers 0-1, we know that the output image is always a normalized image. So the ImageOutput doesn't need to normalize again.

While this is a pretty minor optimization, since the node just does an np.clip, the node is now technically 2x faster.

@joeyballentine joeyballentine merged commit 3fa2d28 into chaiNNer-org:main Apr 11, 2024
@RunDevelopment RunDevelopment deleted the optimize-clamp branch April 11, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants