OpenImagingLab / OpenImagingLab/FlashVSR

执行full模式( CUDA_VISIBLE_DEVICES=2 python infer_flashvsr_v1.1_full.py )报错,求看下

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
152
PR merge metrics
No merged PRs in 30d

Description

Using wan_video_dit from ./FlashVSR-v1.1/diffusion_pytorch_model_streaming_dmd.safetensors.
Using wan_video_vae from ./FlashVSR-v1.1/Wan2.1_VAE.pth.
/opt/nas/n/xugang/FlashVSR/examples/WanVSR/infer_flashvsr_v1.1_full.py:172: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
pipe.denoising_model().LQ_proj_in.load_state_dict(torch.load(LQ_proj_in_path, map_location="cpu"), strict=True)
/opt/nas/n/xugang/FlashVSR/diffsynth/pipelines/flashvsr_full.py:266: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
ctx = torch.load(prompt_path, map_location=self.device)
==total==: 202
[video_out_河南话-恁_女_20251209-115018.mp4] Original Resolution: 512x768 | Original Frames: 202 | FPS: 25
[video_out_河南话-恁_女_20251209-115018.mp4] Scaled Resolution (x1.5): 768.0x1152.0 -> Target (128-multiple): 768.0x1152.0
[video_out_河南话-恁_女_20251209-115018.mp4] Target Frames (8n-3): 197
Traceback (most recent call last):
File "/opt/nas/n/xugang/FlashVSR/examples/WanVSR/infer_flashvsr_v1.1_full.py", line 223, in
main()
File "/opt/nas/n/xugang/FlashVSR/examples/WanVSR/infer_flashvsr_v1.1_full.py", line 203, in main
LQ, th, tw, F, fps = prepare_input_tensor(p, scale=scale, dtype=dtype, device=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nas/n/xugang/FlashVSR/examples/WanVSR/infer_flashvsr_v1.1_full.py", line 148, in prepare_input_tensor
img_out = upscale_then_center_crop(img, scale=scale, tW=tW, tH=tH)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nas/n/xugang/FlashVSR/examples/WanVSR/infer_flashvsr_v1.1_full.py", line 61, in upscale_then_center_crop
up = img.resize((sW, sH), Image.BICUBIC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nas/p/conda/envs/flashvsr/lib/python3.11/site-packages/PIL/Image.py", line 2365, in resize
return self._new(self.im.resize(size, resample, box))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in examples/WanVSR/infer_flashvsr_v1.1_full.py, especially upscale_then_center_crop and prepare_input_tensor, where the traceback reaches PIL.Image.resize. Check how the scaled width and height are passed to resize, then rerun CUDA_VISIBLE_DEVICES=2 python infer_flashvsr_v1.1_full.py and confirm full-mode inference completes for the reported video.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.