đ reddy-v4
This project is a standard PEFT LoRA derived from black-forest-labs/FLUX.1-dev, aiming to generate high - quality text - to - image results.
đ Quick Start
Prerequisites
Make sure you have the necessary libraries installed, such as torch
and diffusers
.
Inference Steps
import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'Unmapped2895/reddy-v4'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
pipeline.load_lora_weights(adapter_id)
prompt = "Realistic wide shot photo of woman posing in a luxurious satin lingerie set, featuring a plunging bra, delicate thong and a classic garter belt with black stockings. The satin lingerie shimmers softly in the light, and the cut emphasizes both sophistication and a hint of allure. The lingerie is detailed with fine lace edges, highlighting her alluring figure. She elegantly styled hair as if getting ready for a formal event. The photo has a cinematic quality with rays of light and dramatic play of shadow and light"
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
model_output = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
width=832,
height=1216,
guidance_scale=3.5,
).images[0]
model_output.save("output.png", format="PNG")
⨠Features
- Derived from black-forest-labs/FLUX.1-dev, leveraging its powerful text - to - image generation capabilities.
- The text encoder was not trained, allowing for the reuse of the base model text encoder for inference.
- Multiple validation and training settings are provided to ensure the quality and flexibility of the model.
đĻ Installation
There is no specific installation process provided in the original document. You need to install the required libraries according to the inference code, such as torch
and diffusers
.
đ Documentation
Validation settings
Property |
Details |
CFG |
3.5 |
CFG Rescale |
0.0 |
Steps |
20 |
Sampler |
FlowMatchEulerDiscreteScheduler |
Seed |
42 |
Resolution |
832x1216 |
Skip - layer guidance |
|
Note: The validation settings are not necessarily the same as the training settings.
You can find some example images in the following gallery:
Training settings
Property |
Details |
Training epochs |
10 |
Training steps |
2000 |
Learning rate |
0.0001 |
Learning rate schedule |
constant |
Warmup steps |
500 |
Max grad value |
2.0 |
Effective batch size |
1 |
Micro - batch size |
1 |
Gradient accumulation steps |
1 |
Number of GPUs |
1 |
Gradient checkpointing |
True |
Prediction type |
flow - matching (extra parameters=['shift=3', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all']) |
Optimizer |
adamw_bf16 |
Trainable parameter precision |
Pure BF16 |
Base model precision |
no_change |
Caption dropout probability |
10.0% |
LoRA Rank |
16 |
LoRA Alpha |
None |
LoRA Dropout |
0.1 |
LoRA initialisation style |
default |
Datasets
reddy - v2 - 512
Property |
Details |
Repeats |
10 |
Total number of images |
13 |
Total number of aspect buckets |
1 |
Resolution |
0.262144 megapixels |
Cropped |
False |
Crop style |
None |
Crop aspect |
None |
Used for regularisation data |
No |
reddy - v2 - 1024
Property |
Details |
Repeats |
10 |
Total number of images |
5 |
Total number of aspect buckets |
1 |
Resolution |
1.048576 megapixels |
Cropped |
False |
Crop style |
None |
Crop aspect |
None |
Used for regularisation data |
No |
đ License
The license is other.