Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ from PIL import Image
|
|
| 13 |
# --- Import dos Serviços de Backend ---
|
| 14 |
|
| 15 |
# Serviço LTX para geração de vídeo base e refinamento de textura
|
| 16 |
-
from api.ltx_video_complete import video_service
|
| 17 |
|
| 18 |
# --- ESTADO DA SESSÃO ---
|
| 19 |
def create_initial_state():
|
|
@@ -39,7 +39,7 @@ def run_generate_low(prompt, neg_prompt, start_img, height, width, duration, cfg
|
|
| 39 |
|
| 40 |
used_seed = None if randomize_seed else seed
|
| 41 |
|
| 42 |
-
video_path, tensor_path, final_seed =
|
| 43 |
prompt=prompt, negative_prompt=neg_prompt,
|
| 44 |
height=height, width=width, duration_secs=duration,
|
| 45 |
guidance_scale=cfg, seed=used_seed,
|
|
@@ -62,7 +62,7 @@ def run_ltx_refinement(state, prompt, neg_prompt, cfg, progress=gr.Progress(trac
|
|
| 62 |
|
| 63 |
try:
|
| 64 |
# AQUI ESTÁ A MUDANÇA: Chamamos a nova função ponte
|
| 65 |
-
video_path, tensor_path =
|
| 66 |
latents_path=state["low_res_latents"],
|
| 67 |
prompt=prompt,
|
| 68 |
negative_prompt=neg_prompt,
|
|
|
|
| 13 |
# --- Import dos Serviços de Backend ---
|
| 14 |
|
| 15 |
# Serviço LTX para geração de vídeo base e refinamento de textura
|
| 16 |
+
from api.ltx_video_complete import video_service
|
| 17 |
|
| 18 |
# --- ESTADO DA SESSÃO ---
|
| 19 |
def create_initial_state():
|
|
|
|
| 39 |
|
| 40 |
used_seed = None if randomize_seed else seed
|
| 41 |
|
| 42 |
+
video_path, tensor_path, final_seed = video_service.generate_low_resolution(
|
| 43 |
prompt=prompt, negative_prompt=neg_prompt,
|
| 44 |
height=height, width=width, duration_secs=duration,
|
| 45 |
guidance_scale=cfg, seed=used_seed,
|
|
|
|
| 62 |
|
| 63 |
try:
|
| 64 |
# AQUI ESTÁ A MUDANÇA: Chamamos a nova função ponte
|
| 65 |
+
video_path, tensor_path = video_service.apply_secondary_refinement(
|
| 66 |
latents_path=state["low_res_latents"],
|
| 67 |
prompt=prompt,
|
| 68 |
negative_prompt=neg_prompt,
|