Yaron Koresh commited on
Commit
166635a
·
verified ·
1 Parent(s): afccd6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,9 +14,11 @@ from pathos.threading import ThreadPool as Pool
14
  #from huggingface_hub import hf_hub_download
15
  #from safetensors.torch import load_file
16
  from diffusers import FlaxStableDiffusionPipeline
 
 
17
 
18
  device = "cuda" if torch.cuda.is_available() else "cpu"
19
- pipe = FlaxStableDiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", token=os.getenv("hf_token")).to(device)
20
 
21
  def translate(text,lang):
22
 
 
14
  #from huggingface_hub import hf_hub_download
15
  #from safetensors.torch import load_file
16
  from diffusers import FlaxStableDiffusionPipeline
17
+ #import jax
18
+ import jax.numpy as jnp
19
 
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
21
+ pipe = FlaxStableDiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", dtype=jnp.bfloat16, token=os.getenv("hf_token")).to(device)
22
 
23
  def translate(text,lang):
24