saburq commited on
Commit
0b04592
·
1 Parent(s): 6a64212

use params

Browse files
Files changed (1) hide show
  1. inference_code.py +2 -2
inference_code.py CHANGED
@@ -8,7 +8,7 @@ from diffusers import FlaxStableDiffusionPipeline
8
  # prompt = "create a map with traffic signals, busway and residential buildings, in water color style"
9
  def generate_images(prompt):
10
  model_path = "sabman/map-diffuser-v3"
11
- pipeline, _params = FlaxStableDiffusionPipeline.from_pretrained(model_path, dtype=jax.numpy.bfloat16)
12
 
13
  prng_seed = jax.random.PRNGKey(-1)
14
  num_inference_steps = 50
@@ -18,7 +18,7 @@ def generate_images(prompt):
18
  prompt_ids = pipeline.prepare_inputs(prompt)
19
 
20
  # shard inputs and rng
21
- params = replicate(_params)
22
  prng_seed = jax.random.split(prng_seed, jax.device_count())
23
  prompt_ids = shard(prompt_ids)
24
 
 
8
  # prompt = "create a map with traffic signals, busway and residential buildings, in water color style"
9
  def generate_images(prompt):
10
  model_path = "sabman/map-diffuser-v3"
11
+ pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(model_path, dtype=jax.numpy.bfloat16)
12
 
13
  prng_seed = jax.random.PRNGKey(-1)
14
  num_inference_steps = 50
 
18
  prompt_ids = pipeline.prepare_inputs(prompt)
19
 
20
  # shard inputs and rng
21
+ params = replicate(params)
22
  prng_seed = jax.random.split(prng_seed, jax.device_count())
23
  prompt_ids = shard(prompt_ids)
24