-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"RuntimeError: Attempting to deserialize object on a CUDA device" error in Automatic1111 v1.6, ControlNet v1.1.409 - Apple Silicon OSX #53
Comments
@raisindetre it seems a bug in webui, can you open a issue in https://github.com/Mikubill/sd-webui-controlnet |
This is because you can't use CPU preprocessing on a Mac computer. To fix this, you can open the file located at /stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/clipvision/init.py using a text editor or IDE (such as VSCode or PyCharm). 1、Navigate to line 81 and locate the line: clip_vision_h_uc = torch.load(clip_vision_h_uc)['uc']. |
On Apple Silicon, change |
Still doesn't work. |
Have you set "--no-half" in your start-up flags? Mine works with that set. |
|
I tried it today. It works! Thx ;) |
This line change "clip_vision_h_uc = torch.load(clip_vision_h_uc, map_location=torch.device('cpu'))['uc']." and "--no-half" fixed the problem for me on Mac Studio M2 Ultra. All ip-adapters functional! Thanks! |
setting --no-half and that line change does fix the issue, HOWEVER performance when setting --no-half drops about 25% (1:50 -> 2:26 for same image), comparing same image with flag set and not set control net not enabled. |
Using the SD1.5 IP-Adaptor models in v1.6.0 Automatic1111 environment (python: 3.10.13, torch: 2.0.1 ) with latest ControlNet on Apple ARM architecture generates a random image and produces console runtime error below. COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate".
The text was updated successfully, but these errors were encountered: