STROTSS icon indicating copy to clipboard operation
STROTSS copied to clipboard

Should create a pull request?

Open AdarshMJ opened this issue 5 years ago • 1 comments

Hi Nick!

When you try to run the code on a non-cuda device like for example - MacBook Pro, I keep getting this error

File "/Users/adarsh/anaconda/envs/py36/lib/python3.6/site-packages/torch/cuda/init.py", line 75, in _check_driver raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

To fix this you can edit line 88 in STROTSS/utils.py from return tensor.cuda() to return tensor And also change stylize_objectives.py line 15 from self.z_dist = torch.zeros(1).cuda() to self.z_dist = torch.zeros(1)

And starts working fine again. However GPU can definitely speed up the process. Thought should include this for anyone who might be facing this problem. Thanks in advance!

AdarshMJ avatar Jun 02 '19 18:06 AdarshMJ

Hi Adarsh, I wrote the code assuming it would only be run on computers with a GPU, otherwise it would be extremely slow. But it's easy enough for me to add a flag for a cpu only version, so I'll push an update in the next few days. I'll leave this issue open and reply to it once I've added the flag. Best, Nick

nkolkin13 avatar Jun 05 '19 19:06 nkolkin13