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

add avif parsing function #3565

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

audioscavenger
Copy link

add avif parsing function. added as much comments as I could. more details here

add avif parsing function. added as much comments as I could.
add avif support to app.js
@comfyanonymous
Copy link
Owner

do you have a test file for this or a way to create one?

- getWebpMetadata: if (data[key]) {} because it can be undefined sometimes because of rebuild tags files by exiftool
- getAvifMetadata: complete overhall + validated test fir rebuild files with exiftool
@audioscavenger
Copy link
Author

You are right, sorry I should have included a test rig.

  • Attached is a basic json and output files, and also the *-2AVIF *-2WEBP files converted from png with imagick + exiftool.
  • I have made the getAvifMetadata and getWebpMetadata more resilient to errors by adding a simple test if the data[key] is undifined.
  • I have left the comments and removed all the debug console.log
    AVIF-validation.zip
    If you don't want the outputs, here is just the json for testing:
    AVIF-validation.json

I have also completely updated the post that explains all this at avif parsing explanations

All seems to work perfectly, i tested different workflows with various prompt sises, and converted lots of png to avif and webp, all load perfectly!

@audioscavenger
Copy link
Author

hi, I see that the number of PR is piling up... sorry that I cannot help you more. Is there anyone that can back you up for testing PR's?
I still use this code myself and haven't found a bug since I submitted the last update.
Please let me know if you need more details on how it reads the AVIF. I basically implemented what you did with Webp, but with different chunk sizes and dynamic position detections, based off a meticulous ascii analysis of different AVIF files + the RFC I could find.

@mcmonkey4eva
Copy link
Collaborator

We're gonna be working to improve PR handling here very soon

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

3 participants