flux-booru-v0.2
This is a LyCORIS adapter derived from terminusresearch/flux-booru-v0.2.
The main validation prompt used during training was:
A photo-realistic image of a cat
Validation settings
- CFG:
4.0
- CFG Rescale:
0.0
- Steps:
20
- Sampler:
None
- Seed:
42
- Resolution:
1024x1024
Note: The validation settings are not necessarily the same as the training settings.
You can find some example images in the following gallery:
The text encoder was not trained.
You may reuse the base model text encoder for inference.
Training settings
- Training epochs: 0
- Training steps: 8000
- Learning rate: 0.0001
- Max grad norm: 1.0
- Effective batch size: 32
- Micro-batch size: 4
- Gradient accumulation steps: 1
- Number of GPUs: 8
- Prediction type: flow-matchingNone
- Rescaled betas zero SNR: False
- Optimizer: adamw_bf16
- Precision: Pure BF16
- Quantised: No
- Xformers: Not used
- LyCORIS Config:
{
"algo": "lokr",
"multiplier": 1.0,
"linear_dim": 10000,
"linear_alpha": 1,
"factor": 4,
"apply_preset": {
"target_module": [
"FluxTransformer2DModel"
],
"module_algo_map": {
"Attention": {
"factor": 4
},
"FeedForward": {
"factor": 2
}
}
}
}
Datasets
celebrities
- Repeats: 0
- Total number of images: ~3960
- Total number of aspect buckets: 22
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
comicstrips
- Repeats: 0
- Total number of images: ~1624
- Total number of aspect buckets: 48
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
movieposters
- Repeats: 0
- Total number of images: ~3144
- Total number of aspect buckets: 19
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
normalnudes
- Repeats: 0
- Total number of images: ~1304
- Total number of aspect buckets: 22
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
propagandaposters
- Repeats: 0
- Total number of images: ~1456
- Total number of aspect buckets: 19
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
guys
- Repeats: 100
- Total number of images: ~464
- Total number of aspect buckets: 19
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
pixel-art
- Repeats: 100
- Total number of images: ~1224
- Total number of aspect buckets: 18
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
signs
- Repeats: 0
- Total number of images: ~448
- Total number of aspect buckets: 14
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
moviecollection
- Repeats: 0
- Total number of images: ~2016
- Total number of aspect buckets: 24
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
bookcovers
- Repeats: 0
- Total number of images: ~936
- Total number of aspect buckets: 15
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
nijijourney
- Repeats: 0
- Total number of images: ~1520
- Total number of aspect buckets: 27
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
experimental
- Repeats: 0
- Total number of images: ~3152
- Total number of aspect buckets: 24
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
ethnic
- Repeats: 0
- Total number of images: ~3184
- Total number of aspect buckets: 22
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
sports
- Repeats: 0
- Total number of images: ~880
- Total number of aspect buckets: 17
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
gay
- Repeats: 0
- Total number of images: ~1176
- Total number of aspect buckets: 21
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
architecture
- Repeats: 0
- Total number of images: ~4472
- Total number of aspect buckets: 25
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
shutterstock
- Repeats: 0
- Total number of images: ~21200
- Total number of aspect buckets: 17
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
cinemamix-1mp
- Repeats: 0
- Total number of images: ~7440
- Total number of aspect buckets: 5
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
nsfw-1024
- Repeats: 100
- Total number of images: ~10888
- Total number of aspect buckets: 1
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
anatomy
- Repeats: 5
- Total number of images: ~16520
- Total number of aspect buckets: 2
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
bg20k-1024
- Repeats: 0
- Total number of images: ~89480
- Total number of aspect buckets: 8
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
yoga
- Repeats: 0
- Total number of images: ~3696
- Total number of aspect buckets: 20
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
photo-aesthetics
- Repeats: 0
- Total number of images: ~33288
- Total number of aspect buckets: 8
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
text-1mp
- Repeats: 5
- Total number of images: ~13312
- Total number of aspect buckets: 2
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
sfwbooru
- Repeats: 0
- Total number of images: ~639104
- Total number of aspect buckets: 21
- Resolution: 1.048576 megapixels
- Cropped: False
- Crop style: None
- Crop aspect: None
Inference
import torch
from diffusers import DiffusionPipeline
from lycoris import create_lycoris_from_weights
model_id = 'terminusresearch/flux-booru-v0.2'
adapter_id = 'pytorch_lora_weights.safetensors'
lora_scale = 1.0
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
wrapper.merge_to()
prompt = "A photo-realistic image of a cat"
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
image = 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(1641421826),
width=1024,
height=1024,
guidance_scale=4.0,
).images[0]
image.save("output.png", format="PNG")