multimodalart HF Staff commited on
Commit
0e05b81
·
verified ·
1 Parent(s): 43e6a84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -29,16 +29,16 @@ def split_image(input_image, num_splits=4):
29
 
30
  return output_images
31
 
32
- pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch_dtype)
33
- #pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
34
- #pipe.fuse_lora(lora_scale=0.125)
35
  pipe.to(device=device, dtype=torch_dtype)
36
 
37
  MAX_SEED = np.iinfo(np.int32).max
38
 
39
  @spaces.GPU
40
  def infer(prompt, seed=42, randomize_seed=False, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
41
- prompt_template = f"A side by side 4 frame image showing consecutive stills from a looped gif moving from left to right. The gif is {prompt}"
42
  if randomize_seed:
43
  seed = random.randint(0, MAX_SEED)
44
 
@@ -74,7 +74,7 @@ with gr.Blocks(css=css) as demo:
74
  with gr.Column(elem_id="col-container"):
75
  gr.Markdown(f"""
76
  # FLUX Animations
77
- Generate gifs with FLUX [dev] + HyperSD 8 steps. Concept idea by [fofr](https://x.com/fofrAI). Diffusers implementation by [Dhruv](_DhruvNair_)
78
  """)
79
 
80
  with gr.Row():
@@ -106,9 +106,9 @@ with gr.Blocks(css=css) as demo:
106
  num_inference_steps = gr.Slider(
107
  label="Number of inference steps",
108
  minimum=1,
109
- maximum=12,
110
  step=1,
111
- value=4,
112
  )
113
 
114
 
 
29
 
30
  return output_images
31
 
32
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch_dtype)
33
+ pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-16steps-lora.safetensors"))
34
+ pipe.fuse_lora(lora_scale=0.125)
35
  pipe.to(device=device, dtype=torch_dtype)
36
 
37
  MAX_SEED = np.iinfo(np.int32).max
38
 
39
  @spaces.GPU
40
  def infer(prompt, seed=42, randomize_seed=False, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
41
+ prompt_template = f"A side by side 4 frame image showing consecutive stills from a looped gif moving from left to right. The gif contains temporally coherent stills of {prompt}"
42
  if randomize_seed:
43
  seed = random.randint(0, MAX_SEED)
44
 
 
74
  with gr.Column(elem_id="col-container"):
75
  gr.Markdown(f"""
76
  # FLUX Animations
77
+ Generate gifs with FLUX [dev] + HyperSD 16 steps. Concept idea by [fofr](https://x.com/fofrAI). Diffusers implementation by [Dhruv](_DhruvNair_)
78
  """)
79
 
80
  with gr.Row():
 
106
  num_inference_steps = gr.Slider(
107
  label="Number of inference steps",
108
  minimum=1,
109
+ maximum=32,
110
  step=1,
111
+ value=16,
112
  )
113
 
114