Text-to-Image
Diffusers
flux2
flux2-diffusers
image-to-image
simpletuner
Not-For-All-Audiences
lora
template:sd-lora
lycoris
Instructions to use gattaplayer/besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use gattaplayer/besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-9B", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("gattaplayer/besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02") prompt = "unconditional (blank prompt)" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02
This is a LyCORIS adapter derived from black-forest-labs/FLUX.2-klein-base-9B.
No validation prompt was used during training.
None
Validation settings
- CFG:
None - CFG Rescale:
0.0 - Steps:
20 - Sampler:
FlowMatchEulerDiscreteScheduler - Seed:
None - 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:

- Prompt
- unconditional (blank prompt)
- Negative Prompt

- Prompt
- A young woman with voluminous curly white hair with pink-tipped curls, eyes closed, mouth wide open laughing joyfully, one arm raised high stretching upward, other hand holding a smartphone to her ear. She wears a loose dark olive oversized t-shirt. Soft pink and lavender interior background with plush stuffed toys visible behind her. Bold dark ink outlines with variable line weight, flat graphic illustration style with loose expressive brushwork, scattered decorative star shapes floating around the figure, selective halftone dot texture on shadow and midtone areas, in besch style
- Negative Prompt

- Prompt
- A young woman with long straight black hair whipping in motion, oversized shield sunglasses, trucker cap, open shirt, pleated mini skirt with chain belt, white platform boots, neon pink fluffy handbag swinging outward. Dynamic diagonal composition, full body action walking pose. Radiating speed lines fanning out from corner, decorative speed lines as background graphic element. Bold dark ink outlines with variable line weight, vivid saturated neon color palette, flat graphic illustration style with loose expressive brushwork, neon colored rim lighting outlining figure silhouette, bold thick dark outline tracing entire figure silhouette, scattered paint splatter droplets and dripping watercolor streaks, in besch style
- Negative Prompt

- Prompt
- besch style, tight close-up three-quarter composition, two figures locked in intense emotional embrace, merged silhouette cluster, minimal negative space between bodies, young dark-skinned man with long flowing blonde-white hair blown diagonally across composition, hair separated into faceted angular planes with sharp highlight edges and internal strand breakup, eyes closed, calm protective expression, wearing dark leather jacket with gold trim, studded panels, layered gold chains, exaggerated white fur shoulder collar rendered with multi-plane texture segmentation and value stepping, young pale-skinned girl with multicolored pink, cyan and magenta braided hair, visible tear droplets catching highlight light, blue flower accessory, clutching him tightly with fingers pressing into fabric, emotional relief expression, interlocking arms, overlapping silhouettes, compressed space framing, bodies forming a unified mass shape, soft pink and warm orange watercolor wash background with visible brush grain, scattered paint splatter droplets, subtle drip streaks, layered painterly backdrop texture, multi-plane shadow segmentation instead of smooth gradients, micro-contrast within shadow areas, secondary rim light separating hair from background, warm-to-cool edge lighting transitions, localized saturation accents in midtones, bold dark ink outlines with variable line weight hierarchy, stronger contour on outer silhouette, thinner contour on interior overlap lines, flat segmented color planes combined with layered painterly planes, faceted hair masses with highlight cuts, textured fur plane separation, graphic high contrast mode but with rich internal tonal variation, no empty flat shadow blocks, no smooth airbrush gradients, emphasize value stepping and structural shadow carving
- Negative Prompt

- Prompt
- A young slim transgender woman with straight shoulder-length hair, snapback cap tilted to one side, cropped sports top, striped arm warmers, tiny ruffled micro skirt with studded belt, fishnet stockings, striped thigh-high socks, high-top sneakers, layered wrist bracelets. Full body standing pose with relaxed hip tilt. Entirely rendered in monochromatic pink tones ranging from light pastel pink to deep magenta. Isolated figure on flat background. Bold dark ink outlines with variable line weight, flat graphic illustration style with loose expressive brushwork, simplified planar construction, selective halftone dot texture on shadow and midtone areas, scattered decorative star shapes floating around the figure, in besch style
- Negative Prompt

- Prompt
- besch style, tight close-up three-quarter composition, two figures locked in intense emotional embrace, merged silhouette cluster, minimal negative space between bodies, young dark-skinned man with long flowing blonde-white hair blown diagonally across composition, hair separated into faceted angular planes with sharp highlight edges and internal strand breakup, eyes closed, calm protective expression, wearing dark leather jacket with gold trim, studded panels, layered gold chains, exaggerated white fur shoulder collar rendered with multi-plane texture segmentation and value stepping, young pale-skinned girl with multicolored pink, cyan and magenta braided hair, visible tear droplets catching highlight light, blue flower accessory, clutching him tightly with fingers pressing into fabric, emotional relief expression, interlocking arms, overlapping silhouettes, compressed space framing, bodies forming a unified mass shape, soft pink and warm orange watercolor wash background with visible brush grain, scattered paint splatter droplets, subtle drip streaks, layered painterly backdrop texture, multi-plane shadow segmentation instead of smooth gradients, micro-contrast within shadow areas, secondary rim light separating hair from background, warm-to-cool edge lighting transitions, localized saturation accents in midtones, bold dark ink outlines with variable line weight hierarchy, stronger contour on outer silhouette, thinner contour on interior overlap lines, flat segmented color planes combined with layered painterly planes, faceted hair masses with highlight cuts, textured fur plane separation, graphic high contrast mode but with rich internal tonal variation, no empty flat shadow blocks, no smooth airbrush gradients, emphasize value stepping and structural shadow carving
- Negative Prompt

- Prompt
- besch style, full body character sheet, symmetrical frontal composition, silhouette isolation, negative-space reinforcement, elongated fashion silhouette, extreme S-curve pose, strong hip counter-rotation, oversized head with reduced chin, angular jawline, sculpted cheek planes, planar facial shadow blocks, faceted cheek structure, luminous eye core, glowing iris, golden emissive iris core, multicolored reflections, elongated fingers, geometric finger segmentation, faceted hair planes, segmented hair mass, flowing unified hair mass, prismatic hair shading, stacked color blocks, bold dark ink outlines, heavy outer contour, variable line weight, chromatic edge separation, cyan-magenta contour offset, flat segmented color planes, planar shadow blocks, angular shadow segmentation, graphic high contrast mode, leopard-print micro bikini, bone necklace elements, primitive jungle accessories, spear with geometric shaft design, minimal white background, halftone dot accent behind figure, clean negative space, character turnaround sheet aesthetic
- Negative Prompt

- Prompt
- besch style, jungle cat tree composition, strong diagonal composition, triangular ensemble formation, layered depth staging, silhouette framing through gesture, young female character seated on thick tree branch, elongated fashion silhouette, torso slightly twisted, elongated legs draped downward, angular jawline, sculpted cheek planes, luminous eye core, golden emissive iris core, flowing segmented hair mass cascading behind her in faceted planes, Bagheera black panther below the branch in protective stance, head raised upward, mouth slightly open in controlled roar, visible fangs, sleek muscular body, planar shadow blocks on black fur, structured angular shadow segmentation, cyan rim lighting tracing panther silhouette, magenta edge separation on jawline and shoulders, luminous green feline eyes as secondary glow node, bold dark ink outlines, heavy outer contour, chromatic edge separation, cyan-magenta contour offset, stacked flat jungle foliage planes, vertical drip architecture, grain texture, splatter texture accents, controlled gradient restraint
- Negative Prompt

- Prompt
- A young dark-skinned man with layered blonde-white hair curling under at the collar, luminous cyan glowing iris eyes with internal eye glow, angular jawline, sculpted cheek planes. He wears a black leather studded jacket with gold trim and yellow diagonal sash, white fur collar puffs on shoulders, white t-shirt underneath, orange-gold studded jeans tucked into heavy black laced boots, a studded orange electric guitar slung across his back. Standing confident pose with direct intense gaze toward viewer. Painted textured background with loose brushstroke marks in dark teal tones. Bold dark ink outlines with variable line weight, flat graphic illustration style with loose expressive brushwork, planar facial shadow blocks, faceted hair planes with prismatic hair shading, warm-to-cool edge lighting, magenta rim light on hair contours, selective halftone dot texture on shadow and midtone areas, graphic high contrast mode, in besch style
- Negative Prompt

- Prompt
- besch style, stage spotlight composition, diagonal axis staging, radiant core anchor centered on face, multi-node focal hierarchy, Wedges singing into vintage microphone, eyes closed, mouth open mid-note, hands gripping mic with elongated fingers, extreme S-curve upper body gesture, luminous eye core glowing through closed lids, golden emissive iris core implied, soft blush on cheeks, hair curls illuminated by magenta rim light, warm-to-cool edge lighting carving silhouette, pink puff sleeves translucent under spotlight, gold corset embroidery reflecting warm light, layered tutu structured with planar shadow blocks, bold heavy contour lines, chromatic edge separation, magenta halo glow, halftone dot stage backdrop, orbiting particle staging like floating petals, vertical light beams behind
- Negative Prompt

- Prompt
- a haunting figure with green eyes framed by soft orange-blonde hair, gently caresses her lips, neon palette of pinks purples and blues creates an eerie glow around her the background dissolves into surreal drips, in besch style
- Negative Prompt

- Prompt
- a woman with long flowing hair in a seductive pose, her body highlighted by soft blue and pink neon lighting, she glances over her shoulder with an intense and mysterious expression, the background features abstract patterns with a retro-futuristic style, combining halftone dots and sharp angular lines, the lighting creates dramatic shadows, emphasizing her curves and giving the scene a vibrant yet moody atmosphere with a mix of sensuality and artistic flair, in besch style
- Negative Prompt

- Prompt
- A young woman with blonde twin pigtails with long ribbon tails and large bow, lace collar, puffer jacket, diamond bodysuit, denim shorts, fishnet stockings, wedge sneakers, baseball bat on shoulder. Full body standing pose with hip tilt. Isolated figure on flat background. Bold dark ink outlines with variable line weight, loose overlapping strokes, visible construction lines, broken contour hierarchy, stroke accumulation modeling, calligraphic brushwork, tonal mass construction, cross-hatching systems, hybrid sketch-to-render finish, incomplete edge transitions, hair as architectural mass with massive volumetric curls and ribbon-like segmentation, silhouette-driven construction, elastic proportional deformation, in besch style
- Negative Prompt

- Prompt
- A young woman in a white sleeveless top with large red-orange spiral swirl designs on the chest, white pleated mini skirt, gold star-decorated belt with spiral buckle, white helmet with red-orange spiral patterns and large round blue goggle eyes, flowing black cape with red lining, white gloves, one arm extended forward pointing dramatically. Dynamic diagonal composition, action pose mid-stride. Painted textured background with loose brushstroke marks and paint splatters. Bold dark ink outlines with variable line weight, vivid saturated neon color palette, flat graphic illustration style with loose expressive brushwork, planar facial shadow blocks, magenta rim light on cape and figure contours, warm-to-cool edge lighting, graphic high contrast mode, selective halftone dot texture on shadow and midtone areas, expressive sketch strokes, in besch style
- Negative Prompt

- Prompt
- besch style, full body young woman, punk street aesthetic, short dark hair with bold cyan and magenta streaks, large expressive eyes, confident mischievous expression, wearing hooded cropped denim jacket, layered tank tops, black shorts, patterned tights with circular motifs, platform sneakers with neon accents, fingerless gloves, layered accessories, dynamic slightly tilted pose, hand raised casually, subtle hip shift, bold contour hierarchy, flat segmented color planes, saturated accent lighting, graphic high contrast style
- Negative Prompt

- Prompt
- A young woman with blonde twin pigtails with long ribbon tails and large bow, lace collar, puffer jacket, diamond bodysuit, denim shorts, fishnet stockings, wedge sneakers, baseball bat on shoulder. Full body standing pose with hip tilt. Isolated figure on flat background. Bold dark ink outlines with variable line weight, loose overlapping strokes, visible construction lines, broken contour hierarchy, stroke accumulation modeling, calligraphic brushwork, tonal mass construction, cross-hatching systems, hybrid sketch-to-render finish, incomplete edge transitions, hair as architectural mass with massive volumetric curls and ribbon-like segmentation, silhouette-driven construction, elastic proportional deformation, in besch style
- Negative Prompt
The text encoder was not trained. You may reuse the base model text encoder for inference.
Training settings
- Training epochs: 24
- Training steps: 15000
- Learning rate: 3e-06
- Learning rate schedule: polynomial
- Warmup steps: 500
- Max grad value: 2.0
- Effective batch size: 4
- Micro-batch size: 2
- Gradient accumulation steps: 2
- Number of GPUs: 1
- Gradient checkpointing: True
- Prediction type: flow_matching[]
- Optimizer: optimi-lion (config=weight_decay=1e-3)
- Trainable parameter precision: Pure BF16
- Base model precision:
no_change - Caption dropout probability: 0.1%
LyCORIS Config:
{
"bypass_mode": true,
"algo": "lokr",
"multiplier": 1.0,
"linear_dim": 10000,
"linear_alpha": 1,
"factor": 16,
"full_matrix": true,
"apply_preset": {
"target_module": [
"Flux2Attention",
"Flux2FeedForward",
"Flux2ParallelSelfAttention"
],
"module_algo_map": {
"Flux2Attention": {
"factor": 16
},
"Flux2FeedForward": {
"factor": 16
},
"Flux2ParallelSelfAttention": {
"factor": 16
}
}
}
}
Datasets
BESCH-CROP-FLUX2-V02-512
- Repeats: 3
- Total number of images: 96
- Total number of aspect buckets: 6
- Resolution: 0.262144 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-CROP-FLUX2-V02-768
- Repeats: 3
- Total number of images: 95
- Total number of aspect buckets: 6
- Resolution: 0.589824 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-CROP-FLUX2-V02-1024
- Repeats: 3
- Total number of images: 16
- Total number of aspect buckets: 4
- Resolution: 1.048576 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-SKETCH-FLUX2-V02-512
- Repeats: 3
- Total number of images: 68
- Total number of aspect buckets: 18
- Resolution: 0.262144 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-SKETCH-FLUX2-V02-768
- Repeats: 3
- Total number of images: 42
- Total number of aspect buckets: 17
- Resolution: 0.589824 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-SKETCH-FLUX2-V02-1024
- Repeats: 3
- Total number of images: 15
- Total number of aspect buckets: 14
- Resolution: 1.048576 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-FINISHED-MEDIA-FLUX2-V02-512
- Repeats: 3
- Total number of images: 83
- Total number of aspect buckets: 15
- Resolution: 0.262144 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-FINISHED-MEDIA-FLUX2-V02-768
- Repeats: 3
- Total number of images: 77
- Total number of aspect buckets: 15
- Resolution: 0.589824 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
BESCH-FINISHED-MEDIA-FLUX2-V02-1024
- Repeats: 3
- Total number of images: 54
- Total number of aspect buckets: 11
- Resolution: 1.048576 megapixels
- Cropped: True
- Crop style: random
- Crop aspect: closest
- Used for regularisation data: No
Inference
import torch
from diffusers import DiffusionPipeline
from lycoris import create_lycoris_from_weights
def download_adapter(repo_id: str):
import os
from huggingface_hub import hf_hub_download
adapter_filename = "pytorch_lora_weights.safetensors"
cache_dir = os.environ.get('HF_PATH', os.path.expanduser('~/.cache/huggingface/hub/models'))
cleaned_adapter_path = repo_id.replace("/", "_").replace("\\", "_").replace(":", "_")
path_to_adapter = os.path.join(cache_dir, cleaned_adapter_path)
path_to_adapter_file = os.path.join(path_to_adapter, adapter_filename)
os.makedirs(path_to_adapter, exist_ok=True)
hf_hub_download(
repo_id=repo_id, filename=adapter_filename, local_dir=path_to_adapter
)
return path_to_adapter_file
model_id = 'black-forest-labs/FLUX.2-klein-base-9B'
adapter_repo_id = 'gattaplayer/besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02'
adapter_filename = 'pytorch_lora_weights.safetensors'
adapter_file_path = download_adapter(repo_id=adapter_repo_id)
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
lora_scale = 1.0
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_file_path, pipeline.transformer)
wrapper.merge_to()
prompt = "An astronaut is riding a horse through the jungles of Thailand."
negative_prompt = ''
## Optional: quantise the model to save on vram.
## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
#from optimum.quanto import quantize, freeze, qint8
#quantize(pipeline.transformer, weights=qint8)
#freeze(pipeline.transformer)
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
model_output = pipeline(
prompt=prompt,
negative_prompt=negative_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=1024,
height=1024,
guidance_scale=None,
).images[0]
model_output.save("output.png", format="PNG")
- Downloads last month
- 11
Model tree for gattaplayer/besch-flux2-klein-9b-lokr-lion-3e-6-bs2-ga2-v02
Base model
black-forest-labs/FLUX.2-klein-base-9B