stylegan2-ada-pytorch icon indicating copy to clipboard operation
stylegan2-ada-pytorch copied to clipboard

Style Mixing script gives an error

Open abhisheklalwani opened this issue 4 years ago • 0 comments

Describe the bug Title Exact Error - File "style_mixing.py", line 29, in num_range m = range_re.match(s) TypeError: expected string or bytes-like object

To Reproduce Steps to reproduce the behavior:

  1. Run the following command - python style_mixing.py --outdir=out --rows=85 --cols=55 --network=https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/metfaces.pkl

Expected behavior Image grid should be generated and saved.

Additional context Fixed it by adding the following lines in the code. m = range_re.match(str(s)) if type(s) == list and type(s[0]) == int: return s Not sure if I am the only one who is facing this issue or if there is a mistake on my part. Posting it here in case anyone else runs into this issue.

Thanks for the great work guys! :)

abhisheklalwani avatar Nov 10 '21 06:11 abhisheklalwani