-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Description
The model's forward methods have inconsistent parameter handling across different implementations. In particular, ControlPixArtMSHalf_RelaCtrl implements a forward method that shadows the one from the parent class, but without proper handling of the c parameter when it's None.
Steps to Reproduce
In diffusion/model/nets/pixart_relactrl_v1.py, the forward method in ControlPixArtHalf_RelaCtrl handles conditioning properly:
def forward_c(self, c):
# Properly process c if it's not None
return self.x_embedder(c) + pos_embed if c is not None else cWhile in ControlPixArtMSHalf_RelaCtrl, it seems to directly call forward_c(c) without checking if c is None first, which could lead to errors.
Proposed Solution
Ensure consistent parameter handling across all forward methods. Specifically:
- Make sure all inherited methods properly handle the case where
cisNone - Add proper error handling and validation for input parameters
- Consider creating a standardized interface for all forward methods to ensure consistency
Metadata
Metadata
Assignees
Labels
No labels