Muhammad Taqi Raza commited on
Commit
ca22dfe
·
1 Parent(s): cbf4da5

modifying requirements.txt

Browse files
cogvideo_controlnet_pcd.py CHANGED
@@ -237,11 +237,6 @@ class CogVideoXControlnetPCD(ModelMixin, ConfigMixin, PeftAdapterMixin):
237
  temb=emb,
238
  image_rotary_emb=image_rotary_emb,
239
  )
240
-
241
- print("hidden_states shape:", hidden_states.shape)
242
- print("out_projectors[i](hidden_states) shape:", self.out_projectors[i](hidden_states).shape)
243
- print("controlnet_output_mask shape:", controlnet_output_mask.shape)
244
-
245
 
246
  if self.out_projectors is not None:
247
  if controlnet_output_mask is not None:
 
237
  temb=emb,
238
  image_rotary_emb=image_rotary_emb,
239
  )
 
 
 
 
 
240
 
241
  if self.out_projectors is not None:
242
  if controlnet_output_mask is not None:
inference/cli_demo_camera_i2v_pcd.py CHANGED
@@ -368,6 +368,27 @@ def generate_video(
368
 
369
  # ++++++++++++++++++++++++++++++++++++++
370
  latents = video_generate_all # This is a latent
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
 
372
  scale_status = True
373
  rife_status = True
@@ -378,7 +399,7 @@ def generate_video(
378
 
379
  video_generate_all = latents
380
  # ++++++++++++++++++++++++++++++++++++++
381
-
382
  video_generate = video_generate_all[0]
383
 
384
  # 6. Export the generated frames to a video file. fps must be 8 for original video.
 
368
 
369
  # ++++++++++++++++++++++++++++++++++++++
370
  latents = video_generate_all # This is a latent
371
+ print(f"Type of latents: {type(latents)}")
372
+ print(f"Length of latents: {len(latents)}")
373
+
374
+ # Print detailed info about each item
375
+ for i, item in enumerate(latents):
376
+ print(f"\nItem {i}:")
377
+ print(f" Type: {type(item)}")
378
+ if isinstance(item, torch.Tensor):
379
+ print(f" Shape: {item.shape}")
380
+ print(f" Dtype: {item.dtype}")
381
+ print(f" Device: {item.device}")
382
+ elif isinstance(item, np.ndarray):
383
+ print(f" Shape: {item.shape}")
384
+ print(f" Dtype: {item.dtype}")
385
+ elif hasattr(item, 'size') and callable(item.size): # For PIL images
386
+ print(f" Size (WxH): {item.size}")
387
+ print(f" Mode: {item.mode}")
388
+ else:
389
+ print(f" Value: {item}")
390
+ # Only works if all elements are tensors of the same shape
391
+ latents = torch.stack(latents)
392
 
393
  scale_status = True
394
  rife_status = True
 
399
 
400
  video_generate_all = latents
401
  # ++++++++++++++++++++++++++++++++++++++
402
+
403
  video_generate = video_generate_all[0]
404
 
405
  # 6. Export the generated frames to a video file. fps must be 8 for original video.