mirror of
https://github.com/Haoming02/sd-webui-old-photo-restoration.git
synced 2026-05-01 03:31:48 +00:00
fix #19
This commit is contained in:
@@ -35,8 +35,7 @@ def modify_commandline_options(parser, is_train):
|
||||
def create_network(cls, opt):
|
||||
net = cls(opt)
|
||||
net.print_network()
|
||||
if len(opt.gpu_ids) > 0:
|
||||
assert torch.cuda.is_available()
|
||||
if torch.cuda.is_available() and len(opt.gpu_ids) > 0:
|
||||
net.cuda()
|
||||
net.init_weights(opt.init_type, opt.init_variance)
|
||||
return net
|
||||
|
||||
Reference in New Issue
Block a user