Skip to content

Commit 87535d6

Browse files
1360 * 768
1 parent b02915b commit 87535d6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/diffusers/models/transformers/cogvideox_transformer_3d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,15 @@ def __init__(
249249
)
250250

251251
# 1. Patch embedding
252+
#TODO: different git push --set-upstream origin cogvideox1.1-5b
253+
252254
# self.patch_embed = CogVideoXPatchEmbed(
253255
self.patch_embed = CogVideoX1_1PatchEmbed(
254256
patch_size=patch_size,
255257
in_channels=in_channels,
256258
embed_dim=inner_dim,
257259
text_embed_dim=text_embed_dim,
258-
# bias=True,
260+
# bias=True, # Only using in CogVideoX-5B
259261
sample_width=sample_width,
260262
sample_height=sample_height,
261263
sample_frames=sample_frames,

src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@ def _prepare_rotary_positional_embeddings(
444444
grid_width = width // (self.vae_scale_factor_spatial * self.transformer.config.patch_size)
445445

446446
# TODO: Here, compatibility is needed for both the CogVideoX-5B and CogVideoX1.1-5B models.
447-
# CogVideoX1.0 is 720 X 480 and CogVideoX1.1-5B T2V is 768 * 1360, CogVideoX1.1-5B I2V use with image
448-
base_size_width = 768 // (self.vae_scale_factor_spatial * self.transformer.config.patch_size)
449-
base_size_height = 1360 // (self.vae_scale_factor_spatial * self.transformer.config.patch_size)
447+
# CogVideoX1.0 is 720 X 480 and CogVideoX1.1-5B T2V is 1360 * 768, CogVideoX1.1-5B I2V use with image
448+
base_size_width = 1360 // (self.vae_scale_factor_spatial * self.transformer.config.patch_size)
449+
base_size_height = 768 // (self.vae_scale_factor_spatial * self.transformer.config.patch_size)
450450

451451
grid_crops_coords = get_resize_crop_region_for_grid(
452452
(grid_height, grid_width), base_size_width, base_size_height

0 commit comments

Comments
 (0)