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 c
While 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
c is None
- Add proper error handling and validation for input parameters
- Consider creating a standardized interface for all forward methods to ensure consistency
Description
The model's forward methods have inconsistent parameter handling across different implementations. In particular,
ControlPixArtMSHalf_RelaCtrlimplements aforwardmethod that shadows the one from the parent class, but without proper handling of thecparameter when it'sNone.Steps to Reproduce
In
diffusion/model/nets/pixart_relactrl_v1.py, theforwardmethod inControlPixArtHalf_RelaCtrlhandles conditioning properly:While in
ControlPixArtMSHalf_RelaCtrl, it seems to directly callforward_c(c)without checking ifcis None first, which could lead to errors.Proposed Solution
Ensure consistent parameter handling across all forward methods. Specifically:
cisNone