Yaron Koresh commited on
Commit
c22cb19
·
verified ·
1 Parent(s): 1c34da6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ import gradio as gr
9
  import numpy as np
10
  from lxml.html import fromstring
11
  from pathos.threading import ThreadPool as Pool
12
- from diffusers import AutoPipelineForText2Image, MotionAdapter, EulerDiscreteScheduler
13
  from diffusers.utils import export_to_gif
14
  from huggingface_hub import hf_hub_download
15
  from safetensors.torch import load_file
@@ -25,7 +25,7 @@ base = "black-forest-labs/FLUX.1-dev"
25
 
26
  adapter = MotionAdapter().to(device, dtype)
27
  adapter.load_state_dict(load_file(hf_hub_download(repo ,ckpt), device=device))
28
- pipe = AutoPipelineForText2Image.from_pretrained(base, motion_adapter=adapter, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
29
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
30
 
31
  def translate(text,lang):
 
9
  import numpy as np
10
  from lxml.html import fromstring
11
  from pathos.threading import ThreadPool as Pool
12
+ from diffusers import FluxPipeline, MotionAdapter, EulerDiscreteScheduler
13
  from diffusers.utils import export_to_gif
14
  from huggingface_hub import hf_hub_download
15
  from safetensors.torch import load_file
 
25
 
26
  adapter = MotionAdapter().to(device, dtype)
27
  adapter.load_state_dict(load_file(hf_hub_download(repo ,ckpt), device=device))
28
+ pipe = FluxPipeline.from_pretrained(base, motion_adapter=adapter, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
29
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
30
 
31
  def translate(text,lang):