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

Something wrong happend when i run 'manipulate.py' #6

Open
moon-landing opened this issue Apr 13, 2021 · 2 comments
Open

Something wrong happend when i run 'manipulate.py' #6

moon-landing opened this issue Apr 13, 2021 · 2 comments

Comments

@moon-landing
Copy link

沈博您好,我通过以下设置运行 manipulate.py:

LAYERS=6-11
python manipulate.py $MODEL_NAME $BOUNDARY_LIST
--num=10
--layerwise_manipulation
--manipulate_layers=$LAYERS
--generate_html

在Colab上报错:
Log file stylegan_bedroom_manipulation/log.txt has already existed!
Would you like to overwrite it (Y/N): Y
[2021-04-13 09:53:49,930][WARNING] Overwriting log file stylegan_bedroom_manipulation/log.txt!
[2021-04-13 09:53:49,930][INFO] Initializing generator.
[2021-04-13 09:53:49,937][INFO] Build generator for model stylegan_bedroom.
[2021-04-13 09:53:50,190][INFO] Loading pytorch weights from models/pretrain/pytorch/stylegan_bedroom256_generator.pth.
[2021-04-13 09:53:50,534][INFO] Successfully loaded!
[2021-04-13 09:53:52,528][INFO] Current lod is 0.0.
[2021-04-13 09:53:52,528][INFO] Preparing latent codes.
[2021-04-13 09:53:52,528][INFO] Sample latent codes randomly.
Traceback (most recent call last):
File "manipulate.py", line 280, in
main()
File "manipulate.py", line 171, in main
boundaries = parse_boundary_list(args.boundary_list_path)
File "/content/higan/utils/editor.py", line 383, in parse_boundary_list
for line in f:
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 0: invalid start byte

问题出现在/utils/editor.py的383行:
for line in f:
似乎是382行使用open函数无法正确打开boundary list的.npy文件:
with open(boundary_list_path, 'r') as f:

我已在colab和本地都进行了尝试,均在此处报错。
我也尝试修改open函数的encoding,也没有解决。

能否请您在百忙之中看一下我的问题,十分感谢!

祝好!

@limbo0000
Copy link
Collaborator

Thanks for your testing. Could you please tell me which boundary you used? We will follow up then.

@moon-landing
Copy link
Author

Oh, It's my own mistake.
I forget to make a boundary list file.
I'm so sorry to waste your time.

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

2 participants