sukebenet / dreamtime

Use artificial intelligence to create fake nudes.

Home Page:https://dreamtime.tech/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use GPU; "Please reinstall DreamPower to get GPU support"

truenitemarez opened this issue · comments

Describe the bug
I cant select NVIDIA GPU even though I have an nVidia 1660 Ti and the CUDA toolkit installed on linux via installing nvidia-cuda-toolkit. I get the following error:

Screenshot_2020-07-02_23-47-04

The text in the box reads:

Error: [DEBUG] /media/DATA/.DT145/AppData/dreampower/checkpoints

[DEBUG] {'correct_to_mask': '/media/DATA/.DT145/AppData/dreampower/checkpoints/cm.lib', 'maskref_to_maskdet': '/media/DATA/.DT145/AppData/dreampower/checkpoints/mm.lib', 'maskfin_to_nude': '/media/DATA/.DT145/AppData/dreampower/checkpoints/mn.lib', 'checkpoints_path': '/media/DATA/.DT145/AppData/dreampower/checkpoints'}

[DEBUG] Namespace(altered=None, asize=0.6756969086367532, auto_rescale=True, auto_resize=False, auto_resize_crop=False, bsize=0.3928734098585171, checkpoints={'correct_to_mask': '/media/DATA/.DT145/AppData/dreampower/checkpoints/cm.lib', 'maskref_to_maskdet': '/media/DATA/.DT145/AppData/dreampower/checkpoints/mm.lib', 'maskfin_to_nude': '/media/DATA/.DT145/AppData/dreampower/checkpoints/mn.lib', 'checkpoints_path': '/media/DATA/.DT145/AppData/dreampower/checkpoints'}, color_transfer=False, cpu=False, debug=True, disable_persistent_gan=False, export_step=None, export_step_path=None, func=<function main at 0x7f98bfc7c8c0>, gpu=[0], gpu_ids=[0], hsize=1.8035044308435864, ignore_size=False, input='/tmp/105966059_1149194278781239_7780416384685825097_n.jpg', json_args=None, json_folder_name='settings.json', mode='run', n_cores=4, n_runs=1, nsize=1.7906228917911446, output='/media/DATA/.DT145/AppData/Pictures/Uncategorized/105966059-1149194278-RUN1-1593729426305-dreamtime.jpg', overlay=None, prefs={'titsize': 0.3928734098585171, 'aursize': 0.6756969086367532, 'nipsize': 1.7906228917911446, 'vagsize': 1.3478716891505242, 'hairsize': 1.8035044308435864}, steps=None, vsize=1.3478716891505242)
[INFO] Welcome to DreamPower
[INFO] GAN Processing Will Use GPU IDs: [0]

[DEBUG] Process to execute : <processing.image.ImageProcessing object at 0x7f98bfc94550>

[INFO] Executing Image Processing
[DEBUG] All Phases : [<class 'transform.opencv.resize.ImageToRescale'>, <class 'transform.opencv.correct.DressToCorrect'>, <class 'transform.gan.mask.CorrectToMask'>, <class 'transform.opencv.mask.MaskToMaskref'>, <class 'transform.gan.mask.MaskrefToMaskdet'>, <class 'transform.opencv.mask.MaskdetToMaskfin'>, <class 'transform.gan.mask.MaskfinToNude'>]
[DEBUG] To Be Executed Phases : [<class 'transform.opencv.resize.ImageToRescale'>, <class 'transform.opencv.correct.DressToCorrect'>, <class 'transform.gan.mask.CorrectToMask'>, <class 'transform.opencv.mask.MaskToMaskref'>, <class 'transform.gan.mask.MaskrefToMaskdet'>, <class 'transform.opencv.mask.MaskdetToMaskfin'>, <class 'transform.gan.mask.MaskfinToNude'>]
[INFO] Processing on ['/tmp/105966059_1149194278781239_7780416384685825097_n.jpg']

[DEBUG] wk []

[INFO] Executing Image To Rescale

[DEBUG] Image To Rescale Done in 0.0 seconds

[DEBUG] wk []
[INFO] Executing Dress To Correct

[DEBUG] Dress To Correct Done in 0.02 seconds
[DEBUG] wk []

[DEBUG] Loading Model Start
[INFO] Loading GAN Model For correct_to_mask

Traceback (most recent call last):
  File "main.py", line 82, in <module>

  File "argv/__init__.py", line 35, in run
  File "main.py", line 25, in main
  File "processing/__init__.py", line 23, in run
  File "processing/image.py", line 96, in _execute
  File "processing/worker.py", line 44, in run_worker
  File "transform/gan/mask.py", line 31, in __init__
  File "transform/gan/mask.py", line 17, in __init__
  File "transform/gan/__init__.py", line 33, in __init__
  File "transform/gan/__init__.py", line 41, in __init_model

  File "transform/gan/model.py", line 133, in initialize
  File "transform/gan/model.py", line 219, in __define_g
  File "site-packages/torch/nn/modules/module.py", line 265, in cuda
  File "site-packages/torch/nn/modules/module.py", line 193, in _apply
  File "site-packages/torch/nn/modules/module.py", line 193, in _apply
  File "site-packages/torch/nn/modules/module.py", line 199, in _apply

  File "site-packages/torch/nn/modules/module.py", line 265, in <lambda>
  File "site-packages/torch/cuda/__init__.py", line 162, in _lazy_init
  File "site-packages/torch/cuda/__init__.py", line 75, in _check_driver
AssertionError: Torch not compiled with CUDA enabled
[31366] Failed to execute script main


    at kr.getPowerError (file:///media/DATA/.DT145/resources/app.asar/dist/assets/184627a69112d5c13a9a.js:1:8910)
    at file:///media/DATA/.DT145/resources/app.asar/dist/assets/184627a69112d5c13a9a.js:1:8184
    at CallbacksRegistry.apply (electron/js2c/renderer_init.js:2549:29)
    at electron/js2c/renderer_init.js:1469:21
    at EventEmitter.<anonymous> (electron/js2c/renderer_init.js:1449:7)
    at EventEmitter.emit (events.js:210:5)
    at Object.onMessage (electron/js2c/renderer_init.js:2204:16)
OK

Enviroment (please complete the following information):

  • DreamTime Version 1.4.5
  • OS: Linux Mint 20
  • RAM: 16GB DDR4
  • GPU: GTX 1660 Ti 6 GB VRAM

I believe the precompiled portable ZIP for download doesnt include GPU support - how can I include this? It works just fine over CPU by the way, I'd like to get GPU working also though. many thanks for your help and support.

Sorry, my mistake, I had to delete /AppData/dreampower and re-download with NVIDIA GPU support instead.

When installing DreamTime for the first time it checks if you have a compatible GPU and during the DreamPower download sets the option Device to GPU to download the version with GPU support.

Unfortunately this check only works on Windows so if you don't manually switch this option from CPU to GPU DreamTime will end up downloading the smaller CPU-only version of DreamPower.

To change this it will be necessary to delete DreamPower and re-download it, the easiest way would be:

  1. Go to the About section (Second icon on the upper right side)
  2. In the DreamPower box, click on the "App" button to open the installation folder.
  3. Move the checkpoints folder to another place in order to make a backup and not download it again.
  4. Delete the folder (dreampower)
  5. Restart DreamTime, you will see the DreamPower download screen, make sure to change the option "Device" to "GPU". (You can also download it manually using: https://downloads.dreamnet.tech/dreampower/v1.2.5/linux/any?download=1)
  6. When the download is finished, restore the "checkpoints" folder that you previously moved.
  7. Restart DreamTime and in theory you should already have GPU support.

I leave this here in case someone in the future needs it. :)