Fix again, final hopefully

This commit is contained in:
hlky 2022-08-27 03:30:32 +01:00
parent bc212870ae
commit 670ab25a6a

View File

@ -312,7 +312,9 @@ if opt.optimized:
modelFS = instantiate_from_config(config.modelFirstStage)
_, _ = modelFS.load_state_dict(sd, strict=False)
modelFS.eval()
del sd
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
model = model if opt.no_half else model.half()
modelCS = modelCS if opt.no_half else modelCS.half()
else:
config = OmegaConf.load("configs/stable-diffusion/v1-inference.yaml")
model = load_model_from_config(config, "models/ldm/stable-diffusion-v1/model.ckpt")