https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4B
import torch
from diffusers import Flux2KleinPipeline
device = "cuda"
dtype = torch.bfloat16
pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-4B", torch_dtype=dtype)
pipe.enable_model_cpu_offload() # save some VRAM by offloading the model to CPU
prompt = "A cat holding a sign that says hello world"
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=4.0,
num_inference_steps=50,
generator=torch.Generator(device=device).manual_seed(0)
).images[0]
image.save("flux-klein.png") |
Prompt: photorealistic girl in bookshop choosing the book in romantic stories shelf. smiling
Prompt: Create a close-up photograph of a woman's face and hand, with her hand raised to her chin. She is wearing a white blazer and has a gold ring on her finger. Her nails are neatly manicured and her hair is pulled back into a low bun. She is smiling and has a radiant expression on her face. The background is a plain light gray color. The overall mood of the photo is elegant and sophisticated. The photo should have a soft, natural light and a slight warmth to it. The woman's hair is dark brown and pulled back into a low bun, with a few loose strands framing her face.
Prompt: Generate a photo of a woman's legs, with her feet crossed and wearing white high-heeled shoes with ribbons tied around her ankles. The shoes should have a pointed toe and a stiletto heel. The woman's legs should be smooth and tanned, with a slight sheen to them. The background should be a light gray color. The photo should be taken from a low angle, looking up at the woman's legs. The ribbons should be tied in a bow shape around the ankles. The shoes should have a red sole. The woman's legs should be slightly bent at the knee.
| CFGx, STEPxx | Seed: 1620085323 | Seed:1931701040 | Seed:4075624134 | Seed:2736029172 |
|---|---|---|---|---|
| Bookshop girl | ||||
| Face and hand | ||||
| Legs and shoes |
Prompt: photorealistic girl in bookshop choosing the book in romantic stories shelf. smiling
| 8 | 16 | 32 | 64 | |
|---|---|---|---|---|
| CFG1 | ||||
| CFG2 | ||||
| CFG3 | ||||
| CFG4 | ||||
| CFG5 | ||||
| CFG6 |
Prompt: Create a close-up photograph of a woman's face and hand, with her hand raised to her chin. She is wearing a white blazer and has a gold ring on her finger. Her nails are neatly manicured and her hair is pulled back into a low bun. She is smiling and has a radiant expression on her face. The background is a plain light gray color. The overall mood of the photo is elegant and sophisticated. The photo should have a soft, natural light and a slight warmth to it. The woman's hair is dark brown and pulled back into a low bun, with a few loose strands framing her face.
| 8 | 16 | 32 | 64 | |
|---|---|---|---|---|
| CFG1 | ||||
| CFG2 | ||||
| CFG3 | ||||
| CFG4 | ||||
| CFG5 | ||||
| CFG6 |
Prompt: Generate a photo of a woman's legs, with her feet crossed and wearing white high-heeled shoes with ribbons tied around her ankles. The shoes should have a pointed toe and a stiletto heel. The woman's legs should be smooth and tanned, with a slight sheen to them. The background should be a light gray color. The photo should be taken from a low angle, looking up at the woman's legs. The ribbons should be tied in a bow shape around the ankles. The shoes should have a red sole. The woman's legs should be slightly bent at the knee.
| 8 | 16 | 32 | 64 | |
|---|---|---|---|---|
| CFG1 | ||||
| CFG2 | ||||
| CFG3 | ||||
| CFG4 | ||||
| CFG5 | ||||
| CFG6 |
| seed:1 | seed:2 | seed:3 | seed:4 | seed:5 |
|---|---|---|---|---|
| seed:6 | seed:7 | seed:8 | seed:9 | seed:10 |
| seed:21 | seed:42 | seed:68 | seed:324 | seed:2026 |
. |
| Module | Class | Device | Dtype | Quant | Params | Modules | Config |
|---|---|---|---|---|---|---|---|
Schedule
FLUX.2-klein-base-4B-model-test.json