Torch.cuda.is_available() returns false debugging but true when execute on the console

Do you know where os.environ[“CUDA_VISIBLE_DEVICES”]=‘1’ was set? Was it in your script somewhere or did Pycharm add this variable automatically somehow in debug mode?