flux_geoguessr_v1 / README.md
bleepybloops's picture
Update README.md
1f5dd07 verified
|
raw
history blame
1.82 kB
metadata
license: cc
tags:
  - text-to-image
  - lora
  - diffusers
  - template:sd-lora
base_model:
  - black-forest-labs/FLUX.1-dev

fake geoguessr locations lora for flux-dev

trained for 3500 steps on over 200 labeled locations. trigger word ("geoguessr") not necessary, just name a location

known model biases:

  • v1 of this model leans heavily towards rural locations due to dataset bias, will be fixed in v2 as I collect more locations
  • it managed to generalize to locations not available on geoguessr, like china, although it drifts towards generic locs
  • its trained on lowercase country names, and flux is case sensitive. results may vary

run this with diffusers:

import torch
from diffusers import FluxPipeline
import time
import random

# initialize pipeline and lora
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")

lora_weight = 0.8
pipe.load_lora_weights('/workspace/geoguessr_v1_000003500.safetensors', weight_name='geoguessr_v1_000003500.safetensors', adapter_name='geoguessr_v1')
pipe.set_adapters('geoguessr_v1', adapter_weights=[lora_weight])

# set params and generate
seed = -1
seed = seed if seed != -1 else random.randint(0, 2**32)
print(seed)

prompt = "sweden, snow"
out = pipe(
    prompt=prompt,
    guidance_scale=4,
    height=624,
    width=960,
    num_inference_steps=40,
    generator=torch.Generator("cuda").manual_seed(seed),
).images[0]

# save and display output
filename=f"{time.time()}.png"
out.save(filename)

from IPython.display import Image, display
display(Image(filename=filename))

geoguessr_v2 with a much larger dataset and less location bias will be out eventually.

this model is a part of my much larger desterilizer project- a bit more here https://x.com/_lyraaaa_/status/1824003678086590646