How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("Flash1405/isometric-mumbai")

prompt = "Turn this cat into a dog"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")

image = pipe(image=input_image, prompt=prompt).images[0]

Isometric Mumbai: style LoRAs

The models that painted sample.isometricmumbai.com: they turn an isometric "block" render of a city (extruded building footprints with satellite imagery on roofs and ground, camera azimuth -15 deg, elevation -45 deg, ~0.29 m/px) into finished isometric pixel art, in the infill-template format of the isometric-mumbai pipeline.

file base use
isometric-mumbai-klein-v2.safetensors FLUX.2 [klein] 4B (Apache 2.0) recommended: painted the whole city; ~2.5 s per 1024 px tile, 4 steps
isometric-mumbai-teacher-v1.safetensors Qwen-Image-Edit (Apache 2.0) first version; slower (14 steps + CFG), flatter colours

Use (v2)

import torch
from diffusers import Flux2KleinPipeline
from PIL import Image

pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16).to("cuda")
pipe.load_lora_weights("Flash1405/isometric-mumbai", weight_name="isometric-mumbai-klein-v2.safetensors")
template = Image.open("template.png")  # 1024x1024: finished art as context, render inside a 2px red box
out = pipe(image=template, prompt=PROMPT, num_inference_steps=4, guidance_scale=1.0, height=1024, width=1024).images[0]

Prompt:

Fill in the outlined section with the missing pixels corresponding to the style, removing the border and exactly following the shape/style/structure of the surrounding image (if present).

The red box marks the region to paint; anything outside it is context the output continues seamlessly. For a whole tile, draw the box around the whole image.

Training (v2)

  • LoRA rank 32, 2,500 steps, lr 1e-4, bf16 on the FLUX.2-klein-base-4B checkpoint (ai-toolkit); ~1 hour on one B200.
  • Data: ~800 Mumbai render tiles paired with redraws by GPT Image (OpenAI), each used as full-tile and strip/centre infill examples, plus colour-shifted copies of the render (so the model does not copy Google's imagery colours). Recipe after Isometric SF.
  • Provenance: the training targets were generated with an OpenAI model; check OpenAI's terms for your use.

Credits

Pipeline and conventions build on isometric-nyc by Andy Coenen (MIT). Made by @flash1405.

Downloads last month
18
Inference Providers NEW

Model tree for Flash1405/isometric-mumbai

Adapter
(49)
this model