Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -177,7 +177,6 @@ class HQPipelineWithCachedLoRA:
|
|
| 177 |
audio_guider_params: MultiModalGuiderParams,
|
| 178 |
images: list,
|
| 179 |
tiling_config: TilingConfig | None = None,
|
| 180 |
-
enhance_prompt: bool = False,
|
| 181 |
):
|
| 182 |
from ltx_pipelines.utils import assert_resolution, cleanup_memory, combined_image_conditionings, encode_prompts, res2s_audio_video_denoising_loop, multi_modal_guider_denoising_func, simple_denoising_func, denoise_audio_video
|
| 183 |
from ltx_core.tools import VideoLatentShape
|
|
@@ -200,9 +199,6 @@ class HQPipelineWithCachedLoRA:
|
|
| 200 |
ctx_p, ctx_n = encode_prompts(
|
| 201 |
[prompt, negative_prompt],
|
| 202 |
self.model_ledger,
|
| 203 |
-
enhance_first_prompt=enhance_prompt,
|
| 204 |
-
enhance_prompt_image=images[0].path if len(images) > 0 else None,
|
| 205 |
-
enhance_prompt_seed=seed,
|
| 206 |
)
|
| 207 |
|
| 208 |
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
|
|
@@ -689,7 +685,6 @@ def get_gpu_duration(
|
|
| 689 |
negative_prompt: str,
|
| 690 |
duration: float,
|
| 691 |
gpu_duration: float,
|
| 692 |
-
enhance_prompt: bool = False,
|
| 693 |
seed: int = 42,
|
| 694 |
randomize_seed: bool = True,
|
| 695 |
height: int = 1024,
|
|
@@ -729,7 +724,6 @@ def generate_video(
|
|
| 729 |
negative_prompt: str,
|
| 730 |
duration: float,
|
| 731 |
gpu_duration: float,
|
| 732 |
-
enhance_prompt: bool = False,
|
| 733 |
seed: int = 42,
|
| 734 |
randomize_seed: bool = True,
|
| 735 |
height: int = 1024,
|
|
@@ -828,7 +822,6 @@ def generate_video(
|
|
| 828 |
audio_guider_params=audio_guider_params,
|
| 829 |
images=images,
|
| 830 |
tiling_config=tiling_config,
|
| 831 |
-
enhance_prompt=enhance_prompt,
|
| 832 |
)
|
| 833 |
|
| 834 |
log_memory("after pipeline call")
|
|
@@ -897,7 +890,6 @@ with gr.Blocks(title="LTX-2.3 Two-Stage HQ with LoRA Cache") as demo:
|
|
| 897 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 898 |
|
| 899 |
with gr.Row():
|
| 900 |
-
enhance_prompt = gr.Checkbox(label="Enhance Prompt", value=False)
|
| 901 |
high_res = gr.Checkbox(label="High Resolution", value=True)
|
| 902 |
|
| 903 |
with gr.Row():
|
|
@@ -1010,7 +1002,7 @@ with gr.Blocks(title="LTX-2.3 Two-Stage HQ with LoRA Cache") as demo:
|
|
| 1010 |
fn=generate_video,
|
| 1011 |
inputs=[
|
| 1012 |
first_image, last_image, prompt, negative_prompt, duration, gpu_duration,
|
| 1013 |
-
seed, randomize_seed, height, width,
|
| 1014 |
video_cfg_scale, video_stg_scale, video_rescale_scale, video_a2v_scale,
|
| 1015 |
audio_cfg_scale, audio_stg_scale, audio_rescale_scale, audio_v2a_scale,
|
| 1016 |
distilled_strength, pose_strength, general_strength, motion_strength,
|
|
|
|
| 177 |
audio_guider_params: MultiModalGuiderParams,
|
| 178 |
images: list,
|
| 179 |
tiling_config: TilingConfig | None = None,
|
|
|
|
| 180 |
):
|
| 181 |
from ltx_pipelines.utils import assert_resolution, cleanup_memory, combined_image_conditionings, encode_prompts, res2s_audio_video_denoising_loop, multi_modal_guider_denoising_func, simple_denoising_func, denoise_audio_video
|
| 182 |
from ltx_core.tools import VideoLatentShape
|
|
|
|
| 199 |
ctx_p, ctx_n = encode_prompts(
|
| 200 |
[prompt, negative_prompt],
|
| 201 |
self.model_ledger,
|
|
|
|
|
|
|
|
|
|
| 202 |
)
|
| 203 |
|
| 204 |
v_context_p, a_context_p = ctx_p.video_encoding, ctx_p.audio_encoding
|
|
|
|
| 685 |
negative_prompt: str,
|
| 686 |
duration: float,
|
| 687 |
gpu_duration: float,
|
|
|
|
| 688 |
seed: int = 42,
|
| 689 |
randomize_seed: bool = True,
|
| 690 |
height: int = 1024,
|
|
|
|
| 724 |
negative_prompt: str,
|
| 725 |
duration: float,
|
| 726 |
gpu_duration: float,
|
|
|
|
| 727 |
seed: int = 42,
|
| 728 |
randomize_seed: bool = True,
|
| 729 |
height: int = 1024,
|
|
|
|
| 822 |
audio_guider_params=audio_guider_params,
|
| 823 |
images=images,
|
| 824 |
tiling_config=tiling_config,
|
|
|
|
| 825 |
)
|
| 826 |
|
| 827 |
log_memory("after pipeline call")
|
|
|
|
| 890 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
| 891 |
|
| 892 |
with gr.Row():
|
|
|
|
| 893 |
high_res = gr.Checkbox(label="High Resolution", value=True)
|
| 894 |
|
| 895 |
with gr.Row():
|
|
|
|
| 1002 |
fn=generate_video,
|
| 1003 |
inputs=[
|
| 1004 |
first_image, last_image, prompt, negative_prompt, duration, gpu_duration,
|
| 1005 |
+
seed, randomize_seed, height, width,
|
| 1006 |
video_cfg_scale, video_stg_scale, video_rescale_scale, video_a2v_scale,
|
| 1007 |
audio_cfg_scale, audio_stg_scale, audio_rescale_scale, audio_v2a_scale,
|
| 1008 |
distilled_strength, pose_strength, general_strength, motion_strength,
|