fix controlnet

#961
This commit is contained in:
layerdiffusion
2024-08-07 19:21:05 -07:00
parent 692a0b2422
commit 002341af5b
2 changed files with 33 additions and 48 deletions

View File

@@ -116,8 +116,8 @@ class ControlNetPatcher(ControlModelPatcher):
controlnet_config.pop("out_channels")
controlnet_config["hint_channels"] = controlnet_data["{}input_hint_block.0.weight".format(prefix)].shape[1]
with using_forge_operations():
control_model = cldm.ControlNet(**controlnet_config)
with using_forge_operations(dtype=unet_dtype):
control_model = cldm.ControlNet(**controlnet_config).to(dtype=unet_dtype)
if pth:
if 'difference' in controlnet_data: