SimSwap icon indicating copy to clipboard operation
SimSwap copied to clipboard

various additions for M1 GPU

Open Smiril opened this issue 2 years ago • 0 comments

well updated files an some additions .. keep reading

python3 test_one_image.py --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path crop_224/3.jpg --pic_b_path crop_224/1.jpg --output_path ./ --gpu_ids 0 ------------ Options ------------- Arc_path: arcface_model/arcface_checkpoint.tar aspect_ratio: 1.0 batchSize: 8 checkpoints_dir: ./checkpoints cluster_path: features_clustered_010.npy crop_size: 224 data_type: 32 dataroot: ./datasets/cityscapes/ display_winsize: 512 engine: None export_onnx: None feat_num: 3 fineSize: 512 fp16: False gpu_ids: [0] how_many: 50 id_thres: 0.03 image_size: 224 input_nc: 3 instance_feat: False isTrain: False label_feat: False label_nc: 0 latent_size: 512 loadSize: 1024 load_features: False local_rank: 0 max_dataset_size: inf model: pix2pixHD multisepcific_dir: ./demo_file/multispecific nThreads: 2 n_blocks_global: 6 n_blocks_local: 3 n_clusters: 10 n_downsample_E: 4 n_downsample_global: 3 n_local_enhancers: 1 name: people nef: 16 netG: global ngf: 64 niter_fix_global: 0 no_flip: False no_instance: False no_simswaplogo: False norm: batch norm_G: spectralspadesyncbatch3x3 ntest: inf onnx: None output_nc: 3 output_path: ./ phase: test pic_a_path: crop_224/3.jpg pic_b_path: crop_224/1.jpg pic_specific_path: ./crop_224/zrf.jpg resize_or_crop: scale_width results_dir: ./results/ semantic_nc: 3 serial_batches: False temp_path: ./temp_results tf_log: False use_dropout: False use_encoded_image: False use_mask: False verbose: False video_path: ./demo_file/multi_people_1080p.mp4 which_epoch: latest -------------- End ---------------- /Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py:786: 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) Traceback (most recent call last): File "/Users/Smiril/Documents/deep/SimSwap/test_one_image.py", line 34, in model = create_model(opt) File "/Users/Smiril/Documents/deep/SimSwap/models/models.py", line 18, in create_model model.initialize(opt) File "/Users/Smiril/Documents/deep/SimSwap/models/fs_model.py", line 73, in initialize netArc_checkpoint = torch.load(netArc_checkpoint) File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 930, in _legacy_load result = unpickler.load() File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 876, in persistent_load wrap_storage=restore_location(obj, location), File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 175, in default_restore_location result = fn(storage, location) File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 152, in _cuda_deserialize device = validate_cuda_device(location) File "/Users/Smiril/opt/miniconda3/envs/torch-m1/lib/python3.10/site-packages/torch/serialization.py", line 136, in validate_cuda_device raise RuntimeError('Attempting to deserialize object on a CUDA ' RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

Smiril avatar Jul 12 '22 10:07 Smiril