dagloop5 commited on
Commit
d1e2003
·
verified ·
1 Parent(s): 65a7ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -13
app.py CHANGED
@@ -25,7 +25,7 @@ import spaces
25
  import gradio as gr
26
 
27
  import pk_workflow as pk
28
- from h3_dpmpp_2s_ancestral import use_dpmpp_2s_ancestral
29
 
30
  MODEL_REPO = os.environ.get("H3_MODEL_REPO", "MiniMaxAI/MiniMax-H3")
31
  CONDITIONER_SPACE = os.environ.get("H3_CONDITIONER", "dagloop5/qwen3vl-conditioner")
@@ -113,6 +113,8 @@ SAMPLERS = {
113
  "dpmpp_2m_sde_gpu": "dpmpp_2m_sde_gpu",
114
  "dpmpp_3m_sde_gpu": "dpmpp_3m_sde_gpu",
115
  "dpmpp_2s_ancestral": "dpmpp_2s_ancestral",
 
 
116
  }
117
  DEFAULT_SAMPLER = "euler"
118
 
@@ -562,18 +564,20 @@ def _generate(
562
  started = time.time()
563
  with pk.use_schedule(PIPE, steps, schedule, video_shift, audio_shift, sampler_name=sampler, seed=int(seed)):
564
  with use_dpmpp_2s_ancestral(PIPE, int(seed), enabled=(sampler == "dpmpp_2s_ancestral")):
565
- state = PIPE(
566
- prompt_embeds=prompt_embeds.to("cuda"),
567
- text_token_tags=text_token_tags,
568
- image=first_frame,
569
- last_image=last_frame,
570
- height=height,
571
- width=width,
572
- num_frames=num_frames,
573
- num_inference_steps=requested_steps,
574
- output_type="pt",
575
- generator=torch.Generator("cpu").manual_seed(int(seed)),
576
- )
 
 
577
 
578
  denoised = time.time() - started
579
 
 
25
  import gradio as gr
26
 
27
  import pk_workflow as pk
28
+ from h3_dpmpp_2s_ancestral import use_dpmpp_2s_ancestral, use_dpmpp_sde_gpu, use_seeds_2
29
 
30
  MODEL_REPO = os.environ.get("H3_MODEL_REPO", "MiniMaxAI/MiniMax-H3")
31
  CONDITIONER_SPACE = os.environ.get("H3_CONDITIONER", "dagloop5/qwen3vl-conditioner")
 
113
  "dpmpp_2m_sde_gpu": "dpmpp_2m_sde_gpu",
114
  "dpmpp_3m_sde_gpu": "dpmpp_3m_sde_gpu",
115
  "dpmpp_2s_ancestral": "dpmpp_2s_ancestral",
116
+ "dpmpp_sde_gpu": "dpmpp_sde_gpu",
117
+ "seeds_2": "seeds_2",
118
  }
119
  DEFAULT_SAMPLER = "euler"
120
 
 
564
  started = time.time()
565
  with pk.use_schedule(PIPE, steps, schedule, video_shift, audio_shift, sampler_name=sampler, seed=int(seed)):
566
  with use_dpmpp_2s_ancestral(PIPE, int(seed), enabled=(sampler == "dpmpp_2s_ancestral")):
567
+ with use_dpmpp_sde_gpu(PIPE, int(seed), enabled=(sampler == "dpmpp_sde_gpu")):
568
+ with use_seeds_2(PIPE, int(seed), enabled=(sampler == "seeds_2")):
569
+ state = PIPE(
570
+ prompt_embeds=prompt_embeds.to("cuda"),
571
+ text_token_tags=text_token_tags,
572
+ image=first_frame,
573
+ last_image=last_frame,
574
+ height=height,
575
+ width=width,
576
+ num_frames=num_frames,
577
+ num_inference_steps=requested_steps,
578
+ output_type="pt",
579
+ generator=torch.Generator("cpu").manual_seed(int(seed)),
580
+ )
581
 
582
  denoised = time.time() - started
583