Spaces:
Runtime error
Runtime error
Update app.py
Browse files66 unmodified lines67686970717273747576777879808182838485868788899091929394959697989910020 unmodified lines12112212312412512612712857 unmodified lines18618718818919019119266 unmodified linesif condition:condition1 = LTXVideoCondition(video=video, frame_index=0)latents = pipe(conditions=condition1,prompt=prompt,negative_prompt=negative_prompt,width=downscaled_width,height=downscaled_height,num_frames=num_frames,num_inference_steps=steps,decode_timestep = 0.05,decode_noise_scale = 0.025,guidance_scale=1.0,generator=torch.Generator(device="cuda").manual_seed(seed),output_type="latent",).frameselse:latents = pipe(prompt=prompt,negative_prompt=negative_prompt,width=downscaled_width,height=downscaled_height,num_frames=num_frames,num_inference_steps=steps,decode_timestep = 0.05,decode_noise_scale = 0.025,guidance_scale=1.0,generator=torch.Generator(device="cuda").manual_seed(seed),output_type="latent",).frames20 unmodified linesoutput_type="latent").frames# Part 3. Denoise the upscaled video with few steps to improve texture (optional, but recommended)video = pipe(conditions=condition1,prompt=prompt,57 unmodified linesvideo = gr.Video(label="")frames_to_use = gr.Number(label="num frames to use",info="first # of frames to use from the input video", value=1)prompt = gr.Textbox(label="prompt")improve_texture = gr.Checkbox("improve texture", value=False, info="note it slows generation")run_button = gr.Button()with gr.Column():output = gr.Video(interactive=False)66 unmodified lines67686970717273747576777879808182838485868788899020 unmodified lines11111211311411511611757 unmodified lines17517617717817918018166 unmodified linesif condition:condition1 = LTXVideoCondition(video=video, frame_index=0)else:condition1 = Nonelatents = pipe(conditions=condition1,prompt=prompt,negative_prompt=negative_prompt,width=downscaled_width,height=downscaled_height,num_frames=num_frames,num_inference_steps=steps,decode_timestep = 0.05,decode_noise_scale = 0.025,guidance_scale=1.0,generator=torch.Generator(device="cuda").manual_seed(seed),output_type="latent",).frames20 unmodified linesoutput_type="latent").frames# Part 3. Denoise the upscaled video with few steps to improve texture (optional, but recommended)video = pipe(conditions=condition1,prompt=prompt,57 unmodified linesvideo = gr.Video(label="")frames_to_use = gr.Number(label="num frames to use",info="first # of frames to use from the input video", value=1)prompt = gr.Textbox(label="prompt")improve_texture = gr.Checkbox(label="improve texture", value=False, info="note it slows generation")run_button = gr.Button()with gr.Column():output = gr.Video(interactive=False)
app.py+19-30