Free AI generative fill - IOPaint (Lama Cleaner) - Install guide

Dex-chan lover
Joined
Nov 24, 2019
Messages
1,949
Made this in the /a/ scanlation thread, but figured I could post it here as well, since it's a somewhat cumbersome program to install, at least if you're as tech illiterate as me.

I can make an easy guide. This is for windows, but should probably be relatively similar for other OS.
First you need to install miniconda. That's easy enough.
https://www.anaconda.com/docs/getting-started/miniconda/main
Don't download anaconda, just use miniconda, anaconda is just bloatware. You can skip the registration.
After installing miniconda, run it. You'll enter an own version of the terminal with miniconda. Then use this command
conda create -n iopaint python=3.12 -y
Then you've created an own environment for iopaint that won't interfere with your other python programs with python 3.12. Then run
conda activate iopaint
To activate the environment. You need to do this when using the program.

You might need to activate paths for python for scripts, I'm not entirely certain if it's necessary when you use miniconda. But for windows it's going to start menu - settings - system - about - advanced system settings - environment variables - path (edit) - (new) C:\Users\(User name)\AppData\Local\Programs\Python\Python312\Scripts
Of course add your own username instead of (User name) or another path if you installed Python elsewhere.

I checked and this doesn't seem to be necessary with miniconda.

Then install iopaint with
pip3 install iopaint

Then to use it, write
conda activate iopaint
to activate iopaint environment, then
iopaint start --model=lama --device=cpu --port=8080
to run iopaint (might want to change model and device after what you want to do, pytorch and torchvision should be automatically installed so you might want to switch to cuda), and then open
in your browser like chrome or firefox.
The manga module is inferior to Lama, don't use it.

You can use
conda env list
to list your conda environments if you forget their names, and you can use
conda env remove --name <environment-name>
Where <environment-name> in this case would've been iopaint if you wanted to remove it, like if you'd want to reinstall it or something.
You can also deactivate your current environment with
conda deactivate
if you have something else you want to work with.

Edit: Also even if IOPaint seems to download pytorch and torchvision, it doesn't seem to work using cuda instead of cpu. So most likely you need to install them in advance. Doesn't matter much for lama, but if you want to use other modules like stable diffusion, it'll be way too slow with only cpu.
 
Last edited:

Users who are viewing this thread

Top