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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -13,12 +13,14 @@ from pathos.threading import ThreadPool as Pool
13
  #from diffusers.utils import export_to_gif
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
 
 
13
  #from diffusers.utils import export_to_gif
14
  #from huggingface_hub import hf_hub_download
15
  #from safetensors.torch import load_file
16
+ from diffusers import FlaxStableDiffusionPipeline, DiffusionPipeline
17
  #import jax
18
+ #import jax.numpy as jnp
19
 
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
21
+
22
+ #pipe = FlaxStableDiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", dtype=jnp.bfloat16, token=os.getenv("hf_token")).to(device)
23
+ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, revision="refs/pr/1", token=os.getenv("hf_token")).to(device)
24
 
25
  def translate(text,lang):
26