SahansilvaDev / Text-to-Image-Generation-Flux-with-LoRA

using FLUX Dev to develop custom LoRA for generate your own images what you desire.

Repository from Github https://github.comSahansilvaDev/Text-to-Image-Generation-Flux-with-LoRARepository from Github https://github.comSahansilvaDev/Text-to-Image-Generation-Flux-with-LoRA

Text-to-Image-Generation-Flux-with-LoRA

using FLUX Dev to develop custom LoRA for generate your own images what you desire.

this dreambooth stable diffusion file can generate images using T4
other files run to requires A100 GPU

easy and more cost effective way to build flux with loRa is using replicate site.
https://replicate.com/blog/fine-tune-flux

Dataset Preparation

Here are some guidelines:

Use 12-20 images for best results
Use large images if possible
Use JPEG or PNG formats
Optionally, create a corresponding .txt file for each image with the same name, containing the caption
(if your using replicate site to train the model you do not need to worry above dataset Preparation guidelines, just need only images with variations)

if you use replicate site

  1. create account and add your credit card
  2. search flux - (ostris/flux-dev-lora-trainer)
  3. then go to hugging face and login
  4. and zip your images file
  5. and go to replicate flux model train tab
  6. and create a model using [destination box clicking]
  7. upload your images zip file to [imput images box]
  8. trigger word - does not include in promt
  9. steps(epochs) 1000 default (if increase steps size it would be good)
  10. then go to hugging face and create new model and give name and save it plublically
  11. then put hugging face model repo id to replicate site flux model train tab [hf_repo_id box]
  12. then hugging face --> access tokens---> create token-->give reporitories permissions ot created model ---> generate token and copy it
  13. then go to replicate site flux model train tab [hf_token box] input the copied token this box
  14. create training button

DREAM BOOTH method from Google research (subject driven generation) [trigger word]

https://dreambooth.github.io/

https://colab.research.google.com/github/KaliYuga-ai/DreamBoothV2fork/blob/main/DreamBooth_Stable_Diffusion_V2.ipynb?authuser=1#scrollTo=hFh6Y1Mitl7g

Run the trained models using Comfyui

https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#installing

https://comfyuiweb.com/#ai-image-generator

Resources,

https://www.mlexpert.io/blog/flux-1-dev
https://github.com/ostris/ai-toolkit
https://colab.research.google.com/drive/1jbUqiqM2e_wDvNAuH6Fz61c2-I1y9siQ?authuser=1#scrollTo=zl-S0m3pkQC5
https://openart.ai/blog/post/stable-diffusion-prompts-for-profile-picture

About

using FLUX Dev to develop custom LoRA for generate your own images what you desire.


Languages

Language:Jupyter Notebook 100.0%