Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -892,13 +892,16 @@ def generate(
|
|
| 892 |
for name, strength in lora_strengths.items()
|
| 893 |
if strength > 0
|
| 894 |
)
|
|
|
|
| 895 |
info = [
|
| 896 |
-
f"{
|
| 897 |
f"sampler `{sampler}`",
|
| 898 |
f"shift {float(video_shift):.1f}/{float(audio_shift):.1f}",
|
| 899 |
*post,
|
| 900 |
f"seed {int(seed)}",
|
| 901 |
]
|
|
|
|
|
|
|
| 902 |
if lora_text:
|
| 903 |
info.append(lora_text)
|
| 904 |
report = (
|
|
@@ -906,13 +909,26 @@ def generate(
|
|
| 906 |
f"{' 路 '.join(info)}\n\n"
|
| 907 |
f"conditioner {condition_seconds:.0f}s ({plan['num_text_tokens']} tokens"
|
| 908 |
f"{', upsampled' if refined else ''}) 路 denoise + decode {denoise_seconds:.0f}s "
|
| 909 |
-
f"({denoise_seconds / max(1,
|
| 910 |
f"GPU {gpu_seconds:.0f}s of {booked_seconds}s booked"
|
| 911 |
)
|
| 912 |
if refined:
|
| 913 |
report += f"\n\n**Upsampled prompt**\n\n{refined}"
|
| 914 |
print(f"[gen] {report}", flush=True)
|
| 915 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 916 |
|
| 917 |
|
| 918 |
def _fit_keyframe(image_path, current_canvas):
|
|
|
|
| 892 |
for name, strength in lora_strengths.items()
|
| 893 |
if strength > 0
|
| 894 |
)
|
| 895 |
+
steps_done_after = steps_done + this_stage_steps
|
| 896 |
info = [
|
| 897 |
+
f"{this_stage_steps} steps of `{schedule_key}`",
|
| 898 |
f"sampler `{sampler}`",
|
| 899 |
f"shift {float(video_shift):.1f}/{float(audio_shift):.1f}",
|
| 900 |
*post,
|
| 901 |
f"seed {int(seed)}",
|
| 902 |
]
|
| 903 |
+
if stage_enabled:
|
| 904 |
+
info.append(f"staged {steps_done_after}/{int(target_steps)} steps")
|
| 905 |
if lora_text:
|
| 906 |
info.append(lora_text)
|
| 907 |
report = (
|
|
|
|
| 909 |
f"{' 路 '.join(info)}\n\n"
|
| 910 |
f"conditioner {condition_seconds:.0f}s ({plan['num_text_tokens']} tokens"
|
| 911 |
f"{', upsampled' if refined else ''}) 路 denoise + decode {denoise_seconds:.0f}s "
|
| 912 |
+
f"({denoise_seconds / max(1, this_stage_steps):.1f} s/step) 路 post {post_seconds:.0f}s 路 "
|
| 913 |
f"GPU {gpu_seconds:.0f}s of {booked_seconds}s booked"
|
| 914 |
)
|
| 915 |
if refined:
|
| 916 |
report += f"\n\n**Upsampled prompt**\n\n{refined}"
|
| 917 |
print(f"[gen] {report}", flush=True)
|
| 918 |
+
|
| 919 |
+
new_stage_state = (
|
| 920 |
+
{
|
| 921 |
+
"video_latents": stage_video_latents,
|
| 922 |
+
"audio_latents": stage_audio_latents,
|
| 923 |
+
"height": height,
|
| 924 |
+
"width": width,
|
| 925 |
+
"num_frames": num_frames,
|
| 926 |
+
"steps_done": steps_done_after,
|
| 927 |
+
}
|
| 928 |
+
if stage_enabled
|
| 929 |
+
else None
|
| 930 |
+
)
|
| 931 |
+
return path, report, new_stage_state
|
| 932 |
|
| 933 |
|
| 934 |
def _fit_keyframe(image_path, current_canvas):
|