I tried to build a REACT STABLE DIFFUSION App in 15 minutes
Вставка
- Опубліковано 5 лют 2025
- Oooooh lawdy, this one put my coding skills to the test...python ANNNND JAVASCRIPT?
Anyway, hopefully you agree that this is slightly better than the last Stable Diffusion UI that I made, either way it allows you to generate images by leveraging the amazing model. Deployment of the API would require a GPU to be quick...let me know if you have any suggestions!
Hopefully you enjoyed this video.
🤖 Get the CODE: github.com/nic...
💼 Find AWESOME ML Jobs: www.jobsfromnick.com
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!
#machinelearning #codingchallenge #react #javascript
Please do more React/JavaScript Machine learning projects. Combining it with a Python back-end was also really cool. 👏🏾🔥
Definitely, I'm bringing them back! Glad you liked it @Jabulani!
Nice video. I definitely need to step up from python and learn typescript. This kind of videos with fastapi as backend and react as front are super useful and are near the state of the art on what you see in the private sector
They definitely help take it to the next level. I try to do a mix for work, but for front ends I build pretty much everything with the MERN stack. All my ML backends are in Python though!
@@NicholasRenotte Is there any reason to choose Mongo over postgres?
Nick, you're so motivating ! I took example of the VizDoom video you recorded and also of some others of your videos and some chess AI videos to create a project to get my AI dev diploma (that I know I passed a week ago !!!!) ... so I really wanted to thank you for all the great content you're providing ^^
Keep going, you're a real blessing !
Best regards from France
As someone who has been teaching coding for 10 years I really admire your work, keep it up!!
Keep that energy... 10x skills... Great audio/editing... 💯
Spectacular my friend🎉
Cheers @AI Manifest!
nice video brother more like this we want on Reactjs and Nextjs
Awesome! One question, when you import the pretrained model i.e. StableDiffusionPipeline.from_pretrained(...), does the code download the whole pre-trained model to your PC ?
Sure does!
This is an example of why AI replacing us software developer isn't actually too bad. The amount of stress but just watching this video was just too much
thank you for the amazing walkthrough. Learned so much. I'm trying to work this out on a Mac with M1, so many other challenges. Can you make a followup to this for device ="mps" ? Also I don't see a Say Thanks button for your channel ;)
Can you create a tutorial "to make a system that run time measure the sizes of human body parts as body parts segmentation and then output size chart of human body"?
Sorry I dint' watch the whole video but are you running stable diffusion through an API, or your own machine?
I am looking to do something similar but I want to run a specific model? Do I need to run it on a server like AWS?
I am sorry, but where i can get token for stable-diffusion ?
Great video! Do the generate PNGs have the metadata info like seeds etc???
What to do if we dont have cuda and wanna run it on cpu
ofc besides getting GPU ,
will
device="cpu" work?
edit: it kinda worked it asked me to remove the torch_dytpe arg completely but when I throw a prompt it says: Exception in ASGI application .....RuntimeError: expected scalar type BFloat16 but found Float
did you ever fix this? running into the same issue... @NicholasRenotte
Nah mate, ended up using a GPU.
hey I do have a error and I cannot fix it can you help me out?
E1) vae\diffusion_pytorch_model.safetensors not found
E2) AssertionError("Torch not compiled with CUDA enabled")
@@picklenickil
Just out of curioisity why did you choose the 1.4? Last year when this video came up, the 1.5 was already out no? Althogh i must say you were lucky because if you choose 1.5, well it is not longer available, runway removed it from hg 😞
can you build an extension to autocomplete code in VSC like tabnine? your channel is pure gold 👏. thanks for sharing your knowledge
Haven't done it before but can definitely take a look!
Is there any way to do this without an API key? I was thinking it'd be cool to make a checkpoint in my style (so people can know it is 100% ethical to use) and then make a google play app and run ads in it. I can't afford an API key because I don't have money and I'd need to do a lot of extensive testing, which would rack up quite a bill if I had to use an AI key.
how do you deploy the production backend for a web app like this? is google colab good?
There doesn't seem to be much of a point in making the prompt variable reactive in this case though, right? Nothing is done with it until the generate button is clicked.
how do you get this to run locally? The website simply stalls when I type in a prompt. Is it because I need my own auth token?
New to this, so help appreciate :)
I have the same problem rn...did you figure it out?
@@elizabethfeldman2999 So auth_token is to access an API called Hugging face you can just signup for it and create a token in your settings> tokens> create a new token with name auth_token and it would generate a new token. Now you can copy it and run your program.
@@rajivn3707 So you make the token to read or write?
Doesn't stable diffusion have an API you can use?
did he use flask in the python file to create an api or is it simple.
i am a total beginner it would be really big help if someone can guide me
this was awesome!!! thank you!!
can you please tell us where you imported StableDiffusionPipeline from?
This video was godsent. Thanks !
Stoked you liked it Shaun!
Hello there , amazing tutorial , but i have a question that i am stuck with , what is the Auth_Token in the api file , is it python auth token for the enviroment or what ? I have been away from Python for a while now , so i am confused i would appreciat your hlep , cheers
its his api token from huggingface
how can i run this project on my pc
Would it be feasible to do this on an EC2 CPU instance?
I am the winner 😎😎
Wait...did you actually?! If so CONGRATS! Ronak!
See the log and decide whether I am the winner or not
There’s logs for Amazon gift cards?😅 lol I need to go check this out.
can you try including GCP and docker containerization with ur models??
Will def be taking a look at docker soon!
@@NicholasRenotte thanks man!
Is there any way to build background diffusion based on your own image ?
can you make a video with yolo 7?
There's a yolo 7 now? Will take a look!
It says NSFW content detected with anything i write like 'a cat' etc how to fix this?
Hi, I want to change the model. Where do I fix it? Can you please tell me?
yo Nick did you take the write or read auth key
Nicholas, i want to build something similar, i built a Image Classification API using FastAPI and it's working really great when using swagger UI and I want to make a web app using react. Can you make a tutorial on how to do that? I want users to upload the image.
You got it!!
If would be great if you could make a video on on a python/javascript project using the new dalle 2 api
Very nice job 👍🙂
Thanks a mil @nidal!
How can i add lora in this project and using it on website
Awesome! More of these full stack end2end vids!
Please how can I host this on cloud and have it as a website?
what kind of virtual environment is he using can anyone tell me
hi there,
it's auth_token is stability sdk api key?
Could I also do this in Angular ?
How do you even do this without planning
Bro,I'm getting a RuntimeError
"RuntimeError: Unable to find a valid cuDNN algorithm to run convolution"
Error with CUDA here, and i have a GPU. Cant install the enviroment properly
where i get the auth token?
Hey Nick can you do that reinforcement learning for trading again. Getting so many errors due to new version of packages
can you make a video on how to make a stable diffusion api in node js and upload it online ,create a website for it ,let users create there own image and download it.
That looks more Red ahemmm at 33:36 than Merce...ahem 🤣🤣, SD does not follow F1
Will this run on a 4gb GPU?
@nicholas do you have a course that learns from zero?
deep learning and machine learning
Fantastic content!
Hi, please anyone, what is suppose to be inside the info.txt
Hello, I'm new to programming
I want to make a website from this API
Will you make a video to tell full process🙂 I'll give my everything to it
Edit- I'm pro in making wordpress websites, so can I insert this API someway in it... but how to make my own API?
firing everyone
Damn missed out on the gift card 😅
Awww shucks Ash 😉
I swear you the best
🙏🙏🙏
Thank you
Anytime, stoked you checked it out!
Awesome ❤️
Cheers @AthenCoder!
That's gold!
🙏 thanks a mil Gabriel!
13:23
my mac M1 doesn't have cuda
cool stuff
very nice
he's kind of a noob at react. but thats okay. pretty good at python
How cool....
why python?!?
👏🏾🔥
🙏🙏🙏
drama is so unnecessary we know that you already made or have some sort of reference for the code
First!!!
Daymn, first, second and third! Cheers @Ayomide!
Second!!!
Third!!!
I'm getting the message "{"detail":[{"loc":["query","prompt"],"msg":"field required","type":"value_error.missing"}]}" when accessing the following:
"GET / HTTP/1.1" 422 Unprocessable Entity
what should I do to fix it?
type /docs after your ip link
Hi Nick please I need your help in research i am working on using the prophet model- how can I contact you its urgent
I Have show this issue Can Guide me
Exception has occurred: TypeError
getattr(): attribute name must be string
File "C:\Users\User\Downloads\StableDiffusionApp-main\StableDiffusionApp-main\app.py", line 25, in
pipe = StableDiffusionPipeline.from_pretrained(modelid, revision="fp16", torch_dtype=torch.float16, use_auth_token=auth_token)
TypeError: getattr(): attribute name must be string
While running there is always an error unet\diffusion_pytorch_model.safetensors not found help me how can I solve it @NicholasRenotte
funny man