Skip to content

Conversation

zechsmerquis
Copy link

This PR fixes potential UnboundLocalError issues in the ipadapter_execute function by:

  1. Initializing all variables at the start of the function:

    • img_comp_cond_embeds
    • face_cond_embeds
    • cond
    • uncond
    • cond_comp
    • cond_alt
    • img_cond_embeds
    • img_uncond_embeds
  2. Fixing variable reference order to ensure variables are properly initialized before use

  3. Removing unused parameters:

    • weight_kolors
    • style_boost
    • composition_boost
    • enhance_tiles
    • enhance_ratio

The changes have been tested with various IPAdapter models and no UnboundLocalError exceptions occur. Memory management is also improved while maintaining functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant