Closed dogarrowtype closed 1 year ago
Ah, yeah, right now this does sorta assume a CUDA device and XFormers support. This is mostly because of the attention code I carried over from the original repo; it needs a refactor to use Diffusers' new-ish AttentionProcessor
, which comes with a bunch of other fun improvements for both GPU and CPU use.
This should actually be fairly straightforward and is pretty much next on my todo list. In the short term I can make a few small tweaks to make CPU inference work - no promises about performance, though.
Will try to get to that in the next day or two; if you want to sorta hack around it yourself, change the dtype variables in src/animatediff/cli.py
's generate()
function to torch.float32
, comment out the torch.cuda.device_info
line that threw the error above, error and comment out the part of create_pipeline()
where it enables xformers; that should cover it.
CPU support should work now 😄 feel free to reopen this if not!
So, it does get all the way to starting to generate (thank you), but there's some kind of insane memory leak and it tries to use more than 68gb of ram when generating. So it doesn't actually work.
Doing
animatediff generate --device cpu
does not work. Generating with cuda does, and the program works fine otherwise, but cpu support does not appear to be functional.If you follow the error further down the line, it turns into an issue with fp16 not being possible on cpu. It might be extremely slow, but proper cpu support may be worth adding.