neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.55k stars 895 forks source link

AttributeError: in Colab #359

Open subham0001 opened 1 year ago

subham0001 commented 1 year ago

Hello, when I try to run Simswap in Colab, I keep getting this error. Could some one kindly guide me on how to correct the error? Error --------->>>>>>>>>

AttributeError Traceback (most recent call last)

in 14 15 torch.nn.Module.dump_patches = True ---> 16 model = create_model(opt) 17 model.eval() 18 5 frames /usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py in __setstate__(self, state) 82 self.__dict__.update(state) 83 self._hook_for_profile() # To support multiprocessing pickle/unpickle. ---> 84 self.defaults.setdefault('differentiable', False) 85 86 def __repr__(self): AttributeError: 'SGD' object has no attribute 'defaults'
chenchong23 commented 1 year ago

I also met the same problem, did you solve it?

subham0001 commented 1 year ago

I also met the same problem, did you solve it?

No I didn't if you'll get the solution please tell me my friend

amfapic commented 1 year ago

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

subham0001 commented 1 year ago

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

where should I paste this code my friend.

subham0001 commented 1 year ago

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

thanks bro from my heart thank you. : )

hemsflame commented 1 year ago

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

where should I paste this code my friend.

How to fix it in google colab bro ?