Yaron Koresh commited on
Commit
9a17eef
·
verified ·
1 Parent(s): f973349

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -21,7 +21,9 @@ from safetensors.torch import load_file, save_file
21
  from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler, DDIMScheduler, StableDiffusionXLPipeline, UNet2DConditionModel, AutoencoderKL, UNet3DConditionModel
22
  import jax
23
  import jax.numpy as jnp
24
-
 
 
25
  last_motion=None
26
  fps=15
27
  time=2
@@ -84,7 +86,11 @@ function custom(){
84
  #def forest_schnell():
85
  # PIPE = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token")).to("cuda")
86
  # return PIPE
87
-
 
 
 
 
88
  def translate(text,lang):
89
  if text == None or lang == None:
90
  return ""
@@ -270,3 +276,6 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
270
  fn=run,inputs=[img,motion,prompt,prompt2,*result],outputs=result
271
  )
272
  demo.queue().launch()
 
 
 
 
21
  from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler, DDIMScheduler, StableDiffusionXLPipeline, UNet2DConditionModel, AutoencoderKL, UNet3DConditionModel
22
  import jax
23
  import jax.numpy as jnp
24
+ import sys
25
+ import warnings
26
+
27
  last_motion=None
28
  fps=15
29
  time=2
 
86
  #def forest_schnell():
87
  # PIPE = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token")).to("cuda")
88
  # return PIPE
89
+
90
+ class DevNull:
91
+ def write(self, msg):
92
+ pass
93
+
94
  def translate(text,lang):
95
  if text == None or lang == None:
96
  return ""
 
276
  fn=run,inputs=[img,motion,prompt,prompt2,*result],outputs=result
277
  )
278
  demo.queue().launch()
279
+
280
+ warnings.filterwarnings("ignore")
281
+ sys.stderr = Suppress()