Spaces:
Sleeping
Sleeping
fix params
Browse files- inference_code.py +2 -2
inference_code.py
CHANGED
@@ -5,7 +5,7 @@ from flax.training.common_utils import shard
|
|
5 |
from diffusers import FlaxStableDiffusionPipeline
|
6 |
|
7 |
model_path = "sabman/map-diffuser-v3"
|
8 |
-
pipeline,
|
9 |
|
10 |
#prompt = "create a map with traffic signals, busway and residential buildings, in water color style"
|
11 |
def generate_images(prompt):
|
@@ -17,7 +17,7 @@ def generate_images(prompt):
|
|
17 |
prompt_ids = pipeline.prepare_inputs(prompt)
|
18 |
|
19 |
# shard inputs and rng
|
20 |
-
params = replicate(
|
21 |
prng_seed = jax.random.split(prng_seed, jax.device_count())
|
22 |
prompt_ids = shard(prompt_ids)
|
23 |
|
|
|
5 |
from diffusers import FlaxStableDiffusionPipeline
|
6 |
|
7 |
model_path = "sabman/map-diffuser-v3"
|
8 |
+
pipeline, _params = FlaxStableDiffusionPipeline.from_pretrained(model_path, dtype=jax.numpy.bfloat16)
|
9 |
|
10 |
#prompt = "create a map with traffic signals, busway and residential buildings, in water color style"
|
11 |
def generate_images(prompt):
|
|
|
17 |
prompt_ids = pipeline.prepare_inputs(prompt)
|
18 |
|
19 |
# shard inputs and rng
|
20 |
+
params = replicate(_params)
|
21 |
prng_seed = jax.random.split(prng_seed, jax.device_count())
|
22 |
prompt_ids = shard(prompt_ids)
|
23 |
|