SimSwap icon indicating copy to clipboard operation
SimSwap copied to clipboard

Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']

Open Adreame7 opened this issue 10 months ago • 2 comments

when i run test_one_image.py exits this issue: Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']

Adreame7 avatar Apr 20 '25 12:04 Adreame7

Same issue with another one on collab file

Pretrained network G has fewer layers; The following are not initialized: ['down0', 'first_layer', 'last_layer', 'up0']

AssertionError Traceback (most recent call last) in <cell line: 0>() 17 model.eval() 18 ---> 19 app = Face_detect_crop(name='antelope', root='./insightface_func/models') 20 app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640)) 21

/content/SimSwap/insightface_func/face_detect_crop_multi.py in init(self, name, root) 45 print('duplicated model task type, ignore:', onnx_file, model.taskname) 46 del model ---> 47 assert 'detection' in self.models 48 self.det_model = self.models['detection'] 49

AssertionError:

KahnSvaer avatar May 07 '25 19:05 KahnSvaer

Though this seems to be working

you need to set crop_size to 224, run: !python test_one_image.py --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/ --crop_size 224

Originally posted by @luoxyhappy in #483

But the results were not that great not sure if I did some mistake

KahnSvaer avatar May 08 '25 10:05 KahnSvaer