IMPORTANT! If you encounter a 'No such file or directory' error, it's likely that you imported the notebook into the wrong folder. You should import the notebook into the 'home/studio-lab-user/' directory, as demonstrated in the video. After first start you can safely delete the 'sagemaker-studiolab-notebooks' folder. To start fresh and reinstall everything, go to the 'maintenance' tab in the notebook, delete all virtual environments and files, then restart the session and reinstall everything once again. A big thank you to @simunaqv for helping resolve this issue!
For those who are still experiencing problems with this method, you can try Stable Diffusion in Colab! The video is available here: ua-cam.com/video/lmpAopZ41K4/v-deo.html
In step 3 this error showing - RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check. I am using CPU because GPU is not available.
Hey man, this is really cool, but I have a request Would it be possible that you can also add an Lora and VAE option to the notebook, and maybe and embeddings option
This is no longer the best option as NGROK has set a limit of 1GB, which can be completely used in a few minutes after generating some high-resolution images. After that, the person will have to wait a month, which is worse than waiting 24 hours.
can u please make tutorial how to train lora sdxl with this? i want to train lora sdxl but my gpu is only 12gb vram, it still not enough for training lora sdxl.
There is no GPU available. Tried it some days now. Everytime: "There is no runtime available right now. Please change the compute type or try again later".... running stable diff with CPU would be nice xD
Hey thanks for the video ! Do you know how can I install CivitiAI models in the notebook ? (because I have error with models that didn't come from huggingface) Thanks in advanced
Go to your account settings and scroll down to the API Key. Make an API key. Copy it and save it somewhere safe. add that API key as your token at the end of the URL like ?token=Your-key-here
10 місяців тому+2
Is it possible to use trained models contained in dirve, putting the path to it in step two?
I was getting error with the targetr_dir value set to "/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/". I fixed it by changing it to "/home/studio-lab-user/sagemaker-studiolab-notebooks/stable-diffusion-webui/models/Stable-diffusion/".
Damn, I got it! You had this error because you, and other guys who have the same problem here, imported the notebook in the wrong folder, the standard one 'sagemaker-studiolab-notebooks,' which I didn't use in the video. This is why it works for some of you and doesn't for others. Just import the notebook to the 'sagemaker-studiolab-notebooks' folder. Would be even better if you just delete everything and keep the 'studio-lab-user' folder clean before adding my notebook, what I actually did in the video
Thanks, i got my amz account second. I will try to install it by following your steps in video later. Hopefully, everything will be running smoothly, can i add or train Lora by using this way?
*Great , Thank you man* , I have multiple google colab notebooks , I'm new to all this, how can I import them into kaggle or another service like sagemaker studio lab, or paperspace or else, and run them there, do I have to change certain code? what about files like mp3 or mp4 or pics that I used to use with my notebooks , either for video processing or picture enhancement or audio transcription , etc, how can I upload them to those alternatives? colab is not giving me access lately because of you know , "limitations" :/
Glad to help! In order to import Colab notebooks, you should modify the code because Kaggle and SageMaker environments work a bit differently. It might be easy or quite problematic, depending on the notebook and libraries used.
Yeah, True , I tried importing them , some worked, some I had to change some code, or add some code for them to work , but most of them don't work at all, I don't have much experience in coding ..but I think there would an AI app to convert google colabs into kaggle notebooks , until that , wish if developers start publish kaggle notebooks instead, since google is limiting too much these days and refusing to host some GPU intensive apps like midjourney alternatives, stable diffusion , large LLM models , they even banned a lot of accounts forever ...And they own kaggle too btw -_- // Thanks for you quick answer man. @@marat_ai
Thanks for this contribution. It is a great example of collaboration and creativity. Before trying it, I want to ask you if, once the 4 hours of GPU or 8 hours of CPU are consumed, what can be done. Is a new account created?
It's possible, there were many video clips during editing, so I might have mixed up the fragments. But of course, for SD you should use GPU, and as I mentioned in the video, since the notebook is already prepared
Hi, it seems that you used the previous version of the notebook. I have already fixed that, and the link is updated. Please nuke everything (command in maintenance), restart the runtime, and reinstall it once again.
it's work ! thanks but i don't know why it's take several times to install ans i lost my model somewhere ( edit even if i change the model i get always yours ! ) ! should i run it again to install it or i can download later on the interface ? anyway thanks it's work on my laptop who is currently poor for running stable without my external gpu when i am outside home
Hey, theres a bug going on that i cant get the phone verification code even after putting it right and trying differt phone number, do u know how to fix this??? Its been days for me already
I think it's because of your mobile carrier. I see the following options: use a different number from another country, preferably the US, by asking friends or kind people on Reddit. Alternatively, you can use number rental services, paid or free, but free ones are usually banned. So, it's better to pay half a dollar for a number
Si les sale este problema 👉🏼 "NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs: query : shape=(1, 4096, 1, 512) (torch.float32) key : shape=(1, 4096, 1, 512) (torch.float32)..." cambiar "--xformers" por "--opt-sub-quad-attention" en el paso 3 y listo! working 🤗
You are welcome! I would recommend creating a Hugging Face account, creating rep with your models and downloading them from hf. It's much more convenient and reliable.
Hi! Yes, I knew about Lightning and have already done some tests. It's a really good way to go. I've been quite busy making videos and replying to comments, but I'm going to make a new one soon!
It's not as much because all the environment stuff already takes up about 10 -15 GB! But 15 gigs on Colab is already something, like 64 GB in a base iPhone.
Hi! You can do it by yourself, but I've added that to the Patreon version. Just today, I've updated the notebook for Kaggle and SageMaker to the latest Automatic.
@@marat_ai I made a mistake and instead of subscribing to SageMaker Studio Lab, I subscribed to SageMaker Studio (via AWS account). 2 mouths free with no limitation on storage (100 Go max). No pb to launch the JupyterLab, but your script doesn't work because the root name of the path changed between these two environments. Is there a chance I can fix that by my own ?
That's great! It's much more convenient to use than Google. However, I have a problem bothering me. I have generated a large number of images, and I'm wondering how to download them quickly and easily. When I use the Chrome browser, I can only download them 10 by 10, and it fails if there are too many.
You are welcome! As for you question, I understand you pain, just create new cell and add the code bellow, then call the function # Import the 'zipfile' module to work with ZIP archives. import zipfile # Define a function called 'create_zip_archive' that takes two parameters: # - 'source_dir': The directory whose contents will be zipped. # - 'output_path': The path where the resulting ZIP archive will be saved. def create_zip_archive(source_dir, output_path): with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf: for root, dirs, files in os.walk(source_dir): for file in files: file_path = os.path.join(root, file) zipf.write(file_path, os.path.relpath(file_path, source_dir)) # Define the source directory to be zipped. source_dir = '/home/studio-lab-user/stable-diffusion-webui/outputs' # Define the output path for the resulting ZIP archive. output_path = '/home/studio-lab-user/outputs.zip' # Call the 'create_zip_archive' function to create the ZIP archive. create_zip_archive(source_dir, output_path)
After I performed the operation, this block of code appeared. Did I do something wrong? NameError Traceback (most recent call last) /tmp/ipykernel_91/3186569932 .py in () 21 22 # Call the 'create_zip_archive' function to create the ZIP archive. ---> 23 create_zip_archive(source_dir, output_path) /tmp/ipykernel_91/3186569932 .py in create_zip_archive(source_dir, output_path) 9 def create_zip_archive(source_dir, output_path): 10 with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf: ---> 11 for root, dirs, files in os.walk(source_dir): 12 for file in files: 13 file_path = os.path.join(root, file) NameError: name 'os' is not defined
It's not working. I tried to use links of Realistic Vision and Magicmix but when I launched Stable Diffusion, it shows a single random model named "v1-5-pruned-emaonly.safetensors [6ce0161689]" which also generated horrible results. It's weird.@@marat_ai
@@marat_ai I have downloaded the file at the bottom of your description, (Link at "Base Notebooks:"). But the name of file is "Base_SD_SageMaker notebook03.ipynb", not the one in your video "automatic Sagemaker Base". And later it does not work. Would you please give me more instruction? Thank You!
it's the same notebook, probably recently updated, and it works. You can specify your problem, but most likely, you are not alone, and your issue has been resolved. Just check the comments.
Did you use your link or the one I already specified (realistic vision)? Most likely, you used the wrong link. The link should be for downloading the model, not just a model's webpage.
I keep getting "[Errno 2] No such file or directory: '/home/studio-lab-user/stable-diffusion-webui'" when downloading models and trying to run the third cell.
@@erickhc Thanks for the response. You've shown that it works! Because there are many people who claim that it doesn't work, I tested it myself several times, and it also worked for me. I faced a similar issue when I was creating this notebook. That's why I emphasized multiple times that everything should be done carefully. Sagemaker is indeed quite strange.
Hey man, this is really cool, but I have a request Would it be possible that you can also add an Lora and VAE option to the notebook, and maybe and embeddings option
IMPORTANT!
If you encounter a 'No such file or directory' error, it's likely that you imported the notebook into the wrong folder. You should import the notebook into the 'home/studio-lab-user/' directory, as demonstrated in the video. After first start you can safely delete the 'sagemaker-studiolab-notebooks' folder.
To start fresh and reinstall everything, go to the 'maintenance' tab in the notebook, delete all virtual environments and files, then restart the session and reinstall everything once again.
A big thank you to @simunaqv for helping resolve this issue!
For those who are still experiencing problems with this method, you can try Stable Diffusion in Colab! The video is available here:
ua-cam.com/video/lmpAopZ41K4/v-deo.html
Hi. There is python 3.9.16 environment by default. Can you tell pls how to update python to 3.10.6 at least to run your notebook on it?
It's working now, thanks for your response!
The studio lab won't let me to use GPU compute type
Thanks!
I've been waiting for someone to make a tutorial on this topic for months. Thank you very much!!!
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
do we need to install a1111 first??
There is no runtime available right now. (Problem on use GPU
In step 3 this error showing -
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check.
I am using CPU because GPU is not available.
Without gpu it won't work
Finally ❤
Does this not work anymore? Whenever I try to use it, I always get an error after trying to launch the webui.
Hey man, this is really cool, but I have a request
Would it be possible that you can also add an Lora and VAE option to the notebook, and maybe and embeddings option
I absolutely loved this wonderful video. Thank you so much. How do I xformers?
u are a hero, btw , any discord community server?
I got this error now in your notebook:
TypeError: __init__() got an unexpected keyword argument 'socket_options'
Do you know how to solve it?
I got the same error
Wow, this video saved me!
thanks
This is no longer the best option as NGROK has set a limit of 1GB, which can be completely used in a few minutes after generating some high-resolution images. After that, the person will have to wait a month, which is worse than waiting 24 hours.
You are free to use any tunnel you want, and I think that having several ngrok accounts is also possible.
yeah you're right, just using it for several times, and ngrok stopped working.
do you have any alternate tunnel recommendation?
Can anyone help me?
Everytime when i'm request account, it keep saying "Something went wrong. Please try again later."
can u please make tutorial how to train lora sdxl with this? i want to train lora sdxl but my gpu is only 12gb vram, it still not enough for training lora sdxl.
There is no GPU available. Tried it some days now. Everytime: "There is no runtime available right now. Please change the compute type or try again later".... running stable diff with CPU would be nice xD
You are right. Its everytime there isn't available GPU problem
hello! can you update the notebook please?
I don't think dreambooth works on collab again
Hey thanks for the video ! Do you know how can I install CivitiAI models in the notebook ? (because I have error with models that didn't come from huggingface) Thanks in advanced
Go to your account settings and scroll down to the API Key.
Make an API key. Copy it and save it somewhere safe.
add that API key as your token at the end of the URL like ?token=Your-key-here
Is it possible to use trained models contained in dirve, putting the path to it in step two?
do you know how ? cuz 'Im suffering here
Thanks, it still works, but I installed the reactor extension and it does not recognize it, I get an error
Ngrok is notorious for disconnection.
When I accessed SageMaker Studio Lab, I could only see 403 ERROR. There seem to be too much access. I don't know what to do.
Thanks for the share 🙌 If possible can you make a similar guide for RVC ( AI Cover songs ) on Sagemaker ??
Yes, that's possible, but definitely not in the next 2 weeks
@@marat_aiwhy tho
thanks ❤
helpful!!!
i cant download a model...its says "FileNotFoundError: [Errno 2] No such file or directory"
same here :/
Me as well
The issue is resolved, please check the pinned comment
I was getting error with the targetr_dir value set to "/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/". I fixed it by changing it to "/home/studio-lab-user/sagemaker-studiolab-notebooks/stable-diffusion-webui/models/Stable-diffusion/".
Damn, I got it! You had this error because you, and other guys who have the same problem here, imported the notebook in the wrong folder, the standard one 'sagemaker-studiolab-notebooks,' which I didn't use in the video. This is why it works for some of you and doesn't for others. Just import the notebook to the 'sagemaker-studiolab-notebooks' folder. Would be even better if you just delete everything and keep the 'studio-lab-user' folder clean before adding my notebook, what I actually did in the video
can't login in sagemaker studio lab anymore.
my step 2.1 of downloading model is not working it's showing error
Thanks, i got my amz account second. I will try to install it by following your steps in video later. Hopefully, everything will be running smoothly, can i add or train Lora by using this way?
yes, sure
GPU runtime almost always unavailable now in sagemaker
quando eu vou fazer o cadrasto diz erro na pagina, la pedi empresa mas nao tenho empresa
Sir I am getting this: ModuleNotFoundError: No module named 'tqdm'. What should I do now
*Great , Thank you man* , I have multiple google colab notebooks , I'm new to all this, how can I import them into kaggle or another service like sagemaker studio lab, or paperspace or else, and run them there, do I have to change certain code? what about files like mp3 or mp4 or pics that I used to use with my notebooks , either for video processing or picture enhancement or audio transcription , etc, how can I upload them to those alternatives? colab is not giving me access lately because of you know , "limitations" :/
Glad to help! In order to import Colab notebooks, you should modify the code because Kaggle and SageMaker environments work a bit differently. It might be easy or quite problematic, depending on the notebook and libraries used.
Yeah, True , I tried importing them , some worked, some I had to change some code, or add some code for them to work , but most of them don't work at all, I don't have much experience in coding ..but I think there would an AI app to convert google colabs into kaggle notebooks , until that , wish if developers start publish kaggle notebooks instead, since google is limiting too much these days and refusing to host some GPU intensive apps like midjourney alternatives, stable diffusion , large LLM models , they even banned a lot of accounts forever ...And they own kaggle too btw -_- // Thanks for you quick answer man.
@@marat_ai
Hi, 7:05 where can i download your ultimate version notebook for download lora, etc? Thanks.
What do I have to do if I want to install stable defusion LX?
hi, how to update python to 3.10? is it possible?
sagemaker still use python 3.9, which is make some extensions are not working :/
Thanks for this contribution. It is a great example of collaboration and creativity. Before trying it, I want to ask you if, once the 4 hours of GPU or 8 hours of CPU are consumed, what can be done. Is a new account created?
No it will reset every day
Thanks!
As for your question, why not?I haven't had that before, usually, 4 hours are enough for me.
Do you know how to download the resulting models from checkpoint manager
can you please do this with facechain?
I signed up 2 days ago and I haven't heard back from them yet. How long does it take to get accepted?
I don't know, try a different email, preferably gmail, and consider using a VPN
bro u forgot to switch to GPU when run SD ?
It's possible, there were many video clips during editing, so I might have mixed up the fragments. But of course, for SD you should use GPU, and as I mentioned in the video, since the notebook is already prepared
FileNotFoundError error, when i try to download a model, any clue?
Hello! I need help! In Step 3 "ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory'. How to fix it?
Hi, it seems that you used the previous version of the notebook. I have already fixed that, and the link is updated. Please nuke everything (command in maintenance), restart the runtime, and reinstall it once again.
I cant get OTP when start the project
hi..😊but what if I want to add deforum?
i got a socket options error, pls help
Hello, does it work for fooocus?
does that mean you can use it for 3 hours a day?
Where is the free and final notebook that requires a $5 subscription
Sorry, I just fixed that. The notebook is now available.
How to do this with fooocus
what model you used on your thumbnail?
thanks how much gpu ram they give you?
it's work ! thanks but i don't know why it's take several times to install ans i lost my model somewhere ( edit even if i change the model i get always yours ! ) ! should i run it again to install it or i can download later on the interface ? anyway thanks it's work on my laptop who is currently poor for running stable without my external gpu when i am outside home
Hey, theres a bug going on that i cant get the phone verification code even after putting it right and trying differt phone number, do u know how to fix this??? Its been days for me already
I think it's because of your mobile carrier. I see the following options: use a different number from another country, preferably the US, by asking friends or kind people on Reddit. Alternatively, you can use number rental services, paid or free, but free ones are usually banned. So, it's better to pay half a dollar for a number
Si les sale este problema 👉🏼 "NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs: query : shape=(1, 4096, 1, 512) (torch.float32) key : shape=(1, 4096, 1, 512) (torch.float32)..." cambiar "--xformers" por "--opt-sub-quad-attention" en el paso 3 y listo! working 🤗
@Magentochile - did you resolve the "NotImplementedError"?
guide me to do with facefusion
Thanks man. Just a question. How can I load a Lora that I already have downloaded in my computer?
You are welcome!
I would recommend creating a Hugging Face account, creating rep with your models and downloading them from hf. It's much more convenient and reliable.
@@marat_ai Alright, I’ll do that. Thanks a lot
never get to use GPU . always have to wait .
Hey marat bro can you also make a notebook for lightning ai new one same as sagemaker but more than that
Hi! Yes, I knew about Lightning and have already done some tests. It's a really good way to go. I've been quite busy making videos and replying to comments, but I'm going to make a new one soon!
@@marat_ai thanks
Is it possible to use models loras ecc saved in google drive?
Technically, yes, but it would be easy to do this manually
6:30 "heavily restricted with available storage" it give me 25gb, while google drive only 15gb 🤣
It's not as much because all the environment stuff already takes up about 10 -15 GB! But 15 gigs on Colab is already something, like 64 GB in a base iPhone.
Bro how we can run this mobile
no answer !
Hello. Is it possible to import LORA with the regular process of Automatic1111? Or do we need your Patreon Notebook config file ? Thx
Hi! You can do it by yourself, but I've added that to the Patreon version. Just today, I've updated the notebook for Kaggle and SageMaker to the latest Automatic.
@@marat_ai I made a mistake and instead of subscribing to SageMaker Studio Lab, I subscribed to SageMaker Studio (via AWS account). 2 mouths free with no limitation on storage (100 Go max). No pb to launch the JupyterLab, but your script doesn't work because the root name of the path changed between these two environments. Is there a chance I can fix that by my own ?
That's great! It's much more convenient to use than Google. However, I have a problem bothering me. I have generated a large number of images, and I'm wondering how to download them quickly and easily. When I use the Chrome browser, I can only download them 10 by 10, and it fails if there are too many.
You are welcome! As for you question, I understand you pain, just create new cell and add the code bellow, then call the function
# Import the 'zipfile' module to work with ZIP archives.
import zipfile
# Define a function called 'create_zip_archive' that takes two parameters:
# - 'source_dir': The directory whose contents will be zipped.
# - 'output_path': The path where the resulting ZIP archive will be saved.
def create_zip_archive(source_dir, output_path):
with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
for root, dirs, files in os.walk(source_dir):
for file in files:
file_path = os.path.join(root, file)
zipf.write(file_path, os.path.relpath(file_path, source_dir))
# Define the source directory to be zipped.
source_dir = '/home/studio-lab-user/stable-diffusion-webui/outputs'
# Define the output path for the resulting ZIP archive.
output_path = '/home/studio-lab-user/outputs.zip'
# Call the 'create_zip_archive' function to create the ZIP archive.
create_zip_archive(source_dir, output_path)
After I performed the operation, this block of code appeared. Did I do something wrong?
NameError Traceback (most recent call last)
/tmp/ipykernel_91/3186569932 .py in ()
21
22 # Call the 'create_zip_archive' function to create the ZIP archive.
---> 23 create_zip_archive(source_dir, output_path)
/tmp/ipykernel_91/3186569932 .py in create_zip_archive(source_dir, output_path)
9 def create_zip_archive(source_dir, output_path):
10 with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
---> 11 for root, dirs, files in os.walk(source_dir):
12 for file in files:
13 file_path = os.path.join(root, file)
NameError: name 'os' is not defined
@@user-ps2wd3vo5d add
import os
Can I not use links from Civitai to download the models?
Yes, sure
It's not working. I tried to use links of Realistic Vision and Magicmix but when I launched Stable Diffusion, it shows a single random model named "v1-5-pruned-emaonly.safetensors [6ce0161689]" which also generated horrible results. It's weird.@@marat_ai
better to go for gpu or cpu with notebook ?
GPU (T4) is the better choice in this case.
Hi, thanks for your guides. I'm not a programming expert, I wonder: Is it possible to use Kohya_ss to train a lora with your up-to-date method ?
sure
very nice how you leave everything out with credit card. 😂
Hello, how can I download the automatic_segamaker base mentioned in 2:42?
Check the description
@@marat_ai I have downloaded the file at the bottom of your description, (Link at "Base Notebooks:"). But the name of file is "Base_SD_SageMaker notebook03.ipynb", not the one in your video "automatic Sagemaker Base". And later it does not work. Would you please give me more instruction? Thank You!
it's the same notebook, probably recently updated, and it works. You can specify your problem, but most likely, you are not alone, and your issue has been resolved. Just check the comments.
@@marat_ai Thank you! It works!
cant download model (No such file or directory)
Did you use your link or the one I already specified (realistic vision)? Most likely, you used the wrong link. The link should be for downloading the model, not just a model's webpage.
First I tried to download your models, it didn't work. then I changed the link but still the other model doesn't download either. @@marat_ai
is this working with sdxl?
yes
Is it still working??
sure
Give the free link also bro pls
The notebook on my patreon page is already free, just look carefully
@@marat_aithank you bro ❤
ehm... just install it locally and dont bother with the crappy online options?
Hmm, there are a bunch of people who just don't have a powerful GPU, so this video is for them...
dude, not everyone lives in first world countries with access to low priced GPUs.
@@jerchongkong5387 can't say i do either. But wasting money on cloud resources when you can just saved up on for one is kinda stupid.
When I press "Start Runtime" it asks for my phone number then verification code. But i never get the verification code.
try to spam, I had the same issue and got sms from GoPro for some reason
@@marat_aii still havent got the code do u know how to fix???
I keep getting "[Errno 2] No such file or directory: '/home/studio-lab-user/stable-diffusion-webui'" when downloading models and trying to run the third cell.
If you run all cells properly as shown in the video, everything should work. Try reinstalling everything once again
@@marat_ai there is some error in the code
@@marat_ai First of all, thanks for replying, amazing job.
@@erickhc Thanks for the response. You've shown that it works! Because there are many people who claim that it doesn't work, I tested it myself several times, and it also worked for me. I faced a similar issue when I was creating this notebook. That's why I emphasized multiple times that everything should be done carefully. Sagemaker is indeed quite strange.
Hey man, this is really cool, but I have a request
Would it be possible that you can also add an Lora and VAE option to the notebook, and maybe and embeddings option