add end_pos in CNAttnProcessor
parent
852cd6a6a4
commit
23f44cc242
|
|
@ -79,7 +79,7 @@ class IPAdapter:
|
|||
scale=1.0,num_tokens= self.num_tokens).to(self.device, dtype=torch.float16)
|
||||
unet.set_attn_processor(attn_procs)
|
||||
if hasattr(self.pipe, "controlnet"):
|
||||
self.pipe.controlnet.set_attn_processor(CNAttnProcessor())
|
||||
self.pipe.controlnet.set_attn_processor(CNAttnProcessor(num_tokens= self.num_tokens))
|
||||
|
||||
def load_ip_adapter(self):
|
||||
state_dict = torch.load(self.ip_ckpt, map_location="cpu")
|
||||
|
|
|
|||
Loading…
Reference in New Issue