IOPaint icon indicating copy to clipboard operation
IOPaint copied to clipboard

Web UI has Network timeout issue on macOS M1

Open thatjimupnorth opened this issue 3 years ago • 3 comments

I got everything up and running with the help of other threads with this:

docker run -p 8080:8080
-v /Users/jim/.cache/torch
-v /Users/jim/.cache/huggingface
--rm cwq1913/lama-cleaner:cpu-0.26.1 \

lama-cleaner --device=cpu --port=8080 --host=127.0.0.1 --model=sd1.5 --sd-disable-nsfw --sd-run-local

After starting Lama-cleaner the Web UI opens at the local address and starts to diffuse, but after about 30 seconds there's an Network has stopped responding error in the Web UI, even though the Terminal powershell shows the SD is still running.

1 - How do I fix this? 2 - Where is the image output directory?

Screenshot 2022-12-15 at 12 31 41

EDIT: It did exactly the same thing when installing with pip. I tried Docker without being fully familiar with how it works - which possibly answers my own question, as it does give a warning during install that the CPU didn't match what was expected, and in the Docker app it shows AMD64 instead of ARM64 (Apple M1).

thatjimupnorth avatar Dec 15 '22 12:12 thatjimupnorth

SD model runs really slow on CPU devices, I suggest using --device mps.

  1. Install the latest lama-cleaner via pip: pip install lama-cleaner==0.30.0
  2. Make sure to follow the requirements from diffusers image
  3. start lama-cleaner with --device mps

In theory, Lama Cleaner's code is device agnostic, but I don't have an M1 device to test it on, so if you encounter any problems, feel free to post it here

Sanster avatar Dec 15 '22 13:12 Sanster

pip install lama-cleaner==0.30.0

Screenshot 2022-12-15 at 14 57 27

The Web UI loads and operates normally - but then...

Screenshot 2022-12-15 at 14 59 53

But the process is still running in the command line:

Screenshot 2022-12-15 at 15 07 19

So, presumably, somewhere on my computer there's an image of a Lego man sitting in a sports car, despite that the Web UI encountered a problem, but I have no idea where the Output directory is.

thatjimupnorth avatar Dec 15 '22 15:12 thatjimupnorth

image

pytorch's package name is torch :smile: pip install torch==1.13.0

This is no output directory in lama-cleaner...If the model run successful, you can click download button on the bottom

image

Sanster avatar Dec 15 '22 23:12 Sanster

Combine with cropper feature, sd1.5 run on M2 chip 1.5it/s (512x512) image size

Sanster avatar Apr 02 '23 08:04 Sanster