Spaces:
Paused
Paused
Commit ·
0daeefc
1
Parent(s): d5b9c19
mps
Browse files37 unmodified lines383940414142434445464748495051103 unmodified lines15515615715115837 unmodified lines
cfg = dict2namespace(config)
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")#device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")if torch.backends.mps.is_available(): device = "mps" torch_dtype = torch.float32elif torch.cuda.is_available(): device = "cuda"else: device = "cpu"model = instructir.create_model(input_channels =cfg.model.in_ch, width=cfg.model.width, enc_blks = cfg.model.enc_blks, middle_blk_num = cfg.model.middle_blk_num, dec_blks = cfg.model.dec_blks, txtdim=cfg.model.textdim)model = model.to(device)103 unmodified lines)
if __name__ == "__main__": demo.launch() demo.launch()app.py+9-2