HOTFIX: apply iipimage patches BEFORE the model are defined.