Skip to content

Improve dataset preparation support + multiresolution prep #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 17, 2024

Conversation

a-r-r-o-w
Copy link
Member

@a-r-r-o-w a-r-r-o-w commented Oct 16, 2024

Fixes #4

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Love the thread-based serialization.

@a-r-r-o-w
Copy link
Member Author

@sayakpaul okay to merge? could you approve if yes?

if len(bucket) == 0:
continue
if self.shuffle:
random.shuffle(bucket)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also fix the seed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_seed already does this in the training and preparation scripts

parser.add_argument(
"--height_buckets",
nargs="+",
type=check_height,
Copy link
Member

@sayakpaul sayakpaul Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful!

# 3. Prepare models
device = f"cuda:{rank}"

generator = torch.Generator(device).manual_seed(args.seed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to always initialize the seed on a CPU.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, setting it to cpu is giving some weird device mismatch errors 🤔 i will try debugging soon, but for now, on a given gpu and same seed, seems to be fully reproducible (but yes i know why cpu is better alternative). todo

@a-r-r-o-w a-r-r-o-w merged commit feb2e26 into main Oct 17, 2024
@a-r-r-o-w a-r-r-o-w deleted the improve-data-preparation branch October 17, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi-resolution/frame bucketing in prepare_dataset.py and multi-GPU
2 participants