Skip to content

请教大佬,为什么read_imgs(input_img_list) 耗时 ,但是 read_imgs(input_mask_list) 就很快, #395

Description

@ruili0619

else:
self.input_latent_list_cycle = torch.load(self.latents_out_path)
with open(self.coords_path, 'rb') as f:
self.coord_list_cycle = pickle.load(f)
input_img_list = glob.glob(os.path.join(self.full_imgs_path, '.[jpJP][pnPN][gG]'))
input_img_list = sorted(input_img_list, key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))

  self.frame_list_cycle = read_imgs(input_img_list)
  with open(self.mask_coords_path, 'rb') as f:
      self.mask_coords_list_cycle = pickle.load(f)
  input_mask_list = glob.glob(os.path.join(self.mask_out_path, '*.[jpJP][pnPN]*[gG]'))
  input_mask_list = sorted(input_mask_list, key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))
  self.mask_list_cycle = read_imgs(input_mask_list)

reading images...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 244/244 [00:09<00:00, 25.49it/s]
[2025-11-14 16:37:46]:开始加载已有素材4
reading images...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 244/244 [00:00<00:00, 1456.50it/s]
[2025-11-14 16:37:46]: 开始推理并生成视频..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions