ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

add avif parsing function

Open audioscavenger opened this issue 1 year ago • 5 comments

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

audioscavenger avatar May 24 '24 22:05 audioscavenger

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

comfyanonymous avatar May 25 '24 03:05 comfyanonymous

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 avatar May 27 '24 15:05 audioscavenger

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.

audioscavenger avatar Jun 18 '24 05:06 audioscavenger

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

mcmonkey4eva avatar Jun 18 '24 05:06 mcmonkey4eva

Could you please rebuild the PR? It has a merge conflict caused by the recent addition of audio file support.

mcmonkey4eva avatar Jun 28 '24 23:06 mcmonkey4eva

frontend is replaced by https://github.com/Comfy-Org/ComfyUI_frontend now

mcmonkey4eva avatar Sep 16 '24 03:09 mcmonkey4eva