Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,57 @@
|
|
1 |
-
---
|
2 |
-
license: cc
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc
|
3 |
+
base_model:
|
4 |
+
- black-forest-labs/FLUX.1-dev
|
5 |
+
---
|
6 |
+
|
7 |
+
**fake geoguessr locations lora for flux-dev**
|
8 |
+
|
9 |
+
trained for 3500 steps on over 200 labeled locations. trigger word ("geoguessr") not necessary, just name a location
|
10 |
+
|
11 |
+
known model biases:
|
12 |
+
- v1 of this model leans heavily towards rural locations due to dataset bias, will be fixed in v2 as I collect more locations
|
13 |
+
- it managed to generalize to locations not available on geoguessr, like china, although it drifts towards generic locs
|
14 |
+
- its trained on lowercase country names, and flux is case sensitive. results may vary
|
15 |
+
|
16 |
+
run this with diffusers:
|
17 |
+
|
18 |
+
```py
|
19 |
+
import torch
|
20 |
+
from diffusers import FluxPipeline
|
21 |
+
import time
|
22 |
+
import random
|
23 |
+
|
24 |
+
# initialize pipeline and lora
|
25 |
+
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
|
26 |
+
|
27 |
+
lora_weight = 0.8
|
28 |
+
pipe.load_lora_weights('/workspace/geoguessr_v1_000003500.safetensors', weight_name='geoguessr_v1_000003500.safetensors', adapter_name='geoguessr_v1')
|
29 |
+
pipe.set_adapters('geoguessr_v1', adapter_weights=[lora_weight])
|
30 |
+
|
31 |
+
# set params and generate
|
32 |
+
seed = -1
|
33 |
+
seed = seed if seed != -1 else random.randint(0, 2**32)
|
34 |
+
print(seed)
|
35 |
+
|
36 |
+
prompt = "sweden, snow"
|
37 |
+
out = pipe(
|
38 |
+
prompt=prompt,
|
39 |
+
guidance_scale=4,
|
40 |
+
height=624,
|
41 |
+
width=960,
|
42 |
+
num_inference_steps=40,
|
43 |
+
generator=torch.Generator("cuda").manual_seed(seed),
|
44 |
+
).images[0]
|
45 |
+
|
46 |
+
# save and display output
|
47 |
+
filename=f"{time.time()}.png"
|
48 |
+
out.save(filename)
|
49 |
+
|
50 |
+
from IPython.display import Image, display
|
51 |
+
display(Image(filename=filename))
|
52 |
+
|
53 |
+
```
|
54 |
+
|
55 |
+
geoguessr_v2 with a much larger dataset and less location bias will be out eventually.
|
56 |
+
|
57 |
+
this model is a part of my much larger desterilizer project- a bit more here https://x.com/_lyraaaa_/status/1824003678086590646
|