Spaces:
Runtime error
Runtime error
Update app.py
Browse files47 unmodified lines4849505152539 unmodified lines636465666768697071727374757677788 unmodified lines8788899091929316 unmodified lines11011111211311411511661 unmodified lines17817918018118218317 unmodified lines20120220320420520620747 unmodified linesframes_to_use,seed,randomize_seed,improve_texture=False, progress=gr.Progress(track_tqdm=True)):if randomize_seed:9 unmodified linesif mode == "text-to-video" and (video is not None):video = load_video(video)[:frames_to_use]condition = True#elif mode == "image-to-video" and (image is not None):elif image is not None:print("WTFFFFFF")video = [image]condition = Trueelse:condition=Falseif condition:print("WTFFFFFF")condition1 = LTXVideoCondition(video=video, frame_index=0)else:condition1 = None8 unmodified linesnum_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",).frames16 unmodified lineswidth=upscaled_width,height=upscaled_height,num_frames=num_frames,guidance_scale=1.0,denoise_strength=0.6, # Effectively, 0.6 * 3 inference stepsnum_inference_steps=3,latents=upscaled_latents,61 unmodified linesseed = gr.Number(label="seed", value=0, precision=0)randomize_seed = gr.Checkbox(label="randomize seed")with gr.Row():steps = gr.Slider(label="Steps", minimum=1, maximum=30, value=8, step=1)num_frames = gr.Slider(label="# frames", minimum=1, maximum=161, value=96, step=1)with gr.Row():17 unmodified linesnum_frames,frames_to_use,seed,randomize_seed, improve_texture],outputs=[output])47 unmodified lines484950515253549 unmodified lines6465666768697071727374757677788 unmodified lines8788899091929316 unmodified lines11011111211311411511661 unmodified lines17817918018118218318417 unmodified lines20220320420520620720847 unmodified linesframes_to_use,seed,randomize_seed,guidance_scale,improve_texture=False, progress=gr.Progress(track_tqdm=True)):if randomize_seed:9 unmodified linesif mode == "text-to-video" and (video is not None):video = load_video(video)[:frames_to_use]condition = Trueelif mode == "image-to-video" and (image is not None):print("WTFFFFFF 1")video = [image]condition = Trueelse:condition=Falseif condition:print("WTFFFFFF 2")condition1 = LTXVideoCondition(video=video, frame_index=0)else:condition1 = None8 unmodified linesnum_inference_steps=steps,decode_timestep = 0.05,decode_noise_scale = 0.025,guidance_scale=guidance_scale,generator=torch.Generator(device="cuda").manual_seed(seed),output_type="latent",).frames16 unmodified lineswidth=upscaled_width,height=upscaled_height,num_frames=num_frames,guidance_scale=guidance_scale,denoise_strength=0.6, # Effectively, 0.6 * 3 inference stepsnum_inference_steps=3,latents=upscaled_latents,61 unmodified linesseed = gr.Number(label="seed", value=0, precision=0)randomize_seed = gr.Checkbox(label="randomize seed")with gr.Row():guidance_scale= gr.Slider(label="guidance scale", minimum=0, maximum=10, value=3, step=1)steps = gr.Slider(label="Steps", minimum=1, maximum=30, value=8, step=1)num_frames = gr.Slider(label="# frames", minimum=1, maximum=161, value=96, step=1)with gr.Row():17 unmodified linesnum_frames,frames_to_use,seed,randomize_seed,guidance_scale, improve_texture],outputs=[output])
app.py+8-7