Aduc-sdr commited on
Commit
6c1128d
·
verified ·
1 Parent(s): 4891df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -72,10 +72,11 @@ print("✅ Configuração do Apex concluída.")
72
  # --- ETAPA 4: Baixar os Modelos Pré-treinados ---
73
  print("Baixando modelos pré-treinados...")
74
  pretrain_model_url = {
75
- 'vae': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/ema_vae.pth',
76
- 'dit': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/seedvr2_ema_3b.pth',
77
  'pos_emb': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/pos_emb.pt',
78
  'neg_emb': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/neg_emb.pt',
 
79
  }
80
 
81
  Path('./ckpts').mkdir(exist_ok=True)
@@ -83,9 +84,6 @@ for key, url in pretrain_model_url.items():
83
  model_dir = './ckpts' if key in ['vae', 'dit'] else '.'
84
  load_file_from_url(url=url, model_dir=model_dir)
85
 
86
- torch.hub.download_url_to_file('https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/23_1_lq.mp4', '01.mp4')
87
- torch.hub.download_url_to_file('https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/28_1_lq.mp4', '02.mp4')
88
- torch.hub.download_url_to_file('https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/2_1_lq.mp4', '03.mp4')
89
 
90
  # --- ETAPA 5: Inicialização Global do Modelo (FEITA APENAS UMA VEZ) ---
91
  print("Inicializando o modelo e o ambiente distribuído (uma única vez)...")
@@ -236,7 +234,6 @@ with gr.Blocks(title="SeedVR") as demo:
236
  output_video = gr.Video(label="Vídeo de Saída")
237
  download_link = gr.File(label="Baixar Resultado")
238
  run_button.click(fn=generation_loop, inputs=[input_file, seed, fps], outputs=[output_image, output_video, download_link])
239
- gr.Examples(examples=[["01.mp4", 42, 24], ["02.mp4", 42, 24], ["03.mp4", 42, 24]], inputs=[input_file, seed, fps])
240
- gr.HTML("""<hr>...""")
241
 
242
  demo.queue().launch(share=True)
 
72
  # --- ETAPA 4: Baixar os Modelos Pré-treinados ---
73
  print("Baixando modelos pré-treinados...")
74
  pretrain_model_url = {
75
+ 'vae': 'https://huggingface.co/ByteDance-Seed/SeedVR-7B/resolve/main/ema_vae.pth',
76
+ 'dit': 'https://huggingface.co/ByteDance-Seed/SeedVR-7B/resolve/main/seedvr_ema_7b.pth',
77
  'pos_emb': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/pos_emb.pt',
78
  'neg_emb': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/neg_emb.pt',
79
+ #'apex': 'https://huggingface.co/ByteDance-Seed/SeedVR2-3B/resolve/main/apex-0.1-cp39-cp39-linux_x86_64.whl'
80
  }
81
 
82
  Path('./ckpts').mkdir(exist_ok=True)
 
84
  model_dir = './ckpts' if key in ['vae', 'dit'] else '.'
85
  load_file_from_url(url=url, model_dir=model_dir)
86
 
 
 
 
87
 
88
  # --- ETAPA 5: Inicialização Global do Modelo (FEITA APENAS UMA VEZ) ---
89
  print("Inicializando o modelo e o ambiente distribuído (uma única vez)...")
 
234
  output_video = gr.Video(label="Vídeo de Saída")
235
  download_link = gr.File(label="Baixar Resultado")
236
  run_button.click(fn=generation_loop, inputs=[input_file, seed, fps], outputs=[output_image, output_video, download_link])
237
+
 
238
 
239
  demo.queue().launch(share=True)