Text2LIVE icon indicating copy to clipboard operation
Text2LIVE copied to clipboard

AttributeError: module 'torch.nn.functional' has no attribute '_pad'

Open Pavankunchala opened this issue 3 years ago • 4 comments

I am getting this error, when i am trying running the code

Pavankunchala avatar Nov 23 '22 15:11 Pavankunchala

Hi, what torch version are you using? it shouldn't happen with the versions specified in the requirements file, but you can also try to comment out this line.

omerbt avatar Nov 24 '22 08:11 omerbt

I had this issue too after upgrading torch, as the version specified in the requirements file throws the following error for a 3090:

NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.

Commenting out the line you mentioned fixed it though.

justLV avatar Jan 29 '23 20:01 justLV

I've had the same issue with torch==0.10.0. Had to use the latest version of torch and commented out the mentioned line with the pad assignment.

SamSamhuns avatar Jan 31 '23 04:01 SamSamhuns

change this pad = F._pad to pad = F.pad in auxilary.py

Zakharyan9889 avatar Feb 15 '23 21:02 Zakharyan9889