Skip to content

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

@gangxu822

Description

@gangxu822

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

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