VoxelCubes / PanelCleaner

An AI-powered tool to clean manga panels.
GNU General Public License v3.0
202 stars 16 forks source link

Permission denied when i try to use models, also cuda don't work #60

Closed slaeves2 closed 6 months ago

slaeves2 commented 6 months ago

Tried to add all rights to users, also tried to launch by administrator. image Also i can't use my cuda, i have 40x rtx card. Downloaded cuda toolkit and pytorch. image Models image

slaeves2 commented 6 months ago

image i think i fixed 50/50 first problem, but i get another error when trying to use another detector(not comictextdetector.pt) also if i choose folder with models i get first error

VoxelCubes commented 6 months ago

Hello, the feature to link to a specific model is supposed to enable you to load a newer version of comictextdetector if pcleaner ever goes out of date in that regard. I don't support arbitrary models. Specifically, this means you need to link directly to the comictextdetector.pt for cuda or ...detector.pt.onnx for cpu. A folder above that won't work, this feature isn't robust. Also, as of writing, pcleaner automatically loads version 0.3, so it's pointless to use the external model path unless you have a newer version sometime in the future. Maybe I should be more explicit about that in the settings panel, sorry for any confusion.

As for cuda support: you will need to run from source or, having set up a source version, can build your own CUDA enabled exe. Warning: the cuda libraries will add 4GB to the exe, which will make startup very slow if you do make a single exe out of it. Details here: faq

In short, you can't use the exe I provide to have cuda. You need to install pcleaner in the python environment where you set up pytorch. Just pip install pcleaner. Then run pcleaner with pcleaner-gui. You will know it worked when it says "CUDA Enabled" in the bottom right corner, next to the "open config" button. See the first screenshot of the main page here for reference.

Note, the concurrent models option may give you some issues on Windows, try setting that to 1 if you have problems.

slaeves2 commented 6 months ago

First of all I wanted to thank you for your reply. Yes i created own built pc cleaner for cuda, but continued to mistakenly use the .exe thinking that since the folder is called cuda, it will work.

VoxelCubes commented 6 months ago

Awesome, glad to hear that worked out.