ASesYusuf1 commited on
Commit
b161336
·
verified ·
1 Parent(s): f315bc1

Update upcunet_v3.py

Browse files
Files changed (1) hide show
  1. upcunet_v3.py +1 -1
upcunet_v3.py CHANGED
@@ -1259,7 +1259,7 @@ class UpCunet4x(nn.Module):
1259
  return res
1260
  class RealWaifuUpScaler(object):
1261
  def __init__(self,scale,weight_path,half,device):
1262
- weight = torch.load(weight_path, map_location="cpu")
1263
  self.pro="pro"in weight
1264
  if(self.pro):del weight["pro"]
1265
  self.model=eval("UpCunet%sx"%scale)()
 
1259
  return res
1260
  class RealWaifuUpScaler(object):
1261
  def __init__(self,scale,weight_path,half,device):
1262
+ weight = torch.load(weight_path, map_location="cpu", weights_only=True)
1263
  self.pro="pro"in weight
1264
  if(self.pro):del weight["pro"]
1265
  self.model=eval("UpCunet%sx"%scale)()