mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-08 05:51:40 -07:00
speed up S3FD extraction for GPU with >= 11GB vram
This commit is contained in:
parent
59ad734b6c
commit
63ecd4ec34
1 changed files with 13 additions and 5 deletions
|
@ -617,12 +617,20 @@ class ExtractSubprocessor(Subprocessor):
|
|||
for idx in devices:
|
||||
dev_name = nnlib.device.getDeviceName(idx)
|
||||
dev_vram = nnlib.device.getDeviceVRAMTotalGb(idx)
|
||||
|
||||
if not manual and (type == 'rects-dlib' or type == 'rects-mt' ):
|
||||
for i in range ( int (max (1, dev_vram / 2) ) ):
|
||||
result += [ (idx, 'GPU', '%s #%d' % (dev_name,i) , dev_vram) ]
|
||||
else:
|
||||
|
||||
count = 1
|
||||
|
||||
if not manual:
|
||||
if (type == 'rects-dlib' or type == 'rects-mt' ):
|
||||
count = int (max (1, dev_vram / 2) )
|
||||
if type == 'rects-s3fd':
|
||||
count = int (max (1, dev_vram / 5) )
|
||||
|
||||
if count == 1:
|
||||
result += [ (idx, 'GPU', dev_name, dev_vram) ]
|
||||
else:
|
||||
for i in range (count):
|
||||
result += [ (idx, 'GPU', '%s #%d' % (dev_name,i) , dev_vram) ]
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue