Skip to content

fix: initialize image_cond_mask to prevent UnboundLocalError in I2V#1874

Open
VipCrazyMaster wants to merge 1 commit intokijai:mainfrom
VipCrazyMaster:fix/image-cond-mask-unbound
Open

fix: initialize image_cond_mask to prevent UnboundLocalError in I2V#1874
VipCrazyMaster wants to merge 1 commit intokijai:mainfrom
VipCrazyMaster:fix/image-cond-mask-unbound

Conversation

@VipCrazyMaster
Copy link
Copy Markdown

Problem

When running I2V with Fun 2.1 models (transformer.in_dim in [48, 32]), the mask assignment branch is skipped.
However, image_cond_mask is referenced later, causing:

UnboundLocalError: cannot access local variable 'image_cond_mask' where it is not associated with a value

Fix

Initialize image_cond_mask = None before conditional assignment so it is always defined.

This is a minimal change and does not alter behavior when a mask is provided.

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