Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output normalization #1717

Merged

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.

None yet

2 participants