remove unused codes (#568)

This commit is contained in:
lllyasviel 2023-10-08 03:54:33 -07:00 committed by GitHub
parent 0879e92ab8
commit 7710c30277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -210,13 +210,9 @@ def preprocess(img):
@torch.no_grad()
@torch.inference_mode()
def patch_model(model, ip_tasks):
def patch_model(model, tasks):
new_model = model.clone()
tasks = []
for cn_img, cn_stop, cn_weight in ip_tasks:
tasks.append((cn_img, cn_stop, cn_weight, {}))
def make_attn_patcher(ip_index):
def patcher(n, context_attn2, value_attn2, extra_options):
org_dtype = n.dtype
@ -229,7 +225,7 @@ def patch_model(model, ip_tasks):
v = [value_attn2]
b, _, _ = q.shape
for ip_conds, cn_stop, cn_weight, cache in tasks:
for ip_conds, cn_stop, cn_weight in tasks:
if current_step < cn_stop:
ip_k_c = ip_conds[ip_index * 2].to(device=ip_adapter.load_device, dtype=ip_adapter.dtype)
ip_v_c = ip_conds[ip_index * 2 + 1].to(device=ip_adapter.load_device, dtype=ip_adapter.dtype)

View File

@ -1 +1 @@
version = '2.1.4'
version = '2.1.5'