Eueuiaa commited on
Commit
994d098
·
verified ·
1 Parent(s): 42dccc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +149 -112
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # app_refactored_with_postprod.py (FINAL VERSION with LTX Refinement)
2
 
3
  import gradio as gr
4
  import os
@@ -7,200 +7,237 @@ import traceback
7
  from pathlib import Path
8
 
9
  # --- Import dos Serviços de Backend ---
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- # Serviço LTX para geração de vídeo base e refinamento de textura
12
- #try
13
- from api.ltx_server_refactored import video_generation_service
14
- #except ImportError:
15
- #print("ERRO FATAL: Não foi possível importar 'video_generation_service' de 'api.ltx_server_refactored'.")
16
- #sys.exit(1)
17
-
18
- # Serviço SeedVR para upscaling de alta qualidade
19
- #try:
20
- from api.seedvr_server import SeedVRServer
21
- #except ImportError:
22
- #print("AVISO: Não foi possível importar SeedVRServer. A aba de upscaling SeedVR será desativada.")
23
- #SeedVRServer = None
24
-
25
- # Inicializa o servidor SeedVR uma vez, se disponível
26
  seedvr_inference_server = SeedVRServer() if SeedVRServer else None
27
 
28
  # --- ESTADO DA SESSÃO ---
29
  def create_initial_state():
30
- return {
31
- "low_res_video": None,
32
- "low_res_latents": None,
33
- "refined_video_ltx": None,
34
- "refined_latents_ltx": None,
35
- "used_seed": None
36
- }
37
 
38
  # --- FUNÇÕES WRAPPER PARA A UI ---
39
 
40
- def run_generate_low(prompt, neg_prompt, start_img, height, width, duration, cfg, seed, randomize_seed, progress=gr.Progress(track_tqdm=True)):
41
- """Executa a primeira etapa: geração de um vídeo base em baixa resolução."""
42
- print("UI: Chamando generate_low")
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  try:
44
- conditioning_items = []
45
  if start_img:
46
  num_frames_estimate = int(duration * 24)
47
  items_list = [[start_img, 0, 1.0]]
48
- conditioning_items = video_generation_service.prepare_condition_items(items_list, height, width, num_frames_estimate)
49
 
50
  used_seed = None if randomize_seed else seed
51
- video_path, tensor_path, final_seed = video_generation_service.generate_low(
52
- prompt=prompt, negative_prompt=neg_prompt,
53
- height=height, width=width, duration=duration,
54
- guidance_scale=cfg, seed=used_seed,
55
- conditioning_items=conditioning_items
56
- )
57
 
58
- new_state = {
59
- "low_res_video": video_path,
60
- "low_res_latents": tensor_path,
61
- "refined_video_ltx": None,
62
- "refined_latents_ltx": None,
63
- "used_seed": final_seed
 
 
 
 
 
 
64
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  return video_path, new_state, gr.update(visible=True)
 
67
  except Exception as e:
68
  error_message = f"❌ Ocorreu um erro na Geração Base:\n{e}"
69
  print(f"{error_message}\nDetalhes: {traceback.format_exc()}")
70
  raise gr.Error(error_message)
71
 
72
  def run_ltx_refinement(state, prompt, neg_prompt, cfg, progress=gr.Progress(track_tqdm=True)):
73
- """Executa o processo de refinamento e upscaling de textura com o pipeline LTX."""
74
- print("UI: Chamando run_ltx_refinement (generate_upscale_denoise)")
75
  if not state or not state.get("low_res_latents"):
76
  raise gr.Error("Erro: Gere um vídeo base primeiro na Etapa 1.")
77
-
78
  try:
 
79
  video_path, tensor_path = video_generation_service.generate_upscale_denoise(
80
- latents_path=state["low_res_latents"],
81
- prompt=prompt,
82
- negative_prompt=neg_prompt,
83
- guidance_scale=cfg,
84
- seed=state["used_seed"]
85
  )
86
-
87
- # Atualiza o estado com os novos artefatos refinados
88
- state["refined_video_ltx"] = video_path
89
- state["refined_latents_ltx"] = tensor_path
90
-
91
  return video_path, state
92
  except Exception as e:
93
- error_message = f" Ocorreu um erro durante o Refinamento LTX:\n{e}"
94
- print(f"{error_message}\nDetalhes: {traceback.format_exc()}")
95
- raise gr.Error(error_message)
96
 
97
  def run_seedvr_upscaling(state, seed, resolution, batch_size, fps, progress=gr.Progress(track_tqdm=True)):
98
- """Executa o processo de upscaling com SeedVR."""
99
  if not state or not state.get("low_res_video"):
100
  raise gr.Error("Erro: Gere um vídeo base primeiro na Etapa 1.")
101
  if not seedvr_inference_server:
102
  raise gr.Error("Erro: O servidor SeedVR não está disponível.")
103
-
104
- video_path = state["low_res_video"]
105
- print(f"▶️ Iniciando processo de upscaling SeedVR para o vídeo: {video_path}")
106
-
107
  try:
108
- def progress_wrapper(p, desc=""):
109
- progress(p, desc=desc)
110
  output_filepath = seedvr_inference_server.run_inference(
111
- file_path=video_path, seed=seed, resolution=resolution,
112
  batch_size=batch_size, fps=fps, progress=progress_wrapper
113
  )
114
- final_message = f"✅ Processo SeedVR concluído!\nVídeo salvo em: {output_filepath}"
115
- return gr.update(value=output_filepath, interactive=True), gr.update(value=final_message, interactive=False)
116
  except Exception as e:
117
- error_message = f"❌ Ocorreu um erro grave durante o upscaling com SeedVR:\n{e}"
118
- print(f"{error_message}\nDetalhes: {traceback.format_exc()}")
119
- return None, gr.update(value=error_message, interactive=False)
120
 
121
  # --- DEFINIÇÃO DA INTERFACE GRADIO ---
122
- with gr.Blocks() as demo:
123
  gr.Markdown("# LTX Video - Geração e Pós-Produção por Etapas")
124
 
125
  app_state = gr.State(value=create_initial_state())
126
 
127
- # --- ETAPA 1: Geração Base ---
128
  with gr.Row():
129
  with gr.Column(scale=1):
130
  gr.Markdown("### Etapa 1: Configurações de Geração")
131
- prompt_input = gr.Textbox(label="Prompt", value="A majestic dragon flying over a medieval castle", lines=3)
132
- neg_prompt_input = gr.Textbox(visible=False, label="Negative Prompt", value="worst quality, blurry, low quality, jittery", lines=2)
133
- start_image = gr.Image(label="Imagem de Início (Opcional)", type="filepath", sources=["upload", "clipboard"])
134
 
135
- with gr.Accordion("Parâmetros Avançados", open=False):
136
- height_input = gr.Slider(label="Height", value=512, step=32, minimum=256, maximum=1024)
137
- width_input = gr.Slider(label="Width", value=704, step=32, minimum=256, maximum=1024)
138
- duration_input = gr.Slider(label="Duração (s)", value=4, step=1, minimum=1, maximum=10)
139
- cfg_input = gr.Slider(label="Guidance Scale (CFG)", value=3.0, step=0.1, minimum=1.0, maximum=10.0)
140
- seed_input = gr.Number(label="Seed", value=42, precision=0)
141
- randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
142
-
143
- generate_low_btn = gr.Button("1. Gerar Vídeo Base (Low-Res)", variant="primary")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  with gr.Column(scale=1):
146
  gr.Markdown("### Vídeo Base Gerado")
147
- low_res_video_output = gr.Video(interactive=False)
148
 
149
- # --- ETAPA 2: Pós-Produção (no rodapé, em abas) ---
150
  with gr.Group(visible=False) as post_prod_group:
 
151
  gr.Markdown("## Etapa 2: Pós-Produção")
152
- gr.Markdown("Use o vídeo gerado acima como entrada para as ferramentas abaixo. **O prompt e a CFG da Etapa 1 serão reutilizados.**")
153
-
154
  with gr.Tabs():
155
- # --- ABA LTX REFINEMENT (AGORA FUNCIONAL) ---
156
  with gr.TabItem("🚀 Upscaler Textura (LTX)"):
157
  with gr.Row():
158
  with gr.Column(scale=1):
159
- gr.Markdown("### Parâmetros de Refinamento")
160
- gr.Markdown("Esta etapa reutiliza o prompt, o prompt negativo e a CFG da Etapa 1 para manter a consistência.")
161
- ltx_refine_btn = gr.Button("Aplicar Refinamento de Textura LTX", variant="primary")
162
  with gr.Column(scale=1):
163
- gr.Markdown("### Resultado do Refinamento")
164
- ltx_refined_video_output = gr.Video(label="Vídeo com Textura Refinada (LTX)", interactive=False)
165
-
166
- # --- ABA SEEDVR UPSCALER ---
167
  with gr.TabItem("✨ Upscaler SeedVR"):
168
  with gr.Row():
169
  with gr.Column(scale=1):
170
- gr.Markdown("### Parâmetros do SeedVR")
171
  seedvr_seed = gr.Slider(minimum=0, maximum=999999, value=42, step=1, label="Seed")
172
- seedvr_resolution = gr.Slider(minimum=720, maximum=1440, value=1072, step=8, label="Resolução Vertical (Altura)")
173
  seedvr_batch_size = gr.Slider(minimum=1, maximum=16, value=4, step=1, label="Batch Size por GPU")
174
  seedvr_fps_output = gr.Number(label="FPS de Saída (0 = original)", value=0)
175
  run_seedvr_button = gr.Button("Iniciar Upscaling SeedVR", variant="primary", interactive=(seedvr_inference_server is not None))
176
  if not seedvr_inference_server:
177
- gr.Markdown("Serviço SeedVR não disponível.")
178
  with gr.Column(scale=1):
179
- gr.Markdown("### Resultado do Upscaling")
180
  seedvr_video_output = gr.Video(label="Vídeo com Upscale SeedVR", interactive=False)
181
- seedvr_status_box = gr.Textbox(label="Status do Processamento", value="Aguardando...", lines=3, interactive=False)
182
-
183
- # --- ABA MM-AUDIO ---
184
- with gr.TabItem("🔊 Áudio (MM-Audio)"):
185
- gr.Markdown("*(Funcionalidade futura para adicionar som aos vídeos)*")
186
-
187
- # --- LÓGICA DE EVENTOS DA UI ---
188
-
189
- # Botão da Etapa 1
190
  generate_low_btn.click(
191
- fn=run_generate_low,
192
- inputs=[prompt_input, neg_prompt_input, start_image, height_input, width_input, duration_input, cfg_input, seed_input, randomize_seed],
 
 
 
 
193
  outputs=[low_res_video_output, app_state, post_prod_group]
194
  )
195
 
196
- # Botão da Aba LTX Refinement
197
  ltx_refine_btn.click(
198
  fn=run_ltx_refinement,
199
  inputs=[app_state, prompt_input, neg_prompt_input, cfg_input],
200
  outputs=[ltx_refined_video_output, app_state]
201
  )
202
 
203
- # Botão da Aba SeedVR
204
  run_seedvr_button.click(
205
  fn=run_seedvr_upscaling,
206
  inputs=[app_state, seedvr_seed, seedvr_resolution, seedvr_batch_size, seedvr_fps_output],
 
1
+ # app_refactored_with_postprod.py (com Modos de Geração e Opções LTX Completas)
2
 
3
  import gradio as gr
4
  import os
 
7
  from pathlib import Path
8
 
9
  # --- Import dos Serviços de Backend ---
10
+ try:
11
+ from api.ltx_server_refactored import video_generation_service
12
+ except ImportError:
13
+ print("ERRO FATAL: Não foi possível importar 'video_generation_service' de 'api.ltx_server_refactored'.")
14
+ sys.exit(1)
15
+
16
+ try:
17
+ from api.seedvr_server import SeedVRServer
18
+ except ImportError:
19
+ print("AVISO: Não foi possível importar SeedVRServer. A aba de upscaling SeedVR será desativada.")
20
+ SeedVRServer = None
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  seedvr_inference_server = SeedVRServer() if SeedVRServer else None
23
 
24
  # --- ESTADO DA SESSÃO ---
25
  def create_initial_state():
26
+ return {"low_res_video": None, "low_res_latents": None, "used_seed": None}
 
 
 
 
 
 
27
 
28
  # --- FUNÇÕES WRAPPER PARA A UI ---
29
 
30
+ def run_generate_base_video(
31
+ # Parâmetros de Geração
32
+ generation_mode, prompt, neg_prompt, start_img, height, width, duration, cfg, seed, randomize_seed,
33
+
34
+ # Novos parâmetros LTX (completos)
35
+ fp_num_inference_steps, fp_guidance_scale,
36
+ sampler, stg_mode, stochastic_sampling,
37
+ decode_timestep, decode_noise_scale, downscale_factor,
38
+
39
+ progress=gr.Progress(track_tqdm=True)
40
+ ):
41
+ """
42
+ Função wrapper que decide qual pipeline de backend chamar, passando todas as configurações LTX.
43
+ """
44
+ print(f"UI: Iniciando geração no modo: {generation_mode}")
45
+
46
  try:
47
+ initial_image_conditions = []
48
  if start_img:
49
  num_frames_estimate = int(duration * 24)
50
  items_list = [[start_img, 0, 1.0]]
51
+ initial_image_conditions = video_generation_service.prepare_condition_items(items_list, height, width, num_frames_estimate)
52
 
53
  used_seed = None if randomize_seed else seed
 
 
 
 
 
 
54
 
55
+ # Agrupa todas as configurações LTX em um único dicionário para o backend
56
+ ltx_configs = {
57
+ # First Pass
58
+ "first_pass_num_inference_steps": fp_num_inference_steps,
59
+ "first_pass_guidance_scale": fp_guidance_scale,
60
+ # Gerais
61
+ "sampler": sampler,
62
+ "stg_mode": stg_mode,
63
+ "stochastic_sampling": stochastic_sampling,
64
+ "decode_timestep": decode_timestep,
65
+ "decode_noise_scale": decode_noise_scale,
66
+ "downscale_factor": downscale_factor,
67
  }
68
+
69
+ # Decide qual função de backend chamar com base no modo
70
+ if generation_mode == "Narrativa (Múltiplos Prompts)":
71
+ video_path, tensor_path, final_seed = video_generation_service.generate_narrative_low(
72
+ prompt=prompt, negative_prompt=neg_prompt,
73
+ height=height, width=width, duration=duration,
74
+ guidance_scale=cfg, seed=used_seed,
75
+ initial_image_conditions=initial_image_conditions,
76
+ ltx_configs_override=ltx_configs
77
+ )
78
+ else: # Modo "Simples (Prompt Único)"
79
+ video_path, tensor_path, final_seed = video_generation_service.generate_single_low(
80
+ prompt=prompt, negative_prompt=neg_prompt,
81
+ height=height, width=width, duration=duration,
82
+ guidance_scale=cfg, seed=used_seed,
83
+ initial_image_conditions=initial_image_conditions,
84
+ ltx_configs_override=ltx_configs
85
+ )
86
+
87
+ new_state = {"low_res_video": video_path, "low_res_latents": tensor_path, "used_seed": final_seed}
88
 
89
  return video_path, new_state, gr.update(visible=True)
90
+
91
  except Exception as e:
92
  error_message = f"❌ Ocorreu um erro na Geração Base:\n{e}"
93
  print(f"{error_message}\nDetalhes: {traceback.format_exc()}")
94
  raise gr.Error(error_message)
95
 
96
  def run_ltx_refinement(state, prompt, neg_prompt, cfg, progress=gr.Progress(track_tqdm=True)):
 
 
97
  if not state or not state.get("low_res_latents"):
98
  raise gr.Error("Erro: Gere um vídeo base primeiro na Etapa 1.")
 
99
  try:
100
+ # Nota: O refinamento também poderia aceitar um dicionário de configs para o second_pass
101
  video_path, tensor_path = video_generation_service.generate_upscale_denoise(
102
+ latents_path=state["low_res_latents"], prompt=prompt,
103
+ negative_prompt=neg_prompt, guidance_scale=cfg, seed=state["used_seed"]
 
 
 
104
  )
105
+ state["refined_video_ltx"] = video_path; state["refined_latents_ltx"] = tensor_path
 
 
 
 
106
  return video_path, state
107
  except Exception as e:
108
+ raise gr.Error(f"Erro no Refinamento LTX: {e}")
 
 
109
 
110
  def run_seedvr_upscaling(state, seed, resolution, batch_size, fps, progress=gr.Progress(track_tqdm=True)):
 
111
  if not state or not state.get("low_res_video"):
112
  raise gr.Error("Erro: Gere um vídeo base primeiro na Etapa 1.")
113
  if not seedvr_inference_server:
114
  raise gr.Error("Erro: O servidor SeedVR não está disponível.")
 
 
 
 
115
  try:
116
+ def progress_wrapper(p, desc=""): progress(p, desc=desc)
 
117
  output_filepath = seedvr_inference_server.run_inference(
118
+ file_path=state["low_res_video"], seed=seed, resolution=resolution,
119
  batch_size=batch_size, fps=fps, progress=progress_wrapper
120
  )
121
+ return gr.update(value=output_filepath), gr.update(value=f"✅ Concluído!\nSalvo em: {output_filepath}")
 
122
  except Exception as e:
123
+ return None, gr.update(value=f"❌ Erro no SeedVR:\n{e}")
 
 
124
 
125
  # --- DEFINIÇÃO DA INTERFACE GRADIO ---
126
+ with gr.Blocks(css="#col-container { margin: 0 auto; max-width: 900px; }", theme=gr.themes.Monochrome()) as demo:
127
  gr.Markdown("# LTX Video - Geração e Pós-Produção por Etapas")
128
 
129
  app_state = gr.State(value=create_initial_state())
130
 
 
131
  with gr.Row():
132
  with gr.Column(scale=1):
133
  gr.Markdown("### Etapa 1: Configurações de Geração")
 
 
 
134
 
135
+ generation_mode_input = gr.Radio(
136
+ label="Modo de Geração", choices=["Simples (Prompt Único)", "Narrativa (Múltiplos Prompts)"],
137
+ value="Narrativa (Múltiplos Prompts)", info="Simples para uma ação, Narrativa para uma sequência (uma cena por linha)."
138
+ )
139
+ prompt_input = gr.Textbox(label="Prompt(s)", value="Um leão majestoso caminha pela savana\nEle sobe em uma grande pedra e olha o horizonte", lines=4)
140
+ neg_prompt_input = gr.Textbox(label="Negative Prompt", value="blurry, low quality, bad anatomy", lines=2)
141
+ start_image = gr.Image(label="Imagem de Início (Opcional)", type="filepath", sources=["upload"])
142
+
143
+ with gr.Accordion("Parâmetros Principais", open=True):
144
+ duration_input = gr.Slider(label="Duração Total (s)", value=8, step=1, minimum=2, maximum=40)
145
+ with gr.Row():
146
+ height_input = gr.Slider(label="Height", value=512, step=32, minimum=256, maximum=1024)
147
+ width_input = gr.Slider(label="Width", value=704, step=32, minimum=256, maximum=1024)
148
+ with gr.Row():
149
+ seed_input = gr.Number(label="Seed", value=42, precision=0)
150
+ randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
151
+
152
+ with gr.Accordion("Opções Adicionais LTX (Avançado)", open=False):
153
+ gr.Markdown("Estes parâmetros sobrepõem os valores padrão do arquivo de configuração do LTX.")
154
+
155
+ with gr.Tabs():
156
+ with gr.TabItem("First Pass"):
157
+ fp_num_inference_steps = gr.Slider(
158
+ label="Passos de Inferência", minimum=10, maximum=100, step=1, value=30,
159
+ info="Padrão do config é 30. Controla o número de passos do denoise inicial."
160
+ )
161
+ fp_guidance_scale = gr.Slider(
162
+ label="Força da Guiagem (Pico)", minimum=1.0, maximum=15.0, step=0.5, value=8.0,
163
+ info="Padrão do config tem um pico de 8.0. Controla o quão forte o prompt guia a formação da imagem."
164
+ )
165
+
166
+ with gr.TabItem("Geral"):
167
+ sampler = gr.Radio(
168
+ label="Sampler", choices=["from_checkpoint", "uniform", "linear-quadratic"], value="from_checkpoint",
169
+ info="Como o scheduler calcula os timesteps."
170
+ )
171
+ stg_mode = gr.Radio(
172
+ label="Modo de Guiagem Espaço-Temporal (STG)",
173
+ choices=["attention_values", "attention_skip", "residual", "transformer_block"],
174
+ value="attention_values", info="Como a guiagem de movimento é aplicada."
175
+ )
176
+ stochastic_sampling = gr.Checkbox(label="Amostragem Estocástica", value=False, info="Adiciona aleatoriedade ao denoise.")
177
+ downscale_factor = gr.Slider(label="Fator de Downscale", minimum=0.1, maximum=1.0, step=0.01, value=0.66, info="Tamanho da geração inicial (padrão ~0.66).")
178
+
179
+ with gr.TabItem("Decode VAE"):
180
+ decode_timestep = gr.Slider(label="Decode Timestep", minimum=0.0, maximum=1.0, step=0.01, value=0.05, info="Nível de ruído para o VAE denoiser.")
181
+ decode_noise_scale = gr.Slider(label="Decode Noise Scale", minimum=0.0, maximum=1.0, step=0.005, value=0.025, info="Escala do ruído no decode.")
182
+
183
+ cfg_input = gr.Slider(label="Guidance Scale (CFG)", info="Afeta o refinamento (se usado) e não tem efeito no First Pass dos modelos 'distilled'.", value=3.0, step=0.1, minimum=1.0, maximum=10.0)
184
+
185
+ generate_low_btn = gr.Button("1. Gerar Vídeo Base", variant="primary")
186
 
187
  with gr.Column(scale=1):
188
  gr.Markdown("### Vídeo Base Gerado")
189
+ low_res_video_output = gr.Video(label="O resultado da Etapa 1 aparecerá aqui", interactive=False)
190
 
 
191
  with gr.Group(visible=False) as post_prod_group:
192
+ gr.Markdown("<hr style='margin-top: 20px; margin-bottom: 20px;'>")
193
  gr.Markdown("## Etapa 2: Pós-Produção")
194
+
 
195
  with gr.Tabs():
 
196
  with gr.TabItem("🚀 Upscaler Textura (LTX)"):
197
  with gr.Row():
198
  with gr.Column(scale=1):
199
+ gr.Markdown("Reutiliza o prompt e CFG para refinar a textura.")
200
+ ltx_refine_btn = gr.Button("Aplicar Refinamento LTX", variant="primary")
 
201
  with gr.Column(scale=1):
202
+ ltx_refined_video_output = gr.Video(label="Vídeo com Textura Refinada", interactive=False)
203
+
 
 
204
  with gr.TabItem("✨ Upscaler SeedVR"):
205
  with gr.Row():
206
  with gr.Column(scale=1):
 
207
  seedvr_seed = gr.Slider(minimum=0, maximum=999999, value=42, step=1, label="Seed")
208
+ seedvr_resolution = gr.Slider(minimum=720, maximum=1440, value=1072, step=8, label="Resolução Vertical")
209
  seedvr_batch_size = gr.Slider(minimum=1, maximum=16, value=4, step=1, label="Batch Size por GPU")
210
  seedvr_fps_output = gr.Number(label="FPS de Saída (0 = original)", value=0)
211
  run_seedvr_button = gr.Button("Iniciar Upscaling SeedVR", variant="primary", interactive=(seedvr_inference_server is not None))
212
  if not seedvr_inference_server:
213
+ gr.Markdown("<p style='color: red;'>Serviço SeedVR não disponível.</p>")
214
  with gr.Column(scale=1):
 
215
  seedvr_video_output = gr.Video(label="Vídeo com Upscale SeedVR", interactive=False)
216
+ seedvr_status_box = gr.Textbox(label="Status", value="Aguardando...", lines=3, interactive=False)
217
+
218
+ # --- LÓGICA DE EVENTOS ---
219
+ all_ltx_inputs = [
220
+ fp_num_inference_steps, fp_guidance_scale,
221
+ sampler, stg_mode, stochastic_sampling,
222
+ decode_timestep, decode_noise_scale, downscale_factor,
223
+ ]
224
+
225
  generate_low_btn.click(
226
+ fn=run_generate_base_video,
227
+ inputs=[
228
+ generation_mode_input, prompt_input, neg_prompt_input, start_image, height_input, width_input,
229
+ duration_input, cfg_input, seed_input, randomize_seed,
230
+ *all_ltx_inputs
231
+ ],
232
  outputs=[low_res_video_output, app_state, post_prod_group]
233
  )
234
 
 
235
  ltx_refine_btn.click(
236
  fn=run_ltx_refinement,
237
  inputs=[app_state, prompt_input, neg_prompt_input, cfg_input],
238
  outputs=[ltx_refined_video_output, app_state]
239
  )
240
 
 
241
  run_seedvr_button.click(
242
  fn=run_seedvr_upscaling,
243
  inputs=[app_state, seedvr_seed, seedvr_resolution, seedvr_batch_size, seedvr_fps_output],