Comments (1)
Here is what I did to make CLIP interrogation work on my M3 Mac:
- First, I encountered the same error as you, seeing "Half" in the error message. My assumption is that something in the Mac configuration causes the system to use fp16 instead of fp32. Although I don't fully understand what fp16 and fp32 mean, here is the Mac config that gets loaded by default in A1111:
stable-diffusion-webui/webui-macos-env.sh
Line 13 in 1c0a0c4
- I learned that using the
--no-half
flag prevents the system from using fp16. So, following the instruction in the Mac file, go to this file:stable-diffusion-webui/webui-user.sh
Line 13 in 1c0a0c4
- Uncomment this line and use these flags:
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --no-half"
This makes the interrogation work, and SD1.5 models generate images fine
However, on my 18GB M3 Mac, loading my favorite SDXL model causes the Python memory usage to increase from the usual 10GB to over 20GB, halting image generation. To use the SDXL model again, I have to remove the --no-half
flag.
From my understanding, the M3 Mac uses a shared memory strategy, allowing both regular RAM and VRAM to use the same 18GB of RAM. However, when total usage exceeds 18GB, the system starts writing data to disk and swapping data between disk and RAM. This process is expensive and, since the SDXL Python process exceeds the 18GB supported by my Mac, even if the request is received, the swapping makes image generation impossible to complete in a reasonable time.
It's likely that the A1111 developers can fix this issue easily by making the interrogation use --no-half
by default in the Mac environment, regardless of the flag. This change can be updated in this file:
stable-diffusion-webui/modules/interrogate.py
Line 122 in 1c0a0c4
from stable-diffusion-webui.
Related Issues (20)
- [Bug]: PuLID ControNet model VRAM Leak
- [Feature Request]: Auto Preview Images LoRa
- [Bug]: many bugs 1.9.3 (no module 'xformers'. Processing without...) HOT 5
- [Bug]: Unconstant gen speeds
- [Bug]: ImportError: cannot import name 'packaging' from 'pkg_resources' (/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py) HOT 24
- [Bug]: Stable.Art not works anymore since recent updates of A1111 HOT 2
- [Bug]: Stable Diffusion is now very slow and won't work at all HOT 8
- [Bug]: "A tensor with all NaN's was produced in Unet"
- [Bug]: ROCM 6.1 NameError: name 'amdsmi' is not defined crash at opening HOT 1
- [Bug]: Torch is not able to use GPU HOT 1
- [Bug]: Not working all HOT 2
- [Bug]: HOT 2
- [Bug]: Loras not working aymore HOT 1
- Update Linux Install Instructions HOT 3
- [Bug]: ONNX Runtime Fails to Load CUDA Provider HOT 2
- [Bug]: Cannot start stable diffusions HOT 3
- [Bug]: New update broke LoRA's on apple silicon HOT 1
- [Bug]: Checkpoint isnt working and the lora are empty HOT 1
- [Bug]: partially initialized module 'modules.sd_samplers_common' has no attribute 'SamplerData' (most likely due to a circular import) HOT 1
- [Bug]: cpu没有全部投入图生图
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-webui.