-
Notifications
You must be signed in to change notification settings - Fork 179
[Feature] Add Cosmos2 i2v pipeline #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
_class_name: str = "AutoencoderKLWan" | ||
_diffusers_version: str = "0.34.0.dev0" | ||
_name_or_path: str = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields should be pop/removed in the loader so can be removed. You can refer to how wan's vae config is defined
|
||
def __post_init__(self): | ||
self.blend_num_frames = (self.tile_sample_min_num_frames - | ||
self.tile_sample_stride_num_frames) * 2 No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline char
|
||
|
||
@dataclass | ||
class CosmosVideoConfigFixed(CosmosVideoConfig): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
class CosmosVideoConfigFixed(CosmosVideoConfig): | ||
"""Fixed Cosmos Video Config that matches original Cosmos2 Video2World configuration.""" | ||
|
||
def update_model_arch(self, config: dict) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you align against diffusers or original cosmos?
|
||
|
||
@dataclass | ||
class CosmosTeaCacheParams(CacheParams): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed for now, but you should add a default for cosmos sampling params. Refer to wan
if self.has_weight: | ||
self.weight = nn.Parameter(self.weight) | ||
|
||
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change this to forward_diffusers?
TODO: