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

Update anneal_runner.py #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Mayeven
Copy link

@Mayeven Mayeven commented Sep 25, 2024

The code im = Image.fromarray(image_grid.mul_(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to('cpu', torch.uint8).numpy() modifies the values of image_grid itself, which causes issues with the line save_image(image_grid, os.path.join(self.args.image_folder, 'image_completion_{}.png'.format(i))). The saved images have problems when the index is a multiple of 10, so it's recommended to place this code beforehand.

The code im = Image.fromarray(image_grid.mul_(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to('cpu', torch.uint8).numpy() modifies the values of image_grid itself, which causes issues with the line save_image(image_grid, os.path.join(self.args.image_folder, 'image_completion_{}.png'.format(i))). The saved images have problems at multiples of 10, so it's recommended to place this code beforehand.
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.

1 participant