Vaida12345/waifuExtension

Allow option to store intermediate files in memory

sclsj opened this issue · 8 comments

sclsj commented

A video that takes around 1 hour in waifu2x MAS to upsample (720p→1440p) is estimated to take 6-10 hours in waifuExtension. I guess one reason is that temp files are written to disk and read when needed. I have m1 max with 64 GB RAM, and the program say that it will need around 30 GB of disk space, so theoretically waifuExtension can just put all temp files in RAM and I suppose that will increase the speed. Is this practical to implement as an option?

Hmmm it is much slower than the versions before. I will try to have it fixed. Thanks for informing me.

btw, which model are you using? I simply used the executable files for models except for Waifu2x, these models uses gpu instead of ANE to calculate, which is why they are terribly slow.

Now I re-enabled DispatchQueue.concurrentPerform for waifu2x Models, it now runs as expected. Most of the time was spent by ML to enlarge the images instead of writing the images to disk. And I need to point out that sometimes images need to be written to disk and reload to prevent breaking the images (see here)

The new version will be released after figuring out why your other issue occurs.

sclsj commented

I'm using waifu2x.

Ok, this has now been fixed. Please provide me with information concerning the other issue found by you.

sclsj commented

Eh... For a 720p 10 minute video, this program used 100 GB of disk space. I will need to use this program frequently, so I'm a bit worried about SSD lifespan. Is there really no way to do everything in memory?

sclsj commented

截屏2022-03-28 12 44 11

It is possible if you use only waifu2x and do not interpolate frames. I will work on that later this week, there is one more version waiting to be done.