Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'device' #118

Open
Ishtiaque-khan97 opened this issue Nov 3, 2023 · 0 comments
Open

Comments

@Ishtiaque-khan97
Copy link

Hi,
Thank you for making your code available.
I was trying to run it in google colab.
However, when I try to run the line:
!python GetCode.py --dataset_name $dataset_name --code_type 'w'
It gives this error (I truncated a bit):

File "GetCode.py", line 20, in LoadModel
_, _, Gs = pickle.load(f)
File "/content/StyleCLIP/global_directions/dnnlib/tflib/network.py", line 442, in setstate
self._init_fields(name=name, static_kwargs=static_kwargs, build_func=build_func, build_func_name=build_func_name, build_module_src=build_module_src)
File "/content/StyleCLIP/global_directions/dnnlib/tflib/network.py", line 93, in _init_fields
device = tf.no_op(name="_QueryDevice").device
AttributeError: 'NoneType' object has no attribute 'device'

Could anyone please help me with this? I would greatly appreciate it.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant