fix vis
This commit is contained in:
+2
-1
@@ -42,4 +42,5 @@ hw*
|
||||
257f*
|
||||
513f*
|
||||
taming*
|
||||
221hw*
|
||||
221hw*
|
||||
65x512x512
|
||||
@@ -401,7 +401,7 @@ class LatteT2V(ModelMixin, ConfigMixin):
|
||||
encoder_hidden_states = torch.cat([encoder_hidden_states_video, encoder_hidden_states_image], dim=1)
|
||||
encoder_hidden_states_spatial = rearrange(encoder_hidden_states, 'b f t d -> (b f) t d').contiguous()
|
||||
else:
|
||||
encoder_hidden_states_spatial = repeat(encoder_hidden_states, 'b t d -> (b f) t d', f=frame).contiguous()
|
||||
encoder_hidden_states_spatial = repeat(encoder_hidden_states, 'b 1 t d -> (b f) t d', f=frame).contiguous()
|
||||
|
||||
# prepare timesteps for spatial and temporal block
|
||||
timestep_spatial = repeat(timestep, 'b d -> (b f) d', f=frame + use_image_num).contiguous()
|
||||
|
||||
@@ -705,6 +705,10 @@ class VideoGenPipeline(DiffusionPipeline):
|
||||
# broadcast to batch dimension in a way that's compatible with ONNX/Core ML
|
||||
current_timestep = current_timestep.expand(latent_model_input.shape[0])
|
||||
|
||||
if prompt_embeds.ndim == 3:
|
||||
prompt_embeds = prompt_embeds.unsqueeze(1) # b l d -> b 1 l d
|
||||
# if prompt_attention_mask.ndim == 2:
|
||||
# prompt_attention_mask = prompt_attention_mask.unsqueeze(1) # b l -> b 1 l
|
||||
# predict noise model_output
|
||||
noise_pred = self.transformer(
|
||||
latent_model_input,
|
||||
|
||||
Reference in New Issue
Block a user