Anonymous-sub commited on
Commit
b07172e
1 Parent(s): fb1b680

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -6
app.py CHANGED
@@ -607,11 +607,23 @@ def process2(*args):
607
 
608
  return key_video_path
609
 
 
 
 
 
 
 
 
 
 
 
 
 
610
 
611
  block = gr.Blocks().queue()
612
  with block:
613
  with gr.Row():
614
- gr.Markdown('## Rerender A Video')
615
  with gr.Row():
616
  with gr.Column():
617
  input_path = gr.Video(label='Input Video',
@@ -636,7 +648,8 @@ with block:
636
  minimum=256,
637
  maximum=512,
638
  value=512,
639
- step=64)
 
640
  control_strength = gr.Slider(label='ControNet strength',
641
  minimum=0.0,
642
  maximum=2.0,
@@ -692,9 +705,10 @@ with block:
692
  step=1)
693
  ddim_steps = gr.Slider(label='Steps',
694
  minimum=1,
695
- maximum=100,
696
  value=20,
697
- step=1)
 
698
  scale = gr.Slider(label='CFG scale',
699
  minimum=0.1,
700
  maximum=30.0,
@@ -724,7 +738,8 @@ with block:
724
  minimum=1,
725
  maximum=1,
726
  value=1,
727
- step=1)
 
728
 
729
  use_constraints = gr.CheckboxGroup(
730
  [
@@ -755,7 +770,7 @@ with block:
755
  value=1,
756
  step=1,
757
  info=('Update the key and value for '
758
- 'cross-frame attention every N key frames'))
759
  with gr.Row():
760
  warp_start = gr.Slider(label='Shape-aware fusion start',
761
  minimum=0,
 
607
 
608
  return key_video_path
609
 
610
+ DESCRIPTION = '''
611
+ ## Rerender A Video
612
+ ### This space provides the function of key frame translation. Full code for full video translation will be released upon the publication of the paper.
613
+ ### To avoid overload, we set limitations to the maximum frame number and the maximum frame resolution.
614
+ ### Tips:
615
+ 1. This method cannot handle large or quick motions where the optical flow is hard to estimate. Videos with stable motions are prefered.
616
+ 2. Pixel-aware fusion may not work for large or quick motions.
617
+ 3. revAnimated_v11 model for non-photorealstic style, realisticVisionV20_v20 model for photorealstic style.
618
+ 4. To use your own SD/LoRA model, you may clone the space and speficify your model with [sd_model_cfg.py](https://huggingface.co/spaces/Anonymous-sub/Rerender/blob/main/sd_model_cfg.py).
619
+ 5. This method is based on the original SD model. You may need to [convert](https://github.com/huggingface/diffusers/blob/main/scripts/convert_diffusers_to_original_stable_diffusion.py) Diffuser/Automatic1111 models to the original one.
620
+ 6. Try different color-aware AdaIN settings and even unuse it to avoid color jittering.
621
+ '''
622
 
623
  block = gr.Blocks().queue()
624
  with block:
625
  with gr.Row():
626
+ gr.Markdown(DESCRIPTION)
627
  with gr.Row():
628
  with gr.Column():
629
  input_path = gr.Video(label='Input Video',
 
648
  minimum=256,
649
  maximum=512,
650
  value=512,
651
+ step=64,
652
+ info='To avoid overload, maximum 512')
653
  control_strength = gr.Slider(label='ControNet strength',
654
  minimum=0.0,
655
  maximum=2.0,
 
705
  step=1)
706
  ddim_steps = gr.Slider(label='Steps',
707
  minimum=1,
708
+ maximum=20,
709
  value=20,
710
+ step=1,
711
+ info='To avoid overload, maximum 20')
712
  scale = gr.Slider(label='CFG scale',
713
  minimum=0.1,
714
  maximum=30.0,
 
738
  minimum=1,
739
  maximum=1,
740
  value=1,
741
+ step=1,
742
+ info='To avoid overload, maximum 8 key frames')
743
 
744
  use_constraints = gr.CheckboxGroup(
745
  [
 
770
  value=1,
771
  step=1,
772
  info=('Update the key and value for '
773
+ 'cross-frame attention every N key frames (recommend N*K>=10)'))
774
  with gr.Row():
775
  warp_start = gr.Slider(label='Shape-aware fusion start',
776
  minimum=0,