Flux Super Portrait Lo R A
strangerzonehfIntroduction
Flux-Super-Portrait-LoRA is a text-to-image diffusion model designed to generate high-quality, detailed portraits. It utilizes LoRA (Low-Rank Adaptation) techniques to enhance the text-to-image generation capabilities, making it suitable for creating diverse and vivid portrait images.
Architecture
The model is built on the base model "black-forest-labs/FLUX.1-dev" and leverages diffusion techniques to transform text prompts into images. It uses LoRA for fine-tuning, allowing for efficient adaptation and improved performance in generating portrait images.
Training
The model was trained using the AdamW optimizer with a constant learning rate scheduler. It incorporates noise handling parameters such as a noise offset of 0.03 and multiresolution noise discount of 0.1. The training involved 19 images at a resolution of 4K, repeated over 14 epochs with steps set to 2650 per epoch.
Guide: Running Locally
-
Setup Environment:
- Install PyTorch and Hugging Face's
transformers
library. - Ensure you have access to a GPU for optimal performance.
- Install PyTorch and Hugging Face's
-
Load the Model:
import torch from pipelines import DiffusionPipeline base_model = "black-forest-labs/FLUX.1-dev" pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16) lora_repo = "strangerzonehf/Flux-Super-Portrait-LoRA" trigger_word = "Super Portrait" pipe.load_lora_weights(lora_repo) device = torch.device("cuda") pipe.to(device)
-
Generate Images:
- Use the trigger word "Super Portrait" to produce images based on your text descriptions.
-
Cloud GPUs:
- Consider using cloud services like AWS, Google Cloud, or Azure for access to high-performance GPUs.
License
The model is licensed under the CreativeML Open RAIL-M license, which allows for open and collaborative use, with certain restrictions and responsibilities outlined in the license agreement.