mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-11 10:29:57 +00:00
remove legacy config
This commit is contained in:
@@ -350,7 +350,7 @@ class ControlLora(ControlNet):
|
||||
|
||||
def pre_run(self, model, percent_to_timestep_function):
|
||||
super().pre_run(model, percent_to_timestep_function)
|
||||
controlnet_config = model.diffusion_model.legacy_config.copy()
|
||||
controlnet_config = model.diffusion_model.config.copy()
|
||||
controlnet_config.pop("out_channels")
|
||||
controlnet_config["hint_channels"] = self.control_weights["input_hint_block.0.weight"].shape[1]
|
||||
controlnet_config["dtype"] = dtype = model.storage_dtype
|
||||
|
||||
@@ -246,7 +246,7 @@ def model_lora_keys_unet(model, key_map={}):
|
||||
key_map["lora_unet_{}".format(key_lora)] = k
|
||||
key_map["lora_prior_unet_{}".format(key_lora)] = k
|
||||
|
||||
diffusers_keys = unet_to_diffusers(model.diffusion_model.legacy_config)
|
||||
diffusers_keys = unet_to_diffusers(model.diffusion_model.config)
|
||||
for k in diffusers_keys:
|
||||
if k.endswith(".weight"):
|
||||
unet_key = "diffusion_model.{}".format(diffusers_keys[k])
|
||||
|
||||
@@ -52,7 +52,7 @@ class FreeU:
|
||||
|
||||
class FreeU_V2:
|
||||
def patch(self, model, b1, b2, s1, s2):
|
||||
model_channels = model.model.diffusion_model.legacy_config["model_channels"]
|
||||
model_channels = model.model.diffusion_model.config["model_channels"]
|
||||
scale_dict = {model_channels * 4: (b1, s1), model_channels * 2: (b2, s2)}
|
||||
on_cpu_devices = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user