TencentARC / VQFR

ECCV 2022, Oral, VQFR: Blind Face Restoration with Vector-Quantized Dictionary and Parallel Decoder
https://ycgu.site/projects/vqfr
Other
327 stars 44 forks source link

TypeError: __init__() got an unexpected keyword argument 'in_dim' #30

Open deeemoney opened 1 year ago

deeemoney commented 1 year ago

Hi, I get an error when I run the v1 model reasoner. What should I do.

Traceback (most recent call last): File "/root/autodl-fs/VQFR/demo.py", line 153, in main() File "/root/autodl-fs/VQFR/demo.py", line 102, in main restorer = VQFR_Demo(model_path=model_path, upscale=args.upscale, arch=arch, bg_upsampler=bg_upsampler) File "/root/autodl-fs/VQFR/vqfr/demo_util.py", line 36, in init self.vqfr = VQFRv1( File "/root/autodl-fs/VQFR/vqfr/archs/vqfrv1_arch.py", line 188, in init self.quantizer = GeneralizedQuantizer(quantizer_opt) File "/root/autodl-fs/VQFR/vqfr/archs/vqganv1_arch.py", line 177, in init self.quantize_dict[level_name] = build_quantizer(level_opt) File "/root/autodl-fs/VQFR/vqfr/archs/quantizer_arch.py", line 19, in build_quantizer quantizer = QUANTIZER_REGISTRY.get(quantizer_type)(**opt) TypeError: init() got an unexpected keyword argument 'in_dim'

wizaaaard commented 1 year ago

You can change the value of the key: 'type' in options/train/VQFR/train_vqfr_v1_B16_200K.yml line 108, from L2VectorQuantizer to L2VectorQuantizerKmeans. Then it will be ok, I suppose.