Views
No views yet
| File | Base model | Recommended sampling |
|---|---|---|
lora_klein4b.safetensors | FLUX.2-klein-base-4B | 20–25 steps, CFG 4.0, empty negative |
1import torch
2from diffusers import Flux2KleinPipeline
3from diffusers.utils import load_image
4
5pipe = Flux2KleinPipeline.from_pretrained(
6 "black-forest-labs/FLUX.2-klein-base-4B", torch_dtype=torch.bfloat16
7)
8pipe.load_lora_weights("lora_klein4b.safetensors")
9pipe.enable_model_cpu_offload() # fits in 16 GB VRAM
10
11card = load_image("mtg_card.png")
12width, height = card.width // 16 * 16, card.height // 16 * 16 # match the card's own size
13prompt = (
14 "Remove the title, mana cost, type line, rules text box, power and toughness, "
15 "and set symbol. Paint over those areas with a natural continuation of the "
16 "existing artwork."
17)
18
19image = pipe(
20 image=[card],
21 prompt=prompt,
22 guidance_scale=4.0, # true CFG with an empty negative prompt
23 num_inference_steps=20,
24 height=height,
25 width=width,
26 generator=torch.Generator("cpu").manual_seed(42),
27).images[0]
28image.save("full_bleed.png")Remove the title, mana cost, type line, rules text box, power and toughness, and set symbol. Paint over those areas with a natural continuation of the existing artwork.

Remove the card name, HP, energy type icons, attack names and damage, weakness, resistance, retreat cost, set number, and illustrator credit. Paint over those areas with a natural continuation of the existing artwork.

Remove the card name, attribute icon, level stars, card type line, ATK and DEF values, effect text box, and outer card border frame. Paint over those areas with a natural continuation of the existing artwork.

Remove the card name, level indicator, attribute icon, type bar, DP value, play cost, digivolve costs, effect text box, and card border. Paint over those areas with a natural continuation of the existing artwork.
