Improve dataset preparation support + multiresolution prep (#39)

* update

* make style

* renormalize correctly

* apply suggestions from review

* apply suggestions from review

* update
This commit is contained in:
Aryan
2024-10-17 16:48:52 +05:30
committed by GitHub
parent a6c246c29d
commit feb2e26547
5 changed files with 427 additions and 363 deletions
+3 -1
View File
@@ -200,6 +200,7 @@ def log_validation(
return videos
class CollateFunction:
def __init__(self, weight_dtype, load_tensors):
self.weight_dtype = weight_dtype
@@ -223,6 +224,7 @@ class CollateFunction:
"prompts": prompts,
}
def main(args):
if args.report_to == "wandb" and args.hub_token is not None:
raise ValueError(
@@ -647,7 +649,7 @@ def main(args):
# Encode videos
if not args.load_tensors:
images = images.permute(0, 2, 1, 3, 4) # [B, C, F, H, W]
images = images.permute(0, 2, 1, 3, 4) # [B, C, F, H, W]
image_noise_sigma = torch.normal(
mean=-3.0, std=0.5, size=(images.size(0),), device=accelerator.device, dtype=weight_dtype
)