How to Fix Common Warnings When Installing Stable Diffusion on Your Mac

  Рет қаралды 9,317

Laura Carnevali

Laura Carnevali

Жыл бұрын

In this video, you will learn how to fix warnings that may arise when initializing Stable Diffusion on a Mac locally. Using the WARP terminal, you will be guided through the steps needed to troubleshoot and resolve these warnings, which can cause issues when generating images.
Warnings:
(1) Torch not compiled with CUDA enabled, memory monitor disabled
(2) No module 'xformers'. Proceeding without it
(3) You are running torch 1.12.1. The program is tested to work with torch 1.13.1
(4) Failed to load image Python extension
📣📣📣I have just opened a Discord page to discuss SD and AI Art - common issues and news - join using the link: / discord
🤙🏻 Follow me on Medium to get my Newsletter:
- Get UNLIMITED access to all articles: / membership
- Laura: / lauracarnevali
- Intelligent Art: / intelligent
📰Article:
/ how-to-fix-common-warn...
📌 Links:
Warp: app.warp.dev/referral/2EYMJL
Pytorch: pytorch.org
00:18 Warp Terminal
03:35 Warning (1) Torch not compiled with CUDA enabled, memory monitor disabled
05:45 Warning (2) No module 'xformers'. Proceeding without it
06:49 Warning (3) You are running torch 1.12.1. The program is tested to work with torch 1.13.1
09:21 Warning (4) Failed to load image Python extension
11:13 Final thoughts
#aiart #stablediffusion #generativeart

Пікірлер: 91
@MarkDMongie
@MarkDMongie Жыл бұрын
Thank you Laura! I have watched about 5 of your videos as I have struggled to get my Mac M1 Mini running SD. This was the last issue to resolve that was causing crashes and running out of memory, despite have 16GB. Subscribed! Keep doing your great work, and I hope Google send you paychecks :)
@John_Krone
@John_Krone Жыл бұрын
This helped me!! Thanks for this video
@kathrinbaumbach8396
@kathrinbaumbach8396 Жыл бұрын
Amazing, great help, thank you!
@JulienTaillez
@JulienTaillez Жыл бұрын
ahhh perfect, thank you for guiding us into upgrading torch, was unsuccessful until now.
@AurelioLa-lz7mw
@AurelioLa-lz7mw Жыл бұрын
thanks, this helped me lots!
@muffin6758
@muffin6758 Жыл бұрын
Thank you so much!!!! You help me fix the Torch error. Now I can run models that were not running before. I appreciate it!!
@Elyas885
@Elyas885 8 ай бұрын
🤣🤣
@theRubberDuckiee
@theRubberDuckiee Жыл бұрын
This is such a cool use of the terminal to debug errors :O
@andrewstephens9787
@andrewstephens9787 9 ай бұрын
i appreciate these videos so much
@arpaci
@arpaci 5 ай бұрын
You are amazing, Thank you
@tesko93
@tesko93 Жыл бұрын
Grandissima!
@sirisaacnewton998
@sirisaacnewton998 Жыл бұрын
Tanks for the content. I just Subscribed to the chanel. I'm the 1000 subscriber! Ciao
@LaCarnevali
@LaCarnevali Жыл бұрын
Yuppy! 🥳
@baumdeswissens
@baumdeswissens Жыл бұрын
thanks
@bartolorosario
@bartolorosario Жыл бұрын
Hello Laura! Congrats for such a nice SD channel. i'd love to ask you, considering all the issues with apple managing SD would you recommend buying a m2 macbook? are they fast enough generating images and trainning lora models? or it's much better a nvidia rtx 4090 laptop for that matter? thanks in advance for your answer!
@LaCarnevali
@LaCarnevali Жыл бұрын
Go for Windows, 100%. Otherwise, use an external provider
@jamesbriggs
@jamesbriggs Жыл бұрын
great video! Never used warp AI before but might start now lol
@warpdotdev
@warpdotdev Жыл бұрын
We'd love to collaborate with you if you give Warp a try! Let's connect.
@edmundw
@edmundw Жыл бұрын
this video is awesome!! Do you mind showing how to install controlnet on an arm based Mac?
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi, thanks :) I think you can follow this video at minute 9:52 : kzfaq.info/get/bejne/idGkqbKQtNrSf4U.html&lc=Ugy_uB96bT3C8-Lc4Xx4AaABAg
@edmundw
@edmundw Жыл бұрын
@@LaCarnevali I'm getting ERROR: Could not find a version that satisfies the requirement mediapipe==0.9.1.0 (from versions: 0.9.3.0) after installing controlnet. =(
@LaCarnevali
@LaCarnevali Жыл бұрын
@@edmundw I found this on Stack Overflow - stackoverflow.com/questions/70061068/could-not-find-a-version-that-satisfies-the-requirement-mediapipe-from-versions I would try with the approved answer
@ShyBoyEnt
@ShyBoyEnt Жыл бұрын
Does the M2 silicon base model have any problems installing and running stable diffusion locally?
@LaCarnevali
@LaCarnevali Жыл бұрын
Not that I m aware
@daviddouglassarustudios4688
@daviddouglassarustudios4688 Жыл бұрын
This is my Error A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check. Any Idea how I can solve this?
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi David, I think you can try using --no-half with running the webui.sh file : ./webui.sh --no-half
@VimalVinod-qg6mr
@VimalVinod-qg6mr Жыл бұрын
Hi there, Thanks for the video Laura. I installed on my MacBook M2 laptop and it worked fine. For some reason when I tried installing it on my M1 Max Machine. I'm getting this error: RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'" Is there any fix for this? It would be really helpful.
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi, yes, you need to run the webui file with the following command: ./webui.sh --no-half
@VimalVinod-qg6mr
@VimalVinod-qg6mr Жыл бұрын
@@LaCarnevali Thank you so much, Laura. This did help!!! Have a nice day. :)
@SityClipz
@SityClipz Жыл бұрын
can you do a video on embedding and training your own data set to stable diffusion in goole colab
@LaCarnevali
@LaCarnevali Жыл бұрын
Very soon! :)
@yanchen_
@yanchen_ Жыл бұрын
hi, i wonder if you could explain this [AttributeError: 'NoneType' object has no attribute 'pop'] it happened when i try to generate the image, and no image has been generated. Thank you!
@LaCarnevali
@LaCarnevali Жыл бұрын
try running the webui with this argument: --disable-safe-unpickle i.e., ./webui.sh --disable-safe-unpickle
@fullflowstudios
@fullflowstudios Жыл бұрын
Laura your google colab script runs all the way without error up to the point where I start stable diffusion but then I get the message: Traceback (most recent call last): from fastapi import FastApi ModuleNotFoundError: No module named 'fastapi' . I followed your instructions to the letter. Where do I go wrong?
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi Hans, this error occurs when you are not in the right environment. I rerun it this morning, and it's working okay - try restarting and rerunning and let me know if it still doesn't work.
@Smartearningswaida
@Smartearningswaida Жыл бұрын
I have Mac and had an issue setting up stable diffusion finally, I did it from the terminal and I was there but for the first time when I wanted to try and see how it generates the image I got this error: RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half' Time taken: 0.74s ? I even edited the command for stable diffusion for no halftime script and updated the Python version but no luck is there any other way
@LaCarnevali
@LaCarnevali Жыл бұрын
Ehy, I replied on the other comment - it might be related to mac updates
@TheSoggetto
@TheSoggetto Жыл бұрын
Hey! Could you tell me what's this warning about: 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 '
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi, I just seen this comment - sorry. Have you sorted?
@DivulgeD-fx5bz
@DivulgeD-fx5bz 11 ай бұрын
Hi @@LaCarnevali i have the same error. It started recently, not sure what changed,
@bot2.078
@bot2.078 11 ай бұрын
Hello, I am receiving this error on a M1 & wondering if you can help me. Also, should I use warp terminal? RuntimeError: MPS backend out of memory (MPS allocated: 7.41 GB, other allocations: 1.45 GB, max allowed: 9.07 GB). Tried to allocate 256.00 MB on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).
@bot2.078
@bot2.078 11 ай бұрын
this was warp's answer: [export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.5] First time using warp terminal for me. Would I just insert the code in the warp terminal?
@bot2.078
@bot2.078 11 ай бұрын
or should I just follow these steps in this video 😂
@thomassynths
@thomassynths Жыл бұрын
For what its worth, xformers gives me consistent results as when not using it.
@Luxeduardo
@Luxeduardo Жыл бұрын
Hi, I have this problem RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' what should i do ?
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi Lucas, Have you updated to the latest MacOS? If yes, try the following: In either the webui-user.bat or webui-user.sh add the below to the COMMANDLINE_ARGS= variable: --precision full --no-half Let me know if it works :)
@LiuPorpoise
@LiuPorpoise 11 ай бұрын
it doesn't work@@LaCarnevali
@ManelBarros
@ManelBarros Жыл бұрын
in your opinion which is better, Stable Diffusion locally on mac? or on Google Colab? great video by the way!! 😃
@LaCarnevali
@LaCarnevali Жыл бұрын
It depends on which Mac you have as Stable Diffusion requires lots of power. If you have a Mac air, for example, Colab is way faster, mainly when training.
@ManelBarros
@ManelBarros Жыл бұрын
@@LaCarnevali with M1 max and 32gb of ram 🤔
@LaCarnevali
@LaCarnevali Жыл бұрын
@@ManelBarros Hi Manel, I was searching online and people seem to be not fully happy with the performance. I would suggest you to try both (locally and colab) and see which one is faster. Limitation with Mac: - No support of NVIDIA GPU, so slow performance, - Space on disk, as SD is quite heavy. Limitation you have with colab are : - GPU is limited (you can buy more if needed), - the notebook cannot run for more than 12hours. - Space on Drive, but you can buy space on Google Drive.
@abobsing
@abobsing 6 ай бұрын
someone to help please TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
@LaCarnevali
@LaCarnevali 4 ай бұрын
Unfortunately, SD is low performing on Mac and can take ages (or never) to run it! I would recommend to use an external GPU (e.g., Colab, RunPod) or external platforms (e.g., DiffusionHub, ThinkDiffusion).
@sergey_kuryshin
@sergey_kuryshin Жыл бұрын
Hello. Why are my upscales not working? Gives constant errors
@LaCarnevali
@LaCarnevali Жыл бұрын
What errors?
@axelodontebob8620
@axelodontebob8620 Жыл бұрын
i get a RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' after doing all this and i open the program
@LaCarnevali
@LaCarnevali Жыл бұрын
I have got back to you on the other comment :) - posting the same below: Have you updated to the latest MacOS? If yes, try the following: run the ./webui adding --precision full --no-half, i.e., ./webui.sh --precision full --no-half
@axelodontebob8620
@axelodontebob8620 Жыл бұрын
But I might be wrong and hopefully won’t break anything if I update now that it works to the latest Mac os
@hayksedrakyan1086
@hayksedrakyan1086 Жыл бұрын
How can I fix this error: Error: '"compute_indices_weights_cubic" not implemented for 'Half''. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of \. Full error message is in your terminal/ cli. Thanks 😇
@LaCarnevali
@LaCarnevali Жыл бұрын
Run the webui with the command --no-half, i.e., ./webui.sh --no-half
@hayksedrakyan1086
@hayksedrakyan1086 Жыл бұрын
@@LaCarnevali Thanks !!!
@charlieayres-taylor6139
@charlieayres-taylor6139 Жыл бұрын
is there a place where problems with running stable diffusion are discussed? I currently have it installed and will open the webui, but will not generate any images coming up with a error python error of some kind?
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi! :) What is the error exactly? Does it come up when you press the "generate" button?
@charlieayres-taylor6139
@charlieayres-taylor6139 Жыл бұрын
@@LaCarnevali Hi laura thank-you so much for replying. I have installed following your guide. Yes the error comes up when i hit generate. from what i can tell it says there is a crashed thread (thread 16), "crashed with ARM thread state (64bit). the only thing i can see thats different is for me is my warp does not show (base). Hopefully that makes sense !! :)
@LaCarnevali
@LaCarnevali Жыл бұрын
@@charlieayres-taylor6139 okay. Try the following. 1) Go into the main directory stable-diffusion-webui. 2) change the environment: source venv/bin/activate 3) install requirements: pip install -r requirements.txt 4) initialise SD ./webui.sh
@charlieayres-taylor6139
@charlieayres-taylor6139 Жыл бұрын
@@LaCarnevali Hi thankyou for all your help so far:). Unfourtunately that did not work, I am still getting the following: " error: input types 'tensor' and 'tensor' are not broadcast compatible" when i press the generate button. I have had a little look online but still cant fix the problem, as i dont really know anything about coding.
@LaCarnevali
@LaCarnevali Жыл бұрын
@@charlieayres-taylor6139 okay, now run the webui with the argument --no-half: ./webui.sh --no-half
@howardchang1655
@howardchang1655 Жыл бұрын
whenever I start using stable diffusion, my python quits unexpectedly and it stopped working, any clues?
@howardchang1655
@howardchang1655 Жыл бұрын
error: input types 'tensor' and 'tensor' are not broadcast compatible
@LaCarnevali
@LaCarnevali Жыл бұрын
Try to run the file with --no-half, i.e., ./webui.sh --no-half
@eternalessence2998
@eternalessence2998 Жыл бұрын
everything works fine until I try to generate an image it says that python has unexpectedly crashed
@LaCarnevali
@LaCarnevali Жыл бұрын
Hi, try to install libraries in the requirements.txt file in the venv environment. Follow the steps below after going in the stable-diffusion-webui folder: 1) source venv/bin/activate 2) pip install -r requirements.txt 3) ./webui.sh
@eternalessence2998
@eternalessence2998 Жыл бұрын
Hey, thank you so much for replying 🙏, I tried what you described and still nothing worked, I ended up finding a forum saying to add -no-half and that worked although the rendering is really slow, do you have any suggestions to calibrate the settings to run a bit more efficiently on a MBP M1?
@LaCarnevali
@LaCarnevali Жыл бұрын
@@eternalessence2998 Unfortunately no. I've got the following from GitHub, but I am not sure it will help - otherwise I would suggest using colab/runpod/paperspace... Poor Performance: Currently GPU acceleration on macOS uses a lot of memory. If performance is poor (if it takes more than a minute to generate a 512x512 image with 20 steps with any sampler) first try starting with the --opt-split-attention-v1 command line option (i.e. ./webui.sh --opt-split-attention-v1) and see if that helps. If that doesn't make much difference, then open the Activity Monitor application located in /Applications/Utilities and check the memory pressure graph under the Memory tab. If memory pressure is being displayed in red when an image is generated, close the web UI process and then add the --medvram command line option (i.e. ./webui.sh --opt-split-attention-v1 --medvram). If performance is still poor and memory pressure still red with that option, then instead try --lowvram (i.e. ./webui.sh --opt-split-attention-v1 --lowvram). If it still takes more than a few minutes to generate a 512x512 image with 20 steps with with any sampler, then you may need to turn off GPU acceleration. Open webui-user.sh in Xcode and change #export COMMANDLINE_ARGS="" to export COMMANDLINE_ARGS="--skip-torch-cuda-test --no-half --use-cpu all".
@EddieLeFunkMusic
@EddieLeFunkMusic Жыл бұрын
I use a m1 Mac but ffmpeg doesn't work it don't give me any videos only pics
@LaCarnevali
@LaCarnevali Жыл бұрын
I know, ffmpeg has to be downloaded separately. You might install it with homebrew. Anyway, I am not sure you'll be happy with the M1 performance. You might want to use Google Colab or another external GPU to run Stable Diffusion. It will change A LOT.
@EddieLeFunkMusic
@EddieLeFunkMusic Жыл бұрын
@@LaCarnevali do you use a external gpu ?
@LaCarnevali
@LaCarnevali Жыл бұрын
@@EddieLeFunkMusic yes, Colab
@EddieLeFunkMusic
@EddieLeFunkMusic Жыл бұрын
and 3d doesn't work too :(
@LaCarnevali
@LaCarnevali Жыл бұрын
What exactly?
@axelodontebob8620
@axelodontebob8620 Жыл бұрын
laura!!! i think i went like three steps back this morning after trying to add dreambooth to my computer.... my computer now says i am back to version 1.12.1 of torch whilst yesterday it worked with 2.0.0 and when i try the same steps to fix like in your video it says ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torchvision 0.13.1 requires torch==1.12.1, but you have torch 1.13.1 which is incompatible. Successfully installed torch-1.13.1 the thing is that after i try to run the program once more it still says i am running 1.12.1 helpppp
@axelodontebob8620
@axelodontebob8620 Жыл бұрын
i went to terminal and typed pip install torchvision==0.15.1 and it worked, it is the torchvision that is compatible with torch 1.13.1 and the program will run properly using both updated torch and torchvision if one manually does both if you are in my situation that torchvision doesnt seem compatible
@thecorporategoose14
@thecorporategoose14 5 ай бұрын
Struggled to focus, cute as hell :)
@DJBAF85
@DJBAF85 6 ай бұрын
Maybe it's something silly but I get the following error, and I have no idea how to fix it. ERROR> zsh: permission denied: stable-diffusion-webui/
@theanimaster
@theanimaster 9 ай бұрын
I installed ControlNet on my M2 Mac mini and getting the error: TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead. -- how to fix this??
@ococococococ
@ococococococ Жыл бұрын
Hey Laura, I'm getting this error: "Stable diffusion model failed to load" Im not sure which step I did wrong. I have a iMac w/ 3 GHz 6-Core Intel Core i5 & 16 GB ram. Please help me out!! Thank you.
@LaCarnevali
@LaCarnevali Жыл бұрын
This might help: windowsreport.com/stable-diffusion-model-failed-to-load-exiting/#:~:text=The%20Stable%20Diffusion%20model%20failed,Virtual%20RAM)%20did%20the%20trick.
@ococococococ
@ococococococ Жыл бұрын
@@LaCarnevali perfetto!
Vlad SD vs. Automatic1111: Stable Diffusion on Mac?
19:09
Laura Carnevali
Рет қаралды 9 М.
Intro to LoRA Models: What, Where, and How with Stable Diffusion
21:01
Laura Carnevali
Рет қаралды 192 М.
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 16 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 20 МЛН
How To Run and Use CodeFormer for Stable Diffusion
19:39
Laura Carnevali
Рет қаралды 13 М.
Fixing Stable Diffusion.
11:07
Vladimir Chopine [GeekatPlay]
Рет қаралды 9 М.
Training (Fine-Tuning) Your Own Stable Diffusion Model Using Colab
29:57
ComfyUI AnimateDiff Prompt Travel: Runpod.io Cloud GPUs Tutorial
22:49
How to use Stable Diffusion. Automatic1111 Tutorial
27:10
Sebastian Kamph
Рет қаралды 313 М.
How to Install Stable Diffusion on AMD GPUs (NEW)
8:49
Trent Kingdom
Рет қаралды 143 М.
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН