Update app.py
Browse files891 unmodified lines8928938948958968978988999009019029039041 unmodified line906907908909910911912913914915916917918891 unmodified linesfor name, strength in lora_strengths.items()if strength > 0)info = [f"{int(steps)} steps of `{schedule_key}`",f"sampler `{sampler}`",f"shift {float(video_shift):.1f}/{float(audio_shift):.1f}",*post,f"seed {int(seed)}",]if lora_text:info.append(lora_text)report = (1 unmodified linef"{' 路 '.join(info)}\n\n"f"conditioner {condition_seconds:.0f}s ({plan['num_text_tokens']} tokens"f"{', upsampled' if refined else ''}) 路 denoise + decode {denoise_seconds:.0f}s "f"({denoise_seconds / max(1, int(steps)):.1f} s/step) 路 post {post_seconds:.0f}s 路 "f"GPU {gpu_seconds:.0f}s of {booked_seconds}s booked")if refined:report += f"\n\n**Upsampled prompt**\n\n{refined}"print(f"[gen] {report}", flush=True)return path, reportdef _fit_keyframe(image_path, current_canvas):891 unmodified lines8928938948958968978988999009019029039049059069071 unmodified line909910911912913914915916917918919920921922923924925926927928929930931932933934891 unmodified linesfor name, strength in lora_strengths.items()if strength > 0)steps_done_after = steps_done + this_stage_stepsinfo = [f"{this_stage_steps} steps of `{schedule_key}`",f"sampler `{sampler}`",f"shift {float(video_shift):.1f}/{float(audio_shift):.1f}",*post,f"seed {int(seed)}",]if stage_enabled:info.append(f"staged {steps_done_after}/{int(target_steps)} steps")if lora_text:info.append(lora_text)report = (1 unmodified linef"{' 路 '.join(info)}\n\n"f"conditioner {condition_seconds:.0f}s ({plan['num_text_tokens']} tokens"f"{', upsampled' if refined else ''}) 路 denoise + decode {denoise_seconds:.0f}s "f"({denoise_seconds / max(1, this_stage_steps):.1f} s/step) 路 post {post_seconds:.0f}s 路 "f"GPU {gpu_seconds:.0f}s of {booked_seconds}s booked")if refined:report += f"\n\n**Upsampled prompt**\n\n{refined}"print(f"[gen] {report}", flush=True)new_stage_state = ({"video_latents": stage_video_latents,"audio_latents": stage_audio_latents,"height": height,"width": width,"num_frames": num_frames,"steps_done": steps_done_after,}if stage_enabledelse None)return path, report, new_stage_statedef _fit_keyframe(image_path, current_canvas):
app.py+19-3