Closed x0rtrunks closed 1 month ago
The command needs to be escaped in windows. Should probably be mentioned in the examples.
rembg i -m u2net_custom -x "{\"model_path\": \"C:/Users/user/.u2net/yolov8x-seg.onnx\"}" "D:\test\2024-04-26-1716-K13.png" "c:\spider\yolo\rembgtest.png"
Describe the bug Is it actually possible to use custom models on windows? I'm unable to execute the command line to use a custom model without an error message of some kind.
Custom model example
rembg i -m u2net_custom -x '{"model_path": "~/.u2net/u2net.onnx"}' path/to/input.png path/to/output.png
To Reproduce Steps to reproduce the behavior:
My example command: rembg i -m u2net_custom -x '{"model_path": "~/.u2netyolov8x-seg.onnx"}' "D:\Test\2024-04-26-1716-K13.png" "c:\test\rembgtest.png"
No matter what I try for the model_path I get this: Error: Invalid value for 'INPUT': 'C:\Users\user.u2net\yolov8x-seg.onnx}'': No such file or directory
Even if I use a full absolute path to the model file. And the file it says does not exist, does actually exist.
It looks like it's picking up the space between "model_path" and the actual path as the input variable rather than the path. I've tried all sorts of ways to enclose that part of the command but it doesn't work.
OS Version: win10
Rembg version: v2.0.56