Issue with GTX 3070 #60

Open
opened 2021-07-22 14:02:51 +02:00 by dephilter · 7 comments
dephilter commented 2021-07-22 14:02:51 +02:00 (Migrated from github.com)

I followed the installation instructions, and after running the first test command, the following error appears:

NVIDIA GeForce RTX 3070 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_61 sm_70 sm_75 compute_37.

This wast after running the first test command:

python test_one_image.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path crop_224/6.jpg --pic_b_path crop_224/ds.jpg --output_path output/

Some guides suggesting upgrading to CUDA 11, but after doing so a whole host of other errors appeared.
Help appreciated.

I followed the installation instructions, and after running the first test command, the following error appears: ``` NVIDIA GeForce RTX 3070 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_61 sm_70 sm_75 compute_37. ``` This wast after running the first test command: ``` python test_one_image.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path crop_224/6.jpg --pic_b_path crop_224/ds.jpg --output_path output/ ``` Some guides suggesting upgrading to CUDA 11, but after doing so a whole host of other errors appeared. Help appreciated.
woctezuma commented 2021-07-22 14:33:06 +02:00 (Migrated from github.com)

#15

#15
dephilter commented 2021-07-22 19:35:00 +02:00 (Migrated from github.com)

Followed the steps in reply here, now a new error occurs.

C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. Saved a reverse patch to DataParallel.patch. Run `patch -p0 < DataParallel.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. Saved a reverse patch to Conv2d.patch. Run `patch -p0 < Conv2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. Saved a reverse patch to BatchNorm2d.patch. Run `patch -p0 < BatchNorm2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. Tried to save a patch, but couldn't create a writable file PReLU.patch. Make sure it doesn't exist and your working directory is writable.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. Saved a reverse patch to MaxPool2d.patch. Run `patch -p0 < MaxPool2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. Saved a reverse patch to Sequential.patch. Run `patch -p0 < Sequential.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. Saved a reverse patch to AdaptiveAvgPool2d.patch. Run `patch -p0 < AdaptiveAvgPool2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. Saved a reverse patch to Linear.patch. Run `patch -p0 < Linear.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. Tried to save a patch, but couldn't create a writable file Sigmoid.patch. Make sure it doesn't exist and your working directory is writable.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. Saved a reverse patch to Dropout.patch. Run `patch -p0 < Dropout.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. Saved a reverse patch to BatchNorm1d.patch. Run `patch -p0 < BatchNorm1d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
./checkpoints\people\latest_net_G.pth not exists yet!
Traceback (most recent call last):
  File "test_one_image.py", line 35, in <module>
    model = create_model(opt)
  File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\models.py", line 18, in create_model
    model.initialize(opt)
  File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\fs_model.py", line 71, in initialize
    self.load_network(self.netG, 'G', opt.which_epoch, pretrained_path)
  File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\base_model.py", line 58, in load_network
    raise('Generator must exist!')
TypeError: exceptions must derive from BaseException

Each run generates a bunch of .patch files, deleting them and re-running doesn't help.

Followed the steps in reply [here](https://github.com/neuralchen/SimSwap/issues/15#issuecomment-866039674), now a new error occurs. ``` C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. Saved a reverse patch to DataParallel.patch. Run `patch -p0 < DataParallel.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. Saved a reverse patch to Conv2d.patch. Run `patch -p0 < Conv2d.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. Saved a reverse patch to BatchNorm2d.patch. Run `patch -p0 < BatchNorm2d.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. Tried to save a patch, but couldn't create a writable file PReLU.patch. Make sure it doesn't exist and your working directory is writable. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. Saved a reverse patch to MaxPool2d.patch. Run `patch -p0 < MaxPool2d.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. Saved a reverse patch to Sequential.patch. Run `patch -p0 < Sequential.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. Saved a reverse patch to AdaptiveAvgPool2d.patch. Run `patch -p0 < AdaptiveAvgPool2d.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. Saved a reverse patch to Linear.patch. Run `patch -p0 < Linear.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. Tried to save a patch, but couldn't create a writable file Sigmoid.patch. Make sure it doesn't exist and your working directory is writable. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. Saved a reverse patch to Dropout.patch. Run `patch -p0 < Dropout.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) C:\Users\nnn\anaconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. Saved a reverse patch to BatchNorm1d.patch. Run `patch -p0 < BatchNorm1d.patch` to revert your changes. warnings.warn(msg, SourceChangeWarning) ./checkpoints\people\latest_net_G.pth not exists yet! Traceback (most recent call last): File "test_one_image.py", line 35, in <module> model = create_model(opt) File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\models.py", line 18, in create_model model.initialize(opt) File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\fs_model.py", line 71, in initialize self.load_network(self.netG, 'G', opt.which_epoch, pretrained_path) File "C:\Users\nnn\Live Projects\Personal\Development\simswap\models\base_model.py", line 58, in load_network raise('Generator must exist!') TypeError: exceptions must derive from BaseException ``` Each run generates a bunch of .patch files, deleting them and re-running doesn't help.
andrewrush commented 2021-07-22 20:00:37 +02:00 (Migrated from github.com)

File latest_net_G.pth missed. You should download and unzip checkpoints.zip, place it in the root dir ./
Additional information here.

File latest_net_G.pth missed. You should [download](https://github.com/neuralchen/SimSwap/releases/download/1.0/checkpoints.zip) and unzip checkpoints.zip, place it in the root dir ./ Additional information [here](https://github.com/neuralchen/SimSwap/blob/main/docs/guidance/preparation.md#pretrained-model).
dephilter commented 2021-07-22 23:07:45 +02:00 (Migrated from github.com)

@andrewrush the files are in the path. latest_net_G.pth is in ./people/latest_net_G.pth

image

@andrewrush the files are in the path. latest_net_G.pth is in ./people/latest_net_G.pth ![image](https://user-images.githubusercontent.com/77934780/126709684-455fc21c-b1d1-409a-a6d9-f6a4443d022e.png)
NNNNAI commented 2021-07-23 03:46:01 +02:00 (Migrated from github.com)

You should make a new directory named 'checkpoints' under the ./simswap. And copy to 'people' directory to 'checkpoints' directory .In other words, directory structure should be like this: Personal/Development/simswap/checkpoints/people

You should make a new directory named 'checkpoints' under the ./simswap. And copy to 'people' directory to 'checkpoints' directory .In other words, directory structure should be like this: Personal/Development/simswap/checkpoints/people
fortminors commented 2021-07-31 21:07:03 +02:00 (Migrated from github.com)

@NNNNAI I got the same problem and making a 'checkpoints' subdirectory solves it. However, in the "preparation" guide, it says to unzip the archive to the root of the repository (./) but not to ./checkpoints/

@NNNNAI I got the same problem and making a 'checkpoints' subdirectory solves it. However, in the "preparation" guide, it says to unzip the archive to the root of the repository (./) but not to ./checkpoints/
NNNNAI commented 2021-08-06 16:05:53 +02:00 (Migrated from github.com)

@fortminors Because the default decompression will automatically generate a checkpoints subfolder

@fortminors Because the default decompression will automatically generate a checkpoints subfolder
Sign in to join this conversation.