pmh9960 / iColoriT

Official PyTorch implementation of "iColoriT: Towards Propagating Local Hint to the Right Region in Interactive Colorization by Leveraging Vision Transformer." (WACV 2023)
MIT License
69 stars 14 forks source link

pretrained_cfg error #4

Closed AzeezEbrahim closed 1 year ago

AzeezEbrahim commented 1 year ago

I could not run the demo because the following error Traceback (most recent call last): File "D:\Abdulaziz\iColoriT\iColoriT\iColoriT_demo\icolorit_ui.py", line 63, in <module> model = get_model(args) File "D:\Abdulaziz\iColoriT\iColoriT\iColoriT_demo\icolorit_ui.py", line 44, in get_model model = create_model( File "D:\ProgramsFile\python\Python39\lib\site-packages\timm\models\factory.py", line 71, in create_model model = create_fn(pretrained=pretrained, pretrained_cfg=pretrained_cfg, **kwargs) File "D:\Abdulaziz\iColoriT\iColoriT\iColoriT_demo\modeling.py", line 566, in icolorit_base_4ch_patch16_224 model = IColoriT( TypeError: __init__() got an unexpected keyword argument 'pretrained_cfg'

So i fix it by addjusting the following code model = create_fn(pretrained=pretrained, pretrained_cfg=pretrained_cfg, **kwargs) to model = create_fn(pretrained=pretrained, **kwargs)

in the factor.py file from timm package

YeolJ00 commented 1 year ago

If you had to change the code in the timm package, it is probably a version issue. Have your tried installing the timm version 0.4.12?

AzeezEbrahim commented 1 year ago

no, i did not try to install it, i only installed the latest version on a virtual env.