johndpope / MegaPortrait-hack

Using Claude Opus to reverse engineer code from MegaPortraits: One-shot Megapixel Neural Head Avatars
https://arxiv.org/abs/2207.07621
68 stars 7 forks source link

Design for preprocessor at scale / distributed #38

Closed johndpope closed 1 month ago

johndpope commented 3 months ago

BACKGROUND so current thinking is - I'm GPU poor - there's community members who have a spare gpu around who want to help. Need to preprocess some videos - but it's very time consuming. We have 35,000 videos magnet:?xt=urn:btih:843b5adb0358124d388c4e9836654c246b988ff4&dn=CelebV-HQ&tr=https%3A%2F%2Facademictorrents.com%2Fannounce.php&tr=https%3A%2F%2Fipv6.academictorrents.com%2Fannounce.php

each one taking 1-5+ mins to process. This code is in the EmoDataset loaderr

it achieves

SOLUTION 1) make huggingface repo that contains just the npz files 2) setup organziation that people can join https://huggingface.co/organizations/covershot/share/jVGQxiItlPNKPUbwcSXfMEICDLJxLttyAB 3) allow users to upload /commit npz file to repo.

elihalpern commented 3 months ago

I'm willing to assist! Would love to see this implemented. I have a 3090 and a 4060 TI.

johndpope commented 3 months ago

looks like pillow doesn't have gpu support. https://github.com/python-pillow/Pillow/issues/1546

i got multicore to send work to multicpus / which does speed things up - but it never completes and gets to next line - something not right. https://github.com/johndpope/MegaPortrait-hack/tree/feat/38-multicore

Screenshot from 2024-06-07 17-04-51

https://github.com/johndpope/MegaPortrait-hack/blob/feat/38-multicore/EmoDataset.py#L251

save the date Screenshot from 2024-06-10 09-19-54