Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version problem? #142

Open
kkafieh opened this issue Jun 17, 2021 · 5 comments
Open

Version problem? #142

kkafieh opened this issue Jun 17, 2021 · 5 comments

Comments

@kkafieh
Copy link

kkafieh commented Jun 17, 2021

I am just trying to get this running for the first time. Running on RTX 3060

On trying my first swap with the example files I initially had an incompatibility message for my 3060, but installing pytorch v1.8.0 and cuda 11.3 fixed that.
(conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge)

I then received an error:
"RuntimeError: Cache file does not exist: ../docs/examples/shinzo_abe\shinzo_abe_dsfd_seq.pkl"
Which I finally got passed by copying and renaming another pkl file. It seemed to allow the process to continue. although obviously its pretty sketchy.

Now I have this problem...

=> Cropping video sequences from video: "shinzo_abe.mp4"...
Traceback (most recent call last):
  File "swap.py", line 504, in <module>
    main(**vars(parser.parse_args()))
  File "swap.py", line 498, in main
    face_swapping(source[0], target[0], output, select_source, select_target)
  File "swap.py", line 239, in __call__
    source_cache_dir, source_seq_file_path, _ = self.cache(source_path)
  File "C:\DATA\DEV\PROJECTS\fsgan\preprocess\preprocess_video.py", line 457, in cache
    crop_video_sequences_main(input_path, output_dir, seq_file_path, self.seq_postfix, self.resolution,
  File "C:\DATA\DEV\PROJECTS\fsgan\preprocess\crop_video_sequences.py", line 53, in main
    curr_vid_name = os.path.splitext(os.path.basename(input_path))[0] + '_seq%02d.mp4' % seq.id
AttributeError: 'numpy.ndarray' object has no attribute 'id'

No "id" attribute? This looked like a programming error. I poked around in the code, but I am new to python and couldn't spot anything obvious. But also, the code should already be fine.

Is this an interpreter version problem? Somrthing else?

Python version 3.8.8
Pytorch version 1.8.0
Conda version 4.10.1
Cuda version 11.3.109

@YuvalNirkin
Copy link
Owner

Try deleting all the cache files and running it again.

@kkafieh
Copy link
Author

kkafieh commented Jun 18, 2021

Out of Memory.

I deleted...
-shinzo_abe_dsfd.pkl
-shinzo_abe_dsfd_seq.pkl

Is there anything else I should have deleted? Not sure what the cache files are other than that.

It seemed to get much further. But now I get the Out of memory error below...

File "swap.py", line 504, in <module>
   main(**vars(parser.parse_args()))
 File "swap.py", line 498, in main
   face_swapping(source[0], target[0], output, select_source, select_target)
 File "swap.py", line 240, in __call__
   target_cache_dir, target_seq_file_path, _ = self.cache(target_path)
 File "C:\DATA\DEV\PROJECTS\fsgan\preprocess\preprocess_video.py", line 446, in cache
   self.face_detector(input_path, det_file_path)
 File "C:\DATA\DEV\PROJECTS\face_detection_dsfd\face_detector.py", line 92, in __call__
   detections_batch = self.net(frame_tensor_batch)
 File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
   result = self.forward(*input, **kwargs)
 File "C:\DATA\DEV\PROJECTS\face_detection_dsfd\face_ssd_infer.py", line 415, in forward
   sources[0] = self.cpm3_3(sources[0])
 File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
   result = self.forward(*input, **kwargs)
 File "C:\DATA\DEV\PROJECTS\face_detection_dsfd\face_ssd_infer.py", line 47, in forward
   return torch.cat((x1_1, x2_1, x3_1), 1)
RuntimeError: CUDA out of memory. Tried to allocate 1.98 GiB (GPU 0; 12.00 GiB total capacity; 7.45 GiB already allocated; 0 bytes free; 9.52 GiB reserved in total by PyTorch)

@Kwakyejin
Copy link

I have the same issue. Did you solved it? @kkafieh
Is it general issue? @YuvalNirkin

@kkafieh
Copy link
Author

kkafieh commented Dec 11, 2022

No. We gave up.

What kind of card so you have?
We have a GeForce 3060.

@Kwakyejin
Copy link

I have Quadro RTX 5000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants