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
can you do a video to train the model using custom prompt and image dataset
How to resolve the following error "RuntimeError: Device type CUDA is not supported for torch.Generator() api" sir?!!
change the runtime type to GPU
Hey can you guide how to change the runtime to GPU.
@@samithashen1665
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
Yes we can discuss
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
sir, is the mode of communication through this platform or in other way? as this would be visible publicly@@DataScienceDiaries
@@silent_killer712 you can connect me on whatsapp at this number -9560471199
I've pinged the message number ending with 0590@@DataScienceDiaries
Why have code , unused libraries??
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.
We can do that ...the only thing is that we need hindi dataset to retrain the model
@@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.
@@meg33333 let me get something relevant for you ...allow me sometime
@@DataScienceDiaries ok sir.
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
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??
Its very difficult to pin point the root cause with this limited information..possibly you should check your dependancy are not correctly configured..
---------------------------------------------------------------------------
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
I am trying to use runwayml/stable-diffusion-v1-5 model for image generation. do i need to download the .ckpt file for it ?
This is amazing 👏
i complete my whole code but i didnot recevie image ?
i do mistake in token?
Its working 100%🎉
Is these real
How much time it will take to execute?
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?
@@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
@@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😊
image is not generate that is loading
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.
Check this video - th-cam.com/video/27o9AmcxFJ0/w-d-xo.htmlsi=Y0abdzpQiHLdfI9C
Sir I need a model that can extract text from medicine strip ...can you help me to this model build
try entity extraction using document AI
sir i had an error of RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' in the last generate line of code
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
Is code to vs code pe chalayenge to chalega kya ?
@@HimanshiRao-mo9lj yes it can run on any code editor provided venv is correctly configured
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
Generating image is a heavy task ..so if you have GPU then it would be fast
sir can you make detailed on the project ??
@@Dev.coding I have already created , Here is the link - th-cam.com/video/27o9AmcxFJ0/w-d-xo.htmlsi=4tSr8GuQlrt7qwyZ
CUDA driver version is insufficient for CUDA runtime version error throws ...how i solve it
?
As the error state that the CUDA driver version is insufficient..first thing you can try is upgrading CUDA version
@@DataScienceDiaries how I will update it
Can you please guide me
@@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
bhai libraries import k bad jo ap code ly k ay hn woh kahan sy r kaisy ly k ay hn
I followed official documents how to use those libraries
in git hub there I cannot find the code please can you share it with me
github.com/MandeepKharb/TH-cam/blob/main/GenerativeAI/TextToImageGenerator.ipynb
Hi how can i use custom data to generate line drawing
@@NehaKothari-iz3hy you may need to fine tune the model.on your custom dataset
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
awsm, thanks a lot
How to download this dataset
Sir runtime error aa raha hai code main class cfg per kya kare sir
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
sir completet line by line chezain understand krwaya krain
@@Lets_do_code-vl7im sure and thanks for your suggestion
sir iam getting an error at cuda driver version is insufficent
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')
if you are doing this in google colab, go to runtime>change runtime type to GPU and run again.
Sir could you please how to run this in local host .
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.
Thank you sir
Is there any errors in this
Nope no error..its a working code
thanks a lot
Thankyou so much brother very helpfull and 100% working
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
Or suna do sir k haal hai aapke
is this free?
Yes
Is hugging face api paid
No its not paid
sir, can you kindly provide the source code??????
For source code pls whatsapp me - 9560471199
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'
Seems some.issue with your pytorch setup..try to setup with clean environment and then retry