
    kh                     l    d dl Z d dlZd dlZd dlmZ d dlmZ 	 d dlmZ ddZy# e	$ r	 d dl
mZ Y w xY w)    N)OrderedDict)load_checkpoint)load_state_dict_from_url)load_urlc                     |st        j                  d       y t        |dd      }| ||      }| j                  ||       y )NzoPretrained model URL is empty, using random initialization. Did you intend to use a `tf_` variant of the model?Fcpu)progressmap_location)strict)loggingwarningr   load_state_dict)modelurl	filter_fnr   
state_dicts        J/var/www/teggl/fontify/venv/lib/python3.12/site-packages/effdet/helpers.pyload_pretrainedr      sL     N 	O)#ERJz*
	*V4    )NT)torchosr   collectionsr   timm.modelsr   	torch.hubr   ImportErrortorch.utils.model_zoor   r    r   r   <module>r      s8     	  # 'K2
5	  KJKs   % 33