mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-08 14:01:46 -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
|
@ -618,11 +618,19 @@ class ExtractSubprocessor(Subprocessor):
|
||||||
dev_name = nnlib.device.getDeviceName(idx)
|
dev_name = nnlib.device.getDeviceName(idx)
|
||||||
dev_vram = nnlib.device.getDeviceVRAMTotalGb(idx)
|
dev_vram = nnlib.device.getDeviceVRAMTotalGb(idx)
|
||||||
|
|
||||||
if not manual and (type == 'rects-dlib' or type == 'rects-mt' ):
|
count = 1
|
||||||
for i in range ( int (max (1, dev_vram / 2) ) ):
|
|
||||||
result += [ (idx, 'GPU', '%s #%d' % (dev_name,i) , dev_vram) ]
|
if not manual:
|
||||||
else:
|
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) ]
|
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
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue