Skip to content

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

@Ishtiaque-khan97

Description

@Ishtiaque-khan97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions