Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -12,11 +12,12 @@ from script import SatelliteModelGenerator
|
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
dtype = torch.bfloat16
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
|
21 |
def generate_and_process_map(prompt: str) -> str | None:
|
22 |
"""Generate satellite image from prompt and convert to 3D model."""
|
|
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
dtype = torch.bfloat16
|
14 |
|
15 |
+
repo_id = "black-forest-labs/FLUX.1-dev"
|
16 |
+
adapter_id = "jbilcke-hf/flux-satellite"
|
17 |
+
|
18 |
+
flux_pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.bfloat16)
|
19 |
+
flux_pipe.load_lora_weights(adapter_id)
|
20 |
+
flux_pipe = pipeline.to(device)
|
21 |
|
22 |
def generate_and_process_map(prompt: str) -> str | None:
|
23 |
"""Generate satellite image from prompt and convert to 3D model."""
|