mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-19 07:54:56 +00:00
fix model not existing
This commit is contained in:
@@ -92,6 +92,8 @@ def rerender(cfg: RerenderConfig, first_img_only: bool, key_video_path: str):
|
|||||||
elif model_ext == '.ckpt' or model_ext == '.pth':
|
elif model_ext == '.ckpt' or model_ext == '.pth':
|
||||||
model.load_state_dict(torch.load(cfg.sd_model)['state_dict'],
|
model.load_state_dict(torch.load(cfg.sd_model)['state_dict'],
|
||||||
strict=False)
|
strict=False)
|
||||||
|
else:
|
||||||
|
raise Exception(f'Unknown model extension {model_ext}')
|
||||||
|
|
||||||
# apply lora if exists
|
# apply lora if exists
|
||||||
if cfg.lora_path:
|
if cfg.lora_path:
|
||||||
@@ -340,7 +342,7 @@ def rerender(cfg: RerenderConfig, first_img_only: bool, key_video_path: str):
|
|||||||
masks = []
|
masks = []
|
||||||
for j in range(ddim_steps):
|
for j in range(ddim_steps):
|
||||||
if j <= ddim_steps * mask_period[
|
if j <= ddim_steps * mask_period[
|
||||||
0] or j >= ddim_steps * mask_period[1]:
|
0] or j >= ddim_steps * mask_period[1]:
|
||||||
masks += [None]
|
masks += [None]
|
||||||
else:
|
else:
|
||||||
masks += [mask * cfg.mask_strength]
|
masks += [mask * cfg.mask_strength]
|
||||||
|
|||||||
Reference in New Issue
Block a user