IOPaint icon indicating copy to clipboard operation
IOPaint copied to clipboard

How to modify the configuration of a model(like using zits) when using command line?

Open darewolf-cyber opened this issue 1 year ago • 1 comments

Dear authors: Great project! I've already donated 5 dollars. I know how to modify the configuration of a model, like "crop" or "original" in the GUI window, but I don't know how to do this using a command line, this is especially important when my server can't use GUI. Also, I can use win_config.bat in my win10 computer to modify a setting called "image quality", which is by default 95. But I don't know how to set this by command line.

darewolf-cyber avatar Jul 03 '24 04:07 darewolf-cyber

You can create a 'config.json' file that can refer to this class for configuration https://github.com/Sanster/IOPaint/blob/ef1f7a532421ff40d74bc780662f14ae1ce1c477/iopaint/schema.py#L260

{"hd_strategy": "Resize", "hd_strategy_resize_limit": 300}

Use 'config.json' to perform batch processing:

iopaint run \
--model lama \
--image imgpath or imgdir \
--mask maskpath \
--config config.json \
--output ./tmp

Using the 'iopaint run' command, 'image quality' defaults to 100: https://github.com/Sanster/IOPaint/blob/ef1f7a532421ff40d74bc780662f14ae1ce1c477/iopaint/batch_processing.py#L118

Sanster avatar Jul 04 '24 01:07 Sanster

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 25 '24 02:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 10 '24 02:12 github-actions[bot]