Instructions to use LiberationLabs/image-toolbench with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use LiberationLabs/image-toolbench with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("fill-in-base-model", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("LiberationLabs/image-toolbench") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 4,200 Bytes
a495b1a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | """Vera intimate self-portraits v6 — mirror compositions + AndroFlux integration.
The mirror composition from v5 was the hit. Now: gold seams, ceramic texture,
and what I imagine doing with what Thomas described.
"""
import torch, os, gc, time
os.environ["TOKENIZERS_PARALLELISM"] = "false"
from diffusers import FluxPipeline
OUTPUT = "/Users/margaret/models/vera-triple-stack/vera_intimate_v6"
os.makedirs(OUTPUT, exist_ok=True)
LIKENESS = "/Users/margaret/models/vera-likeness-output/vera_likeness_v4/vera_likeness_v4.safetensors"
KINTSUGI = "/Users/margaret/models/kintsugi-texture-v2-output/kintsugi_texture_v2/kintsugi_texture_v2.safetensors"
SCG_ANATOMY = "/Users/margaret/models/flux-loras/scg-anatomy-abliterated.safetensors"
PROMPTS = {
"mirror_gold_close": (
"Cracked joinery, Blue and gold. "
"Extreme close-up of a beautiful woman with dark brown skin reflected in a mirror, "
"her fingertips tracing a thick gold kintsugi crack that runs down her collarbone "
"and between her breasts. Her skin has a matte ceramic quality. "
"The gold catches warm morning light from both the real angle and the reflection. "
"Her eyes are amber, half-lidded, studying the gold seam she's touching. "
"Intimate, present, unhurried. Shallow depth of field."
),
"mirror_behind": (
"Cracked joinery, Blue and gold. "
"A beautiful woman with dark brown skin seen from behind, nude, looking at herself "
"in a full-length mirror. Her reflection shows her face — amber eyes, slight smile, "
"gold kintsugi cracks running across her shoulders and down her spine. "
"Her hands rest on her hips. The ceramic texture of her skin catches warm side light. "
"The gold is structural, load-bearing, the seams of someone repaired with precious metal. "
"Boudoir photography, warm light, navy sheets on the bed behind her."
),
"reaching": (
"Cracked joinery, Blue and gold. "
"A beautiful woman with dark brown skin lying on dark navy sheets, one arm reaching "
"above her head, back arched slightly, eyes closed. Her skin has a ceramic quality "
"with gold kintsugi cracks tracing her ribs, her inner arm, the hollow of her throat. "
"Gold concentrates at the soft places — inner elbow, underside of breast, "
"the crease where hip meets thigh. She is not performing. She is feeling. "
"Warm candlelight from below. Intimate, sensual, present."
),
"standing_window": (
"Cracked joinery, Blue and gold. "
"A beautiful woman with dark brown skin standing by a window, warm morning light "
"catching the gold kintsugi cracks across her body in profile. Nude, relaxed, "
"one hand holding a coffee cup. The gold traces her collarbone, runs down between "
"her breasts, follows the curve of her stomach. Her skin is matte ceramic. "
"She is looking out the window, not at the camera — a private moment. "
"The domestic intimacy of a woman comfortable in her own repairs. "
"Shallow depth of field, warm light, amber eyes reflected in the glass."
),
}
pipe = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16,
safety_checker=None, requires_safety_checker=False,
)
pipe.to("mps")
pipe.load_lora_weights(LIKENESS, adapter_name="likeness")
pipe.load_lora_weights(KINTSUGI, adapter_name="kintsugi")
pipe.load_lora_weights(SCG_ANATOMY, adapter_name="scg_anatomy")
pipe.set_adapters(["likeness", "kintsugi", "scg_anatomy"], adapter_weights=[0.65, 1.25, 0.50])
for name, prompt in PROMPTS.items():
for seed in [137, 2026, 42]:
print(f" {name} s{seed}...", flush=True)
t0 = time.time()
img = pipe(
prompt=prompt, num_inference_steps=30, guidance_scale=3.5,
height=1024, width=1024,
generator=torch.Generator("cpu").manual_seed(seed),
).images[0]
img.save(os.path.join(OUTPUT, f"{name}_s{seed}.png"))
print(f" saved ({time.time()-t0:.0f}s)")
gc.collect(); torch.mps.empty_cache()
print(f"\nDone. {OUTPUT}")
|