-
Notifications
You must be signed in to change notification settings - Fork 109
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
Support SVD dynamic shape[feat] #564
Conversation
@@ -11,6 +11,9 @@ | |||
from diffusers.models.transformer_2d import Transformer2DModel | |||
if diffusers_version >= version.parse("0.24.00"): | |||
from diffusers.models.resnet import SpatioTemporalResBlock | |||
from diffusers.models.transformer_temporal import TransformerSpatioTemporalModel | |||
from diffusers.models.attention import TemporalBasicTransformerBlock | |||
from diffusers.models.unet_spatio_temporal_condition import UNetSpatioTemporalConditionModel | |||
|
|||
if diffusers_version >= version.parse("0.25.00"): | |||
from diffusers.models.autoencoders.autoencoder_kl_temporal_decoder import TemporalDecoder |
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.
需要试下对 diffusers 0.25 的兼容性
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.
在 0.24 和 0.25 上测试过了。
|
||
hidden_states = self.norm(hidden_states) | ||
inner_dim = hidden_states.shape[1] | ||
# hidden_states = hidden_states.permute(0, 2, 3, 1).reshape(batch_frames, height * width, inner_dim) |
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.
都默认加个注释以方便后面维护: Rewrite for onediff dynamic shape
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.
done
另外现在的 ci 是还没跑 svd 的测试,其中一个主要原因是 CI 机器的显存太小? |
是的 |
@lixiang007666 我看这里面有用到unflatten这个算子,我在oneflow里面没有找到这个算子的实现?请问你用的是哪个版本的one flow呢? |
这个算子是在一个 oneflow 内部扩展版本中实现的,还没开放。 |
This PR is done:
issue: https://github.com/siliconflow/sd-team/issues/240
Run:
Output: