Skip to content

Fixed fatal bug where model failed to save#7

Open
ADKoishi wants to merge 2 commits intoyk7333:mainfrom
ADKoishi:main
Open

Fixed fatal bug where model failed to save#7
ADKoishi wants to merge 2 commits intoyk7333:mainfrom
ADKoishi:main

Conversation

@ADKoishi
Copy link
Contributor

accelerator.is_main_process() leads to forever waiting and cause saving failure! This method should be called by all processes!

@ADKoishi
Copy link
Contributor Author

Error msg.:
pil = Image.fromarray((image[0].cpu().numpy().transpose(1, 2, 0) * 255).astype(np.uint8))
TypeError: Got unsupported ScalarType BFloat16

Solution: Cast to FP32 before saving.

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