Commit 21e9024b authored by Qirui Sun's avatar Qirui Sun
Browse files

'control mode'- Save before debug

1 merge request!1now merge Ip branch to master
Showing with 3 additions and 1 deletion
+3 -1
......@@ -402,7 +402,7 @@ class PlugableIPAdapter(torch.nn.Module):
set_model_patch_replace(model, self.patch_forward(number), "output", id, index)
number += 1
for index in range(10):
if IP_weights[number]:
if IP_weights[number]:
set_model_patch_replace(model, self.patch_forward(number), "middle", 0, index)
number += 1
......
......@@ -621,6 +621,8 @@ class UnetHook(nn.Module):
if param.soft_injection or high_res_fix_forced_soft_injection:
# important! use the soft weights with high-res fix can significantly reduce artifacts.
import pdb
pdb.set_trace()
if param.control_model_type == ControlModelType.T2I_Adapter:
control_scales = [param.weight * x for x in (0.25, 0.62, 0.825, 1.0)]
elif param.control_model_type == ControlModelType.ControlNet:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment