cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.12k stars 235 forks source link

Add "Style and Composition" and "Strong Style and Composition" to WEIGHT_TYPES in IPAdapter, IPAdapterAdvanced, and IPAdapterTiled #576

Open rossaai opened 1 month ago

rossaai commented 1 month ago

The ipadapter_execute function already supports the "style and composition" and "strong style and composition" weight types. However, these weight types are not currently listed in the WEIGHT_TYPES array. To ensure these weight types are recognized and can be utilized effectively, we need to update the WEIGHT_TYPES array to include them.

Context:

The WEIGHT_TYPES array currently includes the following weight types:

https://github.com/cubiq/ComfyUI_IPAdapter_plus/blob/d33265adf72974213fd4ea9bdbba1d0f176e7658/IPAdapterPlus.py#L40-L42

Proposed Solution:

  1. Update the WEIGHT_TYPES array to include "style and composition" and "strong style and composition".

Updated Code:

WEIGHT_TYPES = [
    "linear", 
    "ease in", 
    "ease out", 
    "ease in-out", 
    "reverse in-out", 
    "weak input", 
    "weak output", 
    "weak middle", 
    "strong middle", 
    "style transfer", 
    "composition", 
    "strong style transfer",
    "style and composition",  # New weight type
    "strong style and composition"  # New weight type
]

Benefits:

Action Items:

  1. Update the WEIGHT_TYPES array to include the new weight types.
  2. Test the updated array to ensure the new weight types are recognized and function correctly.
  3. Update the documentation to reflect the new weight types.

By implementing these changes, we can provide a more robust and flexible solution for users of the IPAdapter suite.

cubiq commented 1 month ago

"style and composition" requires two input images, the advanced IPAdapter node doesn't have that.

rossaai commented 1 month ago

What happens when using the same image for composition and style?

cubiq commented 1 month ago

you are patching those two layers with the same image