Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPAdapterFromParamsBatch node #526

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions IPAdapterPlus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,28 @@ def INPUT_TYPES(s):

CATEGORY = "ipadapter/params"

class IPAdapterFromParamsBatch(IPAdapterBatch):
def __init__(self):
self.unfold_batch = True
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"model": ("MODEL", ),
"ipadapter": ("IPADAPTER", ),
"ipadapter_params": ("IPADAPTER_PARAMS", ),
"combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
"embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
},
"optional": {
"image_negative": ("IMAGE",),
"clip_vision": ("CLIP_VISION",),
}
}

CATEGORY = "ipadapter/params"


"""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Helpers
Expand Down Expand Up @@ -1651,6 +1673,7 @@ def combine(self, params_1, params_2, params_3=None, params_4=None, params_5=Non
"IPAdapterStyleCompositionBatch": IPAdapterStyleCompositionBatch,
"IPAdapterMS": IPAdapterMS,
"IPAdapterFromParams": IPAdapterFromParams,
"IPAdapterFromParamsBatch": IPAdapterFromParamsBatch,

# Loaders
"IPAdapterUnifiedLoader": IPAdapterUnifiedLoader,
Expand Down