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

КОМЕНТАРІ • 114

  • @Jaybaas
    @Jaybaas 2 роки тому +61

    Please do more React/JavaScript Machine learning projects. Combining it with a Python back-end was also really cool. 👏🏾🔥

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +7

      Definitely, I'm bringing them back! Glad you liked it @Jabulani!

  • @pitter6636
    @pitter6636 2 роки тому +9

    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

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +1

      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!

    • @pitter6636
      @pitter6636 2 роки тому +2

      @@NicholasRenotte Is there any reason to choose Mongo over postgres?

  • @FanZy0127
    @FanZy0127 2 роки тому +11

    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

  • @SanjinDedic
    @SanjinDedic 2 роки тому +2

    As someone who has been teaching coding for 10 years I really admire your work, keep it up!!

  • @coinhawk
    @coinhawk Рік тому +1

    Keep that energy... 10x skills... Great audio/editing... 💯

  • @aimanifest
    @aimanifest 2 роки тому +2

    Spectacular my friend🎉

  • @radiationcreation8394
    @radiationcreation8394 Рік тому +1

    nice video brother more like this we want on Reactjs and Nextjs

  • @davidzhang4825
    @davidzhang4825 2 роки тому +2

    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 ?

  • @FlutterStartups
    @FlutterStartups 10 місяців тому

    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

  • @xt3708
    @xt3708 2 роки тому +2

    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 ;)

  • @muzammilali7904
    @muzammilali7904 2 роки тому +4

    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"?

  • @nadred5396
    @nadred5396 Рік тому

    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?

  • @richardrgb6086
    @richardrgb6086 Рік тому +3

    I am sorry, but where i can get token for stable-diffusion ?

  • @ಥ_ಥ-ಞ9ಞ
    @ಥ_ಥ-ಞ9ಞ Рік тому +1

    Great video! Do the generate PNGs have the metadata info like seeds etc???

  • @picklenickil
    @picklenickil 2 роки тому +3

    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

    • @quandarious_gooch
      @quandarious_gooch 2 роки тому

      did you ever fix this? running into the same issue... @NicholasRenotte

    • @picklenickil
      @picklenickil 2 роки тому

      Nah mate, ended up using a GPU.

    • @131mohammadubaida6
      @131mohammadubaida6 Рік тому +1

      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

  • @EternalAI-v9b
    @EternalAI-v9b 4 місяці тому

    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 😞

  • @horu8027
    @horu8027 2 роки тому +1

    can you build an extension to autocomplete code in VSC like tabnine? your channel is pure gold 👏. thanks for sharing your knowledge

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +2

      Haven't done it before but can definitely take a look!

  • @shadowdemonaer
    @shadowdemonaer Рік тому +1

    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.

  • @clippy5394
    @clippy5394 Рік тому +1

    how do you deploy the production backend for a web app like this? is google colab good?

  • @DodaGarcia
    @DodaGarcia 2 роки тому

    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.

  • @elizabethfeldman2999
    @elizabethfeldman2999 2 роки тому +2

    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?

    • @elizabethfeldman2999
      @elizabethfeldman2999 2 роки тому

      New to this, so help appreciate :)

    • @YOUPICKSoNET
      @YOUPICKSoNET 2 роки тому

      I have the same problem rn...did you figure it out?

    • @rajivn3707
      @rajivn3707 2 роки тому +1

      @@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.

    • @manoelpanev0074
      @manoelpanev0074 Рік тому

      @@rajivn3707 So you make the token to read or write?

  • @smerlinger
    @smerlinger Рік тому +1

    Doesn't stable diffusion have an API you can use?

  • @raizel-sama9048
    @raizel-sama9048 Рік тому +1

    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

  • @cissy212
    @cissy212 Рік тому +1

    this was awesome!!! thank you!!

  • @srirambharadwaj1937
    @srirambharadwaj1937 Рік тому

    can you please tell us where you imported StableDiffusionPipeline from?

  • @FlowerNewton
    @FlowerNewton 2 роки тому +1

    This video was godsent. Thanks !

  • @meanamin2463
    @meanamin2463 2 роки тому +1

    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

    • @muffinmuncher
      @muffinmuncher 2 роки тому

      its his api token from huggingface

  • @ankitporwal6317
    @ankitporwal6317 Рік тому +1

    how can i run this project on my pc

  • @kamikaze9271
    @kamikaze9271 Рік тому

    Would it be feasible to do this on an EC2 CPU instance?

  • @ronakttawde
    @ronakttawde 2 роки тому +12

    I am the winner 😎😎

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +1

      Wait...did you actually?! If so CONGRATS! Ronak!

    • @ronakttawde
      @ronakttawde 2 роки тому +1

      See the log and decide whether I am the winner or not

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +1

      There’s logs for Amazon gift cards?😅 lol I need to go check this out.

  • @pratyushpattnaik2960
    @pratyushpattnaik2960 2 роки тому +2

    can you try including GCP and docker containerization with ur models??

  • @itsme-gc7dx
    @itsme-gc7dx Рік тому

    Is there any way to build background diffusion based on your own image ?

  • @g.s.3389
    @g.s.3389 2 роки тому +3

    can you make a video with yolo 7?

  • @TaskMask56
    @TaskMask56 Рік тому +1

    It says NSFW content detected with anything i write like 'a cat' etc how to fix this?

  • @ansrmn9390
    @ansrmn9390 11 місяців тому

    Hi, I want to change the model. Where do I fix it? Can you please tell me?

  • @ndumisomhlongo1125
    @ndumisomhlongo1125 2 роки тому

    yo Nick did you take the write or read auth key

  • @PrabhuKiranKonda
    @PrabhuKiranKonda 2 роки тому +1

    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.

  • @0lange
    @0lange 2 роки тому

    If would be great if you could make a video on on a python/javascript project using the new dalle 2 api

  • @nidalidais9999
    @nidalidais9999 2 роки тому +1

    Very nice job 👍🙂

  • @hieule4882
    @hieule4882 8 місяців тому

    How can i add lora in this project and using it on website

  • @reubenthomas1033
    @reubenthomas1033 2 роки тому

    Awesome! More of these full stack end2end vids!

  • @oyewalephilip9113
    @oyewalephilip9113 Рік тому

    Please how can I host this on cloud and have it as a website?

  • @AsianDrip-z5j
    @AsianDrip-z5j Рік тому

    what kind of virtual environment is he using can anyone tell me

  • @koo4838
    @koo4838 Рік тому

    hi there,
    it's auth_token is stability sdk api key?

  • @Rezarak
    @Rezarak Рік тому

    Could I also do this in Angular ?

  • @yolow8126
    @yolow8126 2 роки тому

    How do you even do this without planning

  • @chaitanyabagwe582
    @chaitanyabagwe582 2 роки тому

    Bro,I'm getting a RuntimeError
    "RuntimeError: Unable to find a valid cuDNN algorithm to run convolution"

  • @Fedelios1
    @Fedelios1 Рік тому

    Error with CUDA here, and i have a GPU. Cant install the enviroment properly

  • @kevinalexandercuellarochoa6773

    where i get the auth token?

  • @bob-uchiha
    @bob-uchiha 2 роки тому

    Hey Nick can you do that reinforcement learning for trading again. Getting so many errors due to new version of packages

  • @natnaelfikre1587
    @natnaelfikre1587 Рік тому

    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.

  • @swamikannan943
    @swamikannan943 2 роки тому

    That looks more Red ahemmm at 33:36 than Merce...ahem 🤣🤣, SD does not follow F1

  • @jairusdelosreyes-w4k
    @jairusdelosreyes-w4k Рік тому

    Will this run on a 4gb GPU?

  • @faramarzzrn
    @faramarzzrn 2 роки тому

    @nicholas do you have a course that learns from zero?

    • @faramarzzrn
      @faramarzzrn 2 роки тому

      deep learning and machine learning

  • @Arvolve
    @Arvolve Рік тому

    Fantastic content!

  • @ehisom
    @ehisom Рік тому

    Hi, please anyone, what is suppose to be inside the info.txt

  • @rohitashwapratapsingh142
    @rohitashwapratapsingh142 2 роки тому

    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?

  • @aiforeveryone2941
    @aiforeveryone2941 2 роки тому +1

    firing everyone

  • @ashleysami1640
    @ashleysami1640 2 роки тому +1

    Damn missed out on the gift card 😅

  • @lahatcisse1262
    @lahatcisse1262 2 роки тому +1

    I swear you the best

  • @romanemul1
    @romanemul1 2 роки тому +1

    Thank you

  • @athencoder
    @athencoder 2 роки тому +1

    Awesome ❤️

  • @gabscastrobsb
    @gabscastrobsb 2 роки тому +1

    That's gold!

  • @jennyspark9060
    @jennyspark9060 6 місяців тому

    13:23

  • @johnzhu6785
    @johnzhu6785 11 місяців тому

    my mac M1 doesn't have cuda

  • @haskelllisp5998
    @haskelllisp5998 Рік тому

    cool stuff

  • @GSds657
    @GSds657 Рік тому

    very nice

  • @jabransaeed6155
    @jabransaeed6155 2 роки тому

    he's kind of a noob at react. but thats okay. pretty good at python

  • @FunCodingwithRahul
    @FunCodingwithRahul 2 роки тому

    How cool....

  • @maxxflyer
    @maxxflyer Рік тому

    why python?!?

  • @Jaybaas
    @Jaybaas 2 роки тому +1

    👏🏾🔥

  • @jjanx4820
    @jjanx4820 2 роки тому

    drama is so unnecessary we know that you already made or have some sort of reference for the code

  • @geekwithdasause
    @geekwithdasause 2 роки тому +1

    First!!!

    • @NicholasRenotte
      @NicholasRenotte  2 роки тому +1

      Daymn, first, second and third! Cheers @Ayomide!

  • @geekwithdasause
    @geekwithdasause 2 роки тому +1

    Second!!!

  • @geekwithdasause
    @geekwithdasause 2 роки тому +1

    Third!!!

  • @Kev4ik
    @Kev4ik 2 роки тому

    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?

  • @linkvideos.charles3563
    @linkvideos.charles3563 2 роки тому

    Hi Nick please I need your help in research i am working on using the prophet model- how can I contact you its urgent

  • @EyesGape
    @EyesGape 2 роки тому

    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

  • @131mohammadubaida6
    @131mohammadubaida6 Рік тому

    While running there is always an error unet\diffusion_pytorch_model.safetensors not found help me how can I solve it @NicholasRenotte

  • @zerox9646
    @zerox9646 11 місяців тому

    funny man