mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-13 17:09:49 +00:00
move to new backend - part 2
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import ldm_patched.modules.utils
|
||||
import argparse
|
||||
|
||||
from backend import utils
|
||||
from modules.paths_internal import models_path
|
||||
from pathlib import Path
|
||||
|
||||
@@ -57,7 +57,7 @@ def add_supported_control_model(control_model):
|
||||
|
||||
def try_load_supported_control_model(ckpt_path):
|
||||
global supported_control_models
|
||||
state_dict = ldm_patched.modules.utils.load_torch_file(ckpt_path, safe_load=True)
|
||||
state_dict = utils.load_torch_file(ckpt_path, safe_load=True)
|
||||
for supported_type in supported_control_models:
|
||||
state_dict_copy = {k: v for k, v in state_dict.items()}
|
||||
model = supported_type.try_build_from_state_dict(state_dict_copy, ckpt_path)
|
||||
|
||||
Reference in New Issue
Block a user