Text To Image Generator | Machine Learning Project | NLP Project | Hugging Face | Stable Diffusion

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025
  • In this video we discussed How we can create our own text to image generator using Hugging Face Stable Diffusion pretrained model. It is based upon generative AI technology.
    GitHub link for code of this exercise - github.com/Man...
    If you want to learn machine learning from scratch -
    Complete Machine Learning Tutorial Playlist For Beginners -
    • Machine Learning Tutor...
    IF you want to learn deep learning from scratch -
    Deep Learning Playlist - • Deep Learning Tutorial...
    Complete REST API Testing Playlist With Automation Framework In Java -
    • REST API Automation Fr...
    GIT repo for automation framework -
    github.com/Man...
    Connect with me -
    LinkedIn - / mandeep-singh-19b70928
    Facebook- / data-science-diaries-1...
    🙏🙏🙏🙏🙏🙏🙏🙏
    YOU JUST NEED TO DO
    3 THINGS to support my channel
    LIKE
    SHARE
    &
    SUBSCRIBE
    TO MY TH-cam CHANNEL

ความคิดเห็น • 84

  • @FemigistBlogspot1x1
    @FemigistBlogspot1x1 10 หลายเดือนก่อน +5

    can you do a video to train the model using custom prompt and image dataset

  • @anoopsaikashyap3241
    @anoopsaikashyap3241 ปีที่แล้ว +4

    How to resolve the following error "RuntimeError: Device type CUDA is not supported for torch.Generator() api" sir?!!

    • @samithashen1665
      @samithashen1665 ปีที่แล้ว +1

      change the runtime type to GPU

    • @priyankjetani1508
      @priyankjetani1508 11 หลายเดือนก่อน

      Hey can you guide how to change the runtime to GPU.
      @@samithashen1665

  • @silent_killer712
    @silent_killer712 ปีที่แล้ว +3

    this is very useful for me. I'm trying to build a story board builder with text in paragraphs as input & generate a story according to the text. Could you help me with that? I've done my abstract for the project too

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Yes we can discuss

    • @silent_killer712
      @silent_killer712 ปีที่แล้ว

      we are a team of 4 members, I'm requesting you to help us out with this project sir. If required I'll further provide the details of our project.
      THANK YOU

    • @silent_killer712
      @silent_killer712 ปีที่แล้ว

      sir, is the mode of communication through this platform or in other way? as this would be visible publicly@@DataScienceDiaries

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      @@silent_killer712 you can connect me on whatsapp at this number -9560471199

    • @silent_killer712
      @silent_killer712 ปีที่แล้ว

      I've pinged the message number ending with 0590@@DataScienceDiaries

  • @Slugyfashino
    @Slugyfashino วันที่ผ่านมา

    Why have code , unused libraries??

  • @meg33333
    @meg33333 ปีที่แล้ว +4

    Cool project. Sir can we modify this project for the Hindi language text to generate a set of images from our own dataset. I am currently working on this project if possible give your tips if possible. I am working on stackGAN but I am stuck if possible pls make a video regarding this.

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว +1

      We can do that ...the only thing is that we need hindi dataset to retrain the model

    • @meg33333
      @meg33333 ปีที่แล้ว +1

      @@DataScienceDiaries And how can we do that without API. Because as a beginner I donot have any idea I have seen multiple videos. Pls make a video regarding this. Hindi sentence to image ML.

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว +1

      @@meg33333 let me get something relevant for you ...allow me sometime

    • @meg33333
      @meg33333 ปีที่แล้ว

      @@DataScienceDiaries ok sir.

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว +1

      HI @meghwantsingh4362,
      I Just uploaded new video in which i created multilingual text to image generator , it can work for Hindi or any other language, it supports 133 languages. Checkout this video - th-cam.com/video/ozonbfnJntc/w-d-xo.html

  • @VennelaShree-b5j
    @VennelaShree-b5j ปีที่แล้ว +2

    RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' .........this is the error im getting while running the last part of the code,what i should to get rid of this??

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Its very difficult to pin point the root cause with this limited information..possibly you should check your dependancy are not correctly configured..

    • @VennelaShree-b5j
      @VennelaShree-b5j ปีที่แล้ว

      ---------------------------------------------------------------------------
      RuntimeError Traceback (most recent call last)
      in ()
      1 translation = get_translation("moon","en")
      ----> 2 generate_image(translation, image_gen_model)
      14 frames
      /usr/local/lib/python3.10/dist-packages/torch/nn/functional.py in layer_norm(input, normalized_shape, weight, bias, eps)
      2513 layer_norm, (input, weight, bias), input, normalized_shape, weight=weight, bias=bias, eps=eps
      2514 )
      -> 2515 return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
      2516
      2517
      RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
      can u find it out noww atleast

  • @aniketmore1410
    @aniketmore1410 8 หลายเดือนก่อน +1

    I am trying to use runwayml/stable-diffusion-v1-5 model for image generation. do i need to download the .ckpt file for it ?

  • @attitudeking6050
    @attitudeking6050 ปีที่แล้ว +1

    This is amazing 👏

  • @ruchijariwala9360
    @ruchijariwala9360 5 หลายเดือนก่อน

    i complete my whole code but i didnot recevie image ?
    i do mistake in token?

  • @avanthid76
    @avanthid76 4 หลายเดือนก่อน

    Its working 100%🎉

    • @indhu_.
      @indhu_. 4 หลายเดือนก่อน

      Is these real

    • @nihaasram4235
      @nihaasram4235 3 หลายเดือนก่อน

      How much time it will take to execute?

  • @anishbathurnisha6659
    @anishbathurnisha6659 6 หลายเดือนก่อน

    This video helps me a lot to get some idea for my project,Thank you sir. I am working under the sign langauge project where it will convert the text into respective sign language images ,Can you suggest something about it how I can do this?

    • @DataScienceDiaries
      @DataScienceDiaries  6 หลายเดือนก่อน +1

      @@anishbathurnisha6659 glad you liked it.
      To create your project first you need to find the dataset there are many different public repository available, try searching those.
      Then you need to.train and fine tune your model so for it you may need a high configuration machine.
      Else you can use some pretrained model or you can use any open source LLM and if required you can finetune it as per your requirement

    • @anishbathurnisha6659
      @anishbathurnisha6659 6 หลายเดือนก่อน

      ​@@DataScienceDiariesThanks for ur reply,Since I was new bee to ML,Can u make a video out of it .If u make it ,It would be a great help to develop our project😊

  • @Avvmspc_uravugal
    @Avvmspc_uravugal 3 หลายเดือนก่อน +2

    image is not generate that is loading

  • @awais6044
    @awais6044 ปีที่แล้ว

    Sir can we use this in our custom fine tunes table decision model. So that instead of writing a prompt we write a simple description and that relevant result is provided.

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Check this video - th-cam.com/video/27o9AmcxFJ0/w-d-xo.htmlsi=Y0abdzpQiHLdfI9C

  • @sksayrilamed4087
    @sksayrilamed4087 ปีที่แล้ว +1

    Sir I need a model that can extract text from medicine strip ...can you help me to this model build

    • @ayumdoes
      @ayumdoes ปีที่แล้ว

      try entity extraction using document AI

  • @JAGYANSUPADHY
    @JAGYANSUPADHY ปีที่แล้ว

    sir i had an error of RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' in the last generate line of code

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      With this small information its hard to debug, try to look for this issue on github and stackoverflow ..i am sure you would be able to resolve it

  • @HimanshiRao-mo9lj
    @HimanshiRao-mo9lj 2 หลายเดือนก่อน

    Is code to vs code pe chalayenge to chalega kya ?

    • @DataScienceDiaries
      @DataScienceDiaries  2 หลายเดือนก่อน

      @@HimanshiRao-mo9lj yes it can run on any code editor provided venv is correctly configured

  • @SachinBagale-i6t
    @SachinBagale-i6t 10 หลายเดือนก่อน

    Hi sir im my pc it is taking lot of time to run this particular code generate_image("astronaut in space", image_gen_model) im running it in visual studio how do i reduce this time i tried other approaches too but still it takes too much time 15 to 20 minutes approximately

    • @DataScienceDiaries
      @DataScienceDiaries  10 หลายเดือนก่อน

      Generating image is a heavy task ..so if you have GPU then it would be fast

  • @Dev.coding
    @Dev.coding 5 หลายเดือนก่อน

    sir can you make detailed on the project ??

    • @DataScienceDiaries
      @DataScienceDiaries  5 หลายเดือนก่อน

      @@Dev.coding I have already created , Here is the link - th-cam.com/video/27o9AmcxFJ0/w-d-xo.htmlsi=4tSr8GuQlrt7qwyZ

  • @SanketJadhav-de3pj
    @SanketJadhav-de3pj 11 หลายเดือนก่อน

    CUDA driver version is insufficient for CUDA runtime version error throws ...how i solve it
    ?

    • @DataScienceDiaries
      @DataScienceDiaries  11 หลายเดือนก่อน

      As the error state that the CUDA driver version is insufficient..first thing you can try is upgrading CUDA version

    • @SanketJadhav-de3pj
      @SanketJadhav-de3pj 11 หลายเดือนก่อน

      @@DataScienceDiaries how I will update it

    • @SanketJadhav-de3pj
      @SanketJadhav-de3pj 11 หลายเดือนก่อน

      Can you please guide me

    • @khushududeja2183
      @khushududeja2183 7 หลายเดือนก่อน

      @@SanketJadhav-de3pj i was having the same error . take help from chatgpt. it will give u steps on how to upgrade CUDA version. and simply u can copy paste that code

  • @azadahmed-r6b
    @azadahmed-r6b ปีที่แล้ว

    bhai libraries import k bad jo ap code ly k ay hn woh kahan sy r kaisy ly k ay hn

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      I followed official documents how to use those libraries

  • @Nehannehan-w5z
    @Nehannehan-w5z ปีที่แล้ว

    in git hub there I cannot find the code please can you share it with me

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      github.com/MandeepKharb/TH-cam/blob/main/GenerativeAI/TextToImageGenerator.ipynb

  • @NehaKothari-iz3hy
    @NehaKothari-iz3hy 7 หลายเดือนก่อน

    Hi how can i use custom data to generate line drawing

    • @DataScienceDiaries
      @DataScienceDiaries  7 หลายเดือนก่อน

      @@NehaKothari-iz3hy you may need to fine tune the model.on your custom dataset

  • @shreeniwaschaudhari7011
    @shreeniwaschaudhari7011 ปีที่แล้ว

    Hi sir
    I want to create fashion outfit recommendation system by gen Ai , can u please help me
    I have tried to use chat gbt API for it but credit are exhaust quickly i want to create like this model can u please 🥺 guide me

  • @nirvana903
    @nirvana903 ปีที่แล้ว

    awsm, thanks a lot

  • @Unavailable-vo3gb
    @Unavailable-vo3gb 6 หลายเดือนก่อน

    How to download this dataset

  • @vishvjeetkhandekar2111
    @vishvjeetkhandekar2111 ปีที่แล้ว

    Sir runtime error aa raha hai code main class cfg per kya kare sir

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Won't be able to guide with this very less information..i recommend you to Google your error and that way you would learn to fix ...good luck

  • @Lets_do_code-vl7im
    @Lets_do_code-vl7im 5 หลายเดือนก่อน

    sir completet line by line chezain understand krwaya krain

    • @DataScienceDiaries
      @DataScienceDiaries  5 หลายเดือนก่อน

      @@Lets_do_code-vl7im sure and thanks for your suggestion

  • @srimanMalyala
    @srimanMalyala ปีที่แล้ว

    sir iam getting an error at cuda driver version is insufficent

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      It says that your cuda version is not sufficient ...if your.machine don't have GPU then you can face such issue..try to run code via CPU by using condition something like below -
      device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

    • @zzzz-bf1qc
      @zzzz-bf1qc ปีที่แล้ว

      if you are doing this in google colab, go to runtime>change runtime type to GPU and run again.

  • @rajusambangi7723
    @rajusambangi7723 ปีที่แล้ว

    Sir could you please how to run this in local host .

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      You can check this video....
      th-cam.com/video/27o9AmcxFJ0/w-d-xo.html
      .in this i have created complete project and run it on local ..make sure your local machine have GPU on it ...if not it may take time upto 1-2 hrs to generate image from text depending upon your machine configuration.

  • @adityag6022
    @adityag6022 ปีที่แล้ว

    Thank you sir

  • @rohithbehara-w9j
    @rohithbehara-w9j ปีที่แล้ว

    Is there any errors in this

  • @ankitvariya6658
    @ankitvariya6658 7 หลายเดือนก่อน

    thanks a lot

  • @funshorts9339
    @funshorts9339 ปีที่แล้ว

    Thankyou so much brother very helpfull and 100% working

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Glad you liked it..i have extended it into complete project ...please check that also - th-cam.com/video/27o9AmcxFJ0/w-d-xo.htmlsi=MnBaIIzPIyQQqI0v

  • @Mr_Gill_
    @Mr_Gill_ 7 หลายเดือนก่อน

    Or suna do sir k haal hai aapke

  • @pulkitgupta669
    @pulkitgupta669 ปีที่แล้ว

    is this free?

  • @mohitnegi6264
    @mohitnegi6264 ปีที่แล้ว

    Is hugging face api paid

  • @Avictory.
    @Avictory. 10 หลายเดือนก่อน

    sir, can you kindly provide the source code??????

    • @DataScienceDiaries
      @DataScienceDiaries  10 หลายเดือนก่อน

      For source code pls whatsapp me - 9560471199

  • @KavyaChilukuri
    @KavyaChilukuri ปีที่แล้ว

    how can this error be solved
    RuntimeError Traceback (most recent call last)
    in ()
    1 translation = get_translation("ప్రజలు హోలీ జరుపుకుంటున్నారు","en")
    ----> 2 generate_image(translation, image_gen_model)
    14 frames
    /usr/local/lib/python3.10/dist-packages/torch/nn/functional.py in layer_norm(input, normalized_shape, weight, bias, eps)
    2513 layer_norm, (input, normalized_shape, weight=weight, bias=bias, eps=eps)
    2514 )
    -> 2515 return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
    2516
    2517
    RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'

    • @DataScienceDiaries
      @DataScienceDiaries  ปีที่แล้ว

      Seems some.issue with your pytorch setup..try to setup with clean environment and then retry