Skip to content
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

the 【orig_size】 for compute_embeddings_fn #27

Open
solitaryTian opened this issue Dec 31, 2024 · 0 comments
Open

the 【orig_size】 for compute_embeddings_fn #27

solitaryTian opened this issue Dec 31, 2024 · 0 comments

Comments

@solitaryTian
Copy link

I notice the orig_size from batch is just set as (resolution, resolution) in the training code.
Is their any bug when the shape of input_data is not exactly (resolution, resolution) ?

class CustomImageDataset(Dataset): def __init__(self, img_dir, sample_size): """ Args: img_dir (string): Directory with all the images and text files. sample_size (tuple): Desired sample size as (height, width). """ self.img_dir = img_dir self.sample_size = sample_size return ( image, text, (self.sample_size, self.sample_size), (c_top, c_left), )

train_dataset = CustomImageDataset("/mnt/data/wangfuyun/cc3m", args.resolution)
for epoch in range(first_epoch, args.num_train_epochs): for step, batch in enumerate(train_dataloader): with accelerator.accumulate(unet, discriminator): image, text, orig_size, crop_coords = batch

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

No branches or pull requests

1 participant