Barbershop icon indicating copy to clipboard operation
Barbershop copied to clipboard

i got a type error "download() got an unexpected keyword argument 'fuzzy' "

Open shbaek916 opened this issue 2 years ago • 4 comments

i was trying your model and entered the code below

!python main.py --im_path1 90.png --im_path2 15.png --im_path3 117.png --sign realistic --smooth 5

Then I got this 'fuzzy' argument error.

Downloading StyleGAN2 checkpoint: pretrained_models/ffhq.pt Traceback (most recent call last): File "main.py", line 117, in main(args) File "main.py", line 18, in main ii2s = Embedding(args) File "/content/drive/My Drive/StyleGAN_dir/Barbershop/models/Embedding.py", line 23, in init self.net = Net(self.opts) File "/content/drive/My Drive/StyleGAN_dir/Barbershop/models/Net.py", line 15, in init self.load_weights() File "/content/drive/My Drive/StyleGAN_dir/Barbershop/models/Net.py", line 22, in load_weights download_weight(self.opts.ckpt) File "/content/drive/My Drive/StyleGAN_dir/Barbershop/utils/model_utils.py", line 17, in download_weight output=weight_path, fuzzy=True) TypeError: download() got an unexpected keyword argument 'fuzzy'

I couldn't find this 'fuzzy' argument you used in gdown.download method. Can you tell me what this is?

shbaek916 avatar Jan 05 '22 05:01 shbaek916

I was using google colab and just solved the problem !pip install gdown==4.2.0

or use the right version, find it on this repo, under environment.

shbaek916 avatar Jan 05 '22 06:01 shbaek916

How did you run this in Colab? I have an error:

!conda env update -f environment/environment.yml -n Barbershop

Ran pip subprocess with arguments:
['/usr/local/envs/Barbershop/bin/python', '-m', 'pip', 'install', '-U', '-r', '/content/Barbershop/environment/condaenv.cikg8f4g.requirements.txt']
Pip subprocess output:
Collecting beautifulsoup4==4.10.0
  Downloading beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting cachetools==4.2.4
  Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting charset-normalizer==2.0.7
  Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting click==8.0.3
  Downloading click-8.0.3-py3-none-any.whl (97 kB)

Pip subprocess error:
ERROR: Could not find a version that satisfies the requirement clip==1.0 (from versions: 0.0.1, 0.1.0, 0.2.0)
ERROR: No matching distribution found for clip==1.0


CondaEnvException: Pip failed

qo4on avatar Jan 06 '22 00:01 qo4on

sorry, I don't know how to solve that problem

shbaek916 avatar Jan 06 '22 23:01 shbaek916

How did you run this in Colab? I have an error:

!conda env update -f environment/environment.yml -n Barbershop

Ran pip subprocess with arguments:
['/usr/local/envs/Barbershop/bin/python', '-m', 'pip', 'install', '-U', '-r', '/content/Barbershop/environment/condaenv.cikg8f4g.requirements.txt']
Pip subprocess output:
Collecting beautifulsoup4==4.10.0
  Downloading beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting cachetools==4.2.4
  Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting charset-normalizer==2.0.7
  Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting click==8.0.3
  Downloading click-8.0.3-py3-none-any.whl (97 kB)

Pip subprocess error:
ERROR: Could not find a version that satisfies the requirement clip==1.0 (from versions: 0.0.1, 0.1.0, 0.2.0)
ERROR: No matching distribution found for clip==1.0


CondaEnvException: Pip failed

Please refer to https://github.com/ZPdesu/Barbershop/issues/18#issue-1095200457

ZPdesu avatar Jan 09 '22 02:01 ZPdesu