kailashtryonlabs's picture
Update README.md
badfb7e verified
|
raw
history blame
2.08 kB
metadata
tags:
  - text-to-image
  - lora
  - diffusers
  - template:diffusion-lora
base_model: black-forest-labs/FLUX.1-dev
instance_prompt: lehenga
license: other
license_name: flux-1-dev-non-commercial-license
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
language:
  - en

FLUX.1-dev LoRA Lehenga Generator

Model description

FLUX.1-dev LoRA Lehenga Generator can create an image of Lehenga by detailing the color, pattern, fit, style, material, and type.

Repository used

AI Toolkit by Ostris https://github.com/ostris/ai-toolkit

Use it with the 🧨 diffusers library

import random
from diffusers import FluxPipeline
import torch

MAX_SEED=42
PRE_TRAINED_MODEL = "black-forest-labs/FLUX.1-dev"
FINE_TUNED_MODEL = "tryonlabs/FLUX.1-dev-LoRA-Lehenga-Generator"

# Load Flux.1-dev
pipe = FluxPipeline.from_pretrained(PRE_TRAINED_MODEL, torch_dtype=torch.float16).to("cuda")

# Load fine-tuned model
pipe.load_lora_weights(FINE_TUNED_MODEL, adapter_name="default", weight_name="lehenga-generator.safetensors")

seed = random.randint(0, MAX_SEED)
generator = torch.Generator().manual_seed(seed)
prompt = "A flat lay image of a lehenga with a pink solid pattern and traditional style is elegantly fitted, showcasing a floor-length hemline that flows beautifully. Crafted from luxurious silk, this garment features a stretchy fabric that ensures comfort and a flattering fit. The lehenga is sleeveless, allowing for unrestricted movement, and it is adorned with a sweetheart neckline that adds a touch of femininity. The fitted waistline accentuates the wearer's silhouette, making it a stunning choice for special occasions."
image = pipe(prompt, height=1024, width=1024, num_images_per_prompt=1, generator=generator, guidance_scale=4.5, num_inference_steps=40).images[0]

image.save("gen_image.jpg")

Download model

Weights for this model are available in Safetensors format.

Download them in the Files & versions tab.