Update app.py
Browse files24 unmodified lines25262728293080 unmodified lines111112113114115116442 unmodified lines55956056156256356456556656756856957057157257357457557624 unmodified linesimport gradio as grimport pk_workflow as pkMODEL_REPO = os.environ.get("H3_MODEL_REPO", "MiniMaxAI/MiniMax-H3")CONDITIONER_SPACE = os.environ.get("H3_CONDITIONER", "dagloop5/qwen3vl-conditioner")80 unmodified lines"er_sde": "er_sde","dpmpp_2m_sde_gpu": "dpmpp_2m_sde_gpu","dpmpp_3m_sde_gpu": "dpmpp_3m_sde_gpu",}DEFAULT_SAMPLER = "euler"442 unmodified linesstarted = time.time()with pk.use_schedule(PIPE, steps, schedule, video_shift, audio_shift, sampler_name=sampler, seed=int(seed)):state = PIPE(prompt_embeds=prompt_embeds.to("cuda"),text_token_tags=text_token_tags,image=first_frame,last_image=last_frame,height=height,width=width,num_frames=num_frames,num_inference_steps=requested_steps,output_type="pt",generator=torch.Generator("cpu").manual_seed(int(seed)),)denoised = time.time() - startedvideo = state.get("videos")[0] # (frames, 3, H, W), float in [0, 1], on the card24 unmodified lines2526272829303180 unmodified lines112113114115116117118442 unmodified lines56156256356456556656756856957057157257357457557657757857958024 unmodified linesimport gradio as grimport pk_workflow as pkfrom h3_dpmpp_2s_ancestral import use_dpmpp_2s_ancestralMODEL_REPO = os.environ.get("H3_MODEL_REPO", "MiniMaxAI/MiniMax-H3")CONDITIONER_SPACE = os.environ.get("H3_CONDITIONER", "dagloop5/qwen3vl-conditioner")80 unmodified lines"er_sde": "er_sde","dpmpp_2m_sde_gpu": "dpmpp_2m_sde_gpu","dpmpp_3m_sde_gpu": "dpmpp_3m_sde_gpu","dpmpp_2s_ancestral": "dpmpp_2s_ancestral",}DEFAULT_SAMPLER = "euler"442 unmodified linesstarted = time.time()with pk.use_schedule(PIPE, steps, schedule, video_shift, audio_shift, sampler_name=sampler, seed=int(seed)):with use_dpmpp_2s_ancestral(PIPE, int(seed), enabled=(sampler == "dpmpp_2s_ancestral")):state = PIPE(prompt_embeds=prompt_embeds.to("cuda"),text_token_tags=text_token_tags,image=first_frame,last_image=last_frame,height=height,width=width,num_frames=num_frames,num_inference_steps=requested_steps,output_type="pt",generator=torch.Generator("cpu").manual_seed(int(seed)),)denoised = time.time() - startedvideo = state.get("videos")[0] # (frames, 3, H, W), float in [0, 1], on the card
app.py+16-12