Function
_get_add_time_ids
(
fps,
motion_bucket_id,
noise_aug_strength,
dtype,
batch_size,
unet=None,
device=None
)
Source from the content-addressed store, hash-verified
| 1220 | return image_embeddings |
| 1221 | |
| 1222 | def _get_add_time_ids( |
| 1223 | fps, |
| 1224 | motion_bucket_id, |
| 1225 | noise_aug_strength, |
| 1226 | dtype, |
| 1227 | batch_size, |
| 1228 | unet=None, |
| 1229 | device=None |
| 1230 | ): |
| 1231 | add_time_ids = [fps, motion_bucket_id, noise_aug_strength] |
| 1232 | |
| 1233 | add_time_ids = torch.tensor([add_time_ids], dtype=dtype, device=device) |
| 1234 | add_time_ids = add_time_ids.repeat(batch_size, 1) |
| 1235 | return add_time_ids |
| 1236 | |
| 1237 | # Potentially load in the weights and states from a previous save |
| 1238 | if args.resume_from_checkpoint: |
Tested by
no test coverage detected