Comments (7)
Done - sorry - that's all I've tested it on, not sure about whether it impacts more broadly.
from generative-models.
Same issue here on MacBook Pro M2 Max in a REPL (using pyenv
and pyenv-virtualenv
):
>>> from diffusers import DiffusionPipeline
>>> import torch
>>> pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
Loading pipeline components...: 100%|█████████████| 7/7 [00:00<00:00, 7.90it/s]
>>> images = pipe(prompt="An astronaut riding a horse").images[0]
loc("varianceEps"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":228:0)): error: input types 'tensor<1x77x1xf16>' and 'tensor<1xf32>' are not broadcast compatible
LLVM ERROR: Failed to infer result type(s).
zsh: abort python
/Users/user/.pyenv/versions/3.11.4/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
After all of this is printed to the console, the REPL exits completely, and I am returned to the shell.
from generative-models.
@mbewley, could you please add to the title of this issue that the problem is with Stable Diffusion XL? I believe that this repository is for several generative models and not just SDXL.
from generative-models.
Can also confirm on MacBook Pro M2 Max running in a conda env. Changing torch_dtype=torch.float16
to torch_dtype=torch.float32
fixed the issue for me.
from generative-models.
This is remains a problem on M2 MacBooks with PyTorch@latest on MacOS Sonoma. Using the torch.float32
dtype (or the --no-half
CLI arg for AUTOMATIC1111 users) works, albeit at a glacial pace.
from generative-models.
if you're on Sonoma try
pip install -U torch torchvision torchdata torchaudio
Make sure the version of torch it installs is 2.1.
If you not on Sonoma there a load of fp16 fixes that need applying to torch
I've been running with fp16 has ages, and have a git repo showing how to get it working on a 8Gb M1
https://github.com/Vargol/8GB_M1_Diffusers_Scripts/tree/main/sdxl
@WildDanDan I'd look into other SD apps if I was you Auto1111 and Apple Silicon have never mixed that well
I use InvokeAI when not using my own Diffusers scripts but there are others.
from generative-models.
try the special pipeline:
pipe = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
works for me
from generative-models.
Related Issues (20)
- generated video from sd3d_p is more than 20M and cannot be played HOT 1
- The CKPT_PATH of the txt2img-clipl.yaml
- How to run this repo on cpu with autocast enabled?
- svd effect
- Code of Stable3 medium released ?? HOT 1
- How to merge the vae encoder weights in svd-xt to first_stage_model.encoder in sv3d_p.safetensors ?
- Connection Error
- Are there models trained in "x0" mode?
- About performance of SV3D
- LVD-152M
- "No operator found for `memory_efficient_attention_forward` with inputs" issue on Mac Pro M1
- To solve connection Error due to Lib Path Collision
- What is the definition of elevation in SV3D_p? HOT 1
- how to train sv3d HOT 1
- Question about VAE. Getting Help!!!
- 💡Stable Diffusion run on blockchain HOT 1
- ControlNet for SV3D
- NameError: name 'xformers' is not defined HOT 1
- How to run Stable Video 4D on Google Colab? HOT 2
- run SV4D on DAVIS dataset HOT 1
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 generative-models.