Muhammad Taqi Raza commited on
Commit
69d00ae
·
1 Parent(s): be42567

adding spaces.gpu

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -0
gradio_app.py CHANGED
@@ -5,6 +5,7 @@ from pathlib import Path
5
  import gradio as gr
6
  import numpy as np
7
  import os
 
8
  # -----------------------------
9
  # Setup paths and env
10
  # -----------------------------
@@ -39,6 +40,7 @@ def download_models():
39
  # -----------------------------
40
  # Step 1: Get Anchor Video
41
  # -----------------------------
 
42
  def get_anchor_video(video_path, fps, num_frames, target_pose, mode,
43
  radius_scale, near_far_estimated,
44
  sampler_name, diffusion_guidance_scale, diffusion_inference_steps,
@@ -110,6 +112,7 @@ def get_anchor_video(video_path, fps, num_frames, target_pose, mode,
110
  # -----------------------------
111
  # Step 2: Run Inference
112
  # -----------------------------
 
113
  def inference(
114
  fps, num_frames, controlnet_weights, controlnet_guidance_start,
115
  controlnet_guidance_end, guidance_scale, num_inference_steps, dtype,
 
5
  import gradio as gr
6
  import numpy as np
7
  import os
8
+ import spaces
9
  # -----------------------------
10
  # Setup paths and env
11
  # -----------------------------
 
40
  # -----------------------------
41
  # Step 1: Get Anchor Video
42
  # -----------------------------
43
+ @spaces.GPU
44
  def get_anchor_video(video_path, fps, num_frames, target_pose, mode,
45
  radius_scale, near_far_estimated,
46
  sampler_name, diffusion_guidance_scale, diffusion_inference_steps,
 
112
  # -----------------------------
113
  # Step 2: Run Inference
114
  # -----------------------------
115
+ @spaces.GPU
116
  def inference(
117
  fps, num_frames, controlnet_weights, controlnet_guidance_start,
118
  controlnet_guidance_end, guidance_scale, num_inference_steps, dtype,