Skip to content

Commit

Permalink
[fix]fixed gradio issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MegActor-Sigma committed Jun 24, 2024
1 parent f71bba9 commit 6575dee
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions demo/run_gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ def animate(reference_image, motion_sequence, steps, guidance_scale, sample_l, s
num_steps=steps,
device=torch.device(f"cuda:0" if torch.cuda.is_available() else "cpu"),
model=model,
# face_detector=None,
# dwpose_model=None,
image_processor=image_processor,
image_encoder=image_encoder,
clip_image_type="background",
Expand Down Expand Up @@ -85,7 +83,6 @@ def animate(reference_image, motion_sequence, steps, guidance_scale, sample_l, s
motion_sequence = gr.Video(format="mp4", label="Driver video")

with gr.Column():
# random_seed = gr.Number(label="Random seed", value=42, info="default: 42")
sampling_steps = gr.Number(label="Sampling steps", value=25, info="default: 25", precision=0)
guidance_scale = gr.Number(label="Guidance scale", value=4.5, info="default: 4.5")
sample_l = gr.Number(label="Sample from n-th frame of the video", value=0, precision=0)
Expand All @@ -95,13 +92,6 @@ def animate(reference_image, motion_sequence, steps, guidance_scale, sample_l, s

def read_video(video, size=512):
return video
# size = int(size)
# reader = imageio.get_reader(video)
# # fps = reader.get_meta_data()['fps']
# frames = []
# for img in reader:
# frames.append(np.array(Image.fromarray(img).resize((size, size))))
# return frames

def read_image(image, size=512):
img = np.array(Image.fromarray(image).resize((size, size)))
Expand Down

0 comments on commit 6575dee

Please sign in to comment.