Skip to content

Output normalization#1717

Merged
joeyballentine merged 4 commits intochaiNNer-org:mainfrom
RunDevelopment:output-normalization
Apr 7, 2023
Merged

Output normalization#1717
joeyballentine merged 4 commits intochaiNNer-org:mainfrom
RunDevelopment:output-normalization

Conversation

@RunDevelopment
Copy link
Member

This adds the output normalization I recently mentioned on discord. The main change is that ImageInput no longer normalizes, ImageOutput does the normalization instead. This is more efficient because:

  1. A single output can be connected to multiple inputs. Previously, each input would normalize the image, resulting in duplicate work.
  2. We can tell the output that the returned image is already normalized (assume_normalized=True).

Only when an image output is not used is the new system less efficient. However, this case is relatively rare and can be made equally efficient with assume_normalized=True for already normalized images. Luckily, this trick can be used for Separate RGBA and Split Transparency.

@joeyballentine joeyballentine merged commit 24c2f89 into chaiNNer-org:main Apr 7, 2023
@RunDevelopment RunDevelopment deleted the output-normalization branch April 7, 2023 21:05
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