with Simswap 512 ( mode ffhq ) face swap running without error but face not swapped
and shown as in image
and also with use_mask dont change result, generate similar image
with Simswap 512 ( mode ffhq ) face swap running without error but face not swapped
and shown as in image

and also with use_mask dont change result, generate similar image
Did you download 79999_iter.pth from preparation and place it in the correct destination? I believe you have made an error getting the dependencies and the folders into their proper location. Or you have altered something in reverse2original.py accidentally. Go through the preparation and confirm that you guys have all the files.
Did you download 79999_iter.pth from preparation and place it in the correct destination? I believe you have made an error getting the dependencies and the folders into their proper location. Or you have altered something in reverse2original.py accidentally. Go through the preparation and confirm that you guys have all the files.
Yes these are ( path + file ) correct . If not rises an error something not found... and not produce a output.
There is no error and produce a image shown in image above
i dont change anything at "reverse2original.py"
>
Yes these are ( path + file ) correct . If not rises an error something not found... and not produce a output.
There is no error and produce a image shown in image above
i dont change anything at "reverse2original.py"
Hey, if you can, please take a picture of the exact filepath while inside the folder. It is definitely a small mistake that has been made somewhere. Have you tried removing it and downloading it again? Also what version of Pytorch are you using?
> SimSwap/checkpoints/512/550000_net_G.pth
Hey, if you can, please take a picture of the exact filepath while inside the folder. It is definitely a small mistake that has been made somewhere. Have you tried removing it and downloading it again? Also what version of Pytorch are you using?
warnings.warn(msg, SourceChangeWarning)
./checkpoints/512/550000_net_G.pth not exists yet!
...
File "/app/projects/SimSwap/models/base_model.py", line 58, in load_network
raise('Generator must exist!')
TypeError: exceptions must derive from BaseException
i dont think model is corrupt during download .
downloaded file is zip . if corrupted we dont extracted file
redownloaded and try same result
remaining Pytroch version :
my version is 1.10.1
but Normal version of model is worked as expected
only difference during execution
Pretrained network G has fewer layers; The following are not initialized:
['first_layer', 'last_layer']
ffhq 512 550000
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
Normal
None 224 latest
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
there is no filepath error
if so program rises
```
warnings.warn(msg, SourceChangeWarning)
./checkpoints/512/550000_net_G.pth not exists yet!
...
File "/app/projects/SimSwap/models/base_model.py", line 58, in load_network
raise('Generator must exist!')
TypeError: exceptions must derive from BaseException
```
i dont think model is corrupt during download .
downloaded file is zip . if corrupted we dont extracted file
redownloaded and try same result
remaining Pytroch version :
my version is 1.10.1
but Normal version of model is worked as expected
only difference during execution
```
Pretrained network G has fewer layers; The following are not initialized:
['first_layer', 'last_layer']
ffhq 512 550000
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
```
Normal
```
None 224 latest
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
```
@vladosShikos thanks
```
opt.crop_size = 512
crop_size = opt.crop_size
```
solves problem it worked

```
from models.models import create_model
...
model = create_model(opt)
```
within create model
call
`model.initialize(opt)`
https://github.com/neuralchen/SimSwap/blob/01a8d6d0a6fd7e7b0052a5832328fba33f2b8414/models/models.py#L18
this function
https://github.com/neuralchen/SimSwap/blob/050ed8a00a190aafafe183fdfa6a0eb845ded89d/models/fs_model.py#L45
within this function "opt.crop_size" used so
setting opt.crop_size before solves problem
To clarify for people who are confused about this issue: this happens in a Colab notebook if you edit an official one such as this one.
In the following piece of code:
opt=TestOptions()opt.initialize()opt.parser.add_argument('-f')## dummy arg to avoid bugopt=opt.parse()opt.pic_a_path='./demo_file/Iron_man.jpg'## or replace it with image from your own google driveopt.video_path='./demo_file/multi_people_1080p.mp4'## or replace it with video from your own google driveopt.output_path='./output/demo.mp4'opt.temp_path='./tmp'opt.Arc_path='./arcface_model/arcface_checkpoint.tar'opt.isTrain=Falseopt.use_mask=True## new feature up-to-datecrop_size=opt.crop_sizetorch.nn.Module.dump_patches=Truemodel=create_model(opt)model.eval()
You might be tempted by edit this line:
crop_size=opt.crop_size
to:
crop_size=512
and you should NOT!
Instead, you want to set opt.crop_size to the non-default value (512 instead of the default value of 224):
opt.crop_size=512
and keep the aforementioned line:
crop_size=opt.crop_size
Interesting.
To clarify for people who are confused about this issue: this happens in a Colab notebook if you edit an official one such as [this one](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/SimSwap%20colab.ipynb).
In the following piece of code:
```python
opt = TestOptions()
opt.initialize()
opt.parser.add_argument('-f') ## dummy arg to avoid bug
opt = opt.parse()
opt.pic_a_path = './demo_file/Iron_man.jpg' ## or replace it with image from your own google drive
opt.video_path = './demo_file/multi_people_1080p.mp4' ## or replace it with video from your own google drive
opt.output_path = './output/demo.mp4'
opt.temp_path = './tmp'
opt.Arc_path = './arcface_model/arcface_checkpoint.tar'
opt.isTrain = False
opt.use_mask = True ## new feature up-to-date
crop_size = opt.crop_size
torch.nn.Module.dump_patches = True
model = create_model(opt)
model.eval()
```
You might be tempted by edit this line:
```python
crop_size = opt.crop_size
```
to:
```python
crop_size = 512
```
**and you should NOT!**
Instead, you want to set `opt.crop_size` to the non-default value (512 instead of the default value of 224):
```python
opt.crop_size = 512
```
and keep the aforementioned line:
```python
crop_size = opt.crop_size
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
with Simswap 512 ( mode ffhq ) face swap running without error but face not swapped
and shown as in image
and also with use_mask dont change result, generate similar image
I have the same problem
Help please
Inten i9 rtx 3060 ti
Did you download 79999_iter.pth from preparation and place it in the correct destination? I believe you have made an error getting the dependencies and the folders into their proper location. Or you have altered something in reverse2original.py accidentally. Go through the preparation and confirm that you guys have all the files.
Yes these are ( path + file ) correct . If not rises an error something not found... and not produce a output.
There is no error and produce a image shown in image above
i dont change anything at "reverse2original.py"
Is this only happening with 512? Because it seems like one of the files is either missing or corrupted. Where did you put the 512 folder?
SimSwap/checkpoints/512/550000_net_G.pth
Hey, if you can, please take a picture of the exact filepath while inside the folder. It is definitely a small mistake that has been made somewhere. Have you tried removing it and downloading it again? Also what version of Pytorch are you using?
there is no filepath error
if so program rises
i dont think model is corrupt during download .
downloaded file is zip . if corrupted we dont extracted file
redownloaded and try same result
remaining Pytroch version :
my version is 1.10.1
but Normal version of model is worked as expected
only difference during execution
Normal
Check #162, it helped me
@vladosShikos thanks
solves problem it worked

within create model
call
model.initialize(opt)https://github.com/neuralchen/SimSwap/blob/01a8d6d0a6fd7e7b0052a5832328fba33f2b8414/models/models.py#L18
this function
https://github.com/neuralchen/SimSwap/blob/050ed8a00a190aafafe183fdfa6a0eb845ded89d/models/fs_model.py#L45
within this function "opt.crop_size" used so
setting opt.crop_size before solves problem
Interesting.
To clarify for people who are confused about this issue: this happens in a Colab notebook if you edit an official one such as this one.
In the following piece of code:
You might be tempted by edit this line:
to:
and you should NOT!
Instead, you want to set
opt.crop_sizeto the non-default value (512 instead of the default value of 224):and keep the aforementioned line: