Histoformer / demo.py
sunshangquan
c
5fbced4
raw
history blame
477 Bytes
from basicsr.models.archs.histoformer_arch import Histoformer
# from huggingface_hub import PyTorchModelHubMixin
# define model
model = Histoformer()
# equip with weights
filepath = hf_hub_download(repo_id="sunsean/Histoformer", filename="Allweather/pretrained_models/net_g_real.pth")
model.load_state_dict(filepath, map_location="gpu")
# push to hub
model.push_to_hub("sunsean/Histoformer-real")
# reload
model = ImageCleanModel.from_pretrained("sunsean/Histoformer-real")