Spaces:
Paused
Paused
Update api/ltx_server_refactored.py
Browse files
api/ltx_server_refactored.py
CHANGED
|
@@ -228,7 +228,7 @@ class VideoService:
|
|
| 228 |
def generate_low(
|
| 229 |
self, prompt, negative_prompt,
|
| 230 |
height, width, duration, seed,
|
| 231 |
-
|
| 232 |
):
|
| 233 |
guidance_scale="4"
|
| 234 |
used_seed = random.randint(0, 2**32 - 1) if seed is None else int(seed)
|
|
@@ -248,7 +248,7 @@ class VideoService:
|
|
| 248 |
first_pass_kwargs = {
|
| 249 |
"prompt": prompt, "negative_prompt": negative_prompt, "height": downscaled_height, "width": downscaled_width,
|
| 250 |
"num_frames": actual_num_frames, "frame_rate": int(FPS), "generator": torch.Generator(device=self.device).manual_seed(used_seed),
|
| 251 |
-
"output_type": "latent", "conditioning_items":
|
| 252 |
**(self.config.get("first_pass", {}))
|
| 253 |
}
|
| 254 |
try:
|
|
@@ -279,7 +279,7 @@ class VideoService:
|
|
| 279 |
def generate_narrative_low(
|
| 280 |
self, prompt: str, negative_prompt,
|
| 281 |
height, width, duration,
|
| 282 |
-
seed,
|
| 283 |
ltx_configs_override: dict = None):
|
| 284 |
|
| 285 |
print("\n" + "="*80)
|
|
@@ -319,7 +319,7 @@ class VideoService:
|
|
| 319 |
video_path, tensor_path, final_seed = generate_low(
|
| 320 |
prompt=prompt_x, negative_prompt=negative_prompt, height=height,
|
| 321 |
width=width, duration=duration, seed=seed,
|
| 322 |
-
|
| 323 |
)
|
| 324 |
|
| 325 |
#log_tensor_info(latentes_chunk, f"latentes_chunk")
|
|
|
|
| 228 |
def generate_low(
|
| 229 |
self, prompt, negative_prompt,
|
| 230 |
height, width, duration, seed,
|
| 231 |
+
conditions_itens, ltx_configs_override,
|
| 232 |
):
|
| 233 |
guidance_scale="4"
|
| 234 |
used_seed = random.randint(0, 2**32 - 1) if seed is None else int(seed)
|
|
|
|
| 248 |
first_pass_kwargs = {
|
| 249 |
"prompt": prompt, "negative_prompt": negative_prompt, "height": downscaled_height, "width": downscaled_width,
|
| 250 |
"num_frames": actual_num_frames, "frame_rate": int(FPS), "generator": torch.Generator(device=self.device).manual_seed(used_seed),
|
| 251 |
+
"output_type": "latent", "conditioning_items": conditions_itens,
|
| 252 |
**(self.config.get("first_pass", {}))
|
| 253 |
}
|
| 254 |
try:
|
|
|
|
| 279 |
def generate_narrative_low(
|
| 280 |
self, prompt: str, negative_prompt,
|
| 281 |
height, width, duration,
|
| 282 |
+
seed, conditions_itens=None,
|
| 283 |
ltx_configs_override: dict = None):
|
| 284 |
|
| 285 |
print("\n" + "="*80)
|
|
|
|
| 319 |
video_path, tensor_path, final_seed = generate_low(
|
| 320 |
prompt=prompt_x, negative_prompt=negative_prompt, height=height,
|
| 321 |
width=width, duration=duration, seed=seed,
|
| 322 |
+
conditions_itens=conditions_itens, ltx_configs_override=ltx_configs_override,
|
| 323 |
)
|
| 324 |
|
| 325 |
#log_tensor_info(latentes_chunk, f"latentes_chunk")
|