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

I reproduced pix2pix training on apple silicon #29

Open
andjoer opened this issue Apr 11, 2024 · 0 comments
Open

I reproduced pix2pix training on apple silicon #29

andjoer opened this issue Apr 11, 2024 · 0 comments

Comments

@andjoer
Copy link

andjoer commented Apr 11, 2024

Hello,

thanks for your awesome work! I modified the train pix2pix code to work on apple silicon (I have a branch "apple-silicon" on my fork on GitHub). It was straight forward but there is one incompatibility with vision-aided-loss (line 128 of cvmodel.py)
x = F.interpolate(x*0.5+0.5, size=(224, 224), mode='area')
Since the mode is area on mps devices the input size needs to be divisible by 224, so I added
x_tgt_resized = F.interpolate(x_tgt, size=(448, 448), mode='bilinear') x_tgt_pred_resized = F.interpolate(x_tgt, size=(448, 448), mode='bilinear')

before entering the x_tgt and x_tgt_pred into the discriminator.

Question:
It trains well (takes around 15h for 10k steps on a MacBook Pro M3) but I wonder if and how much this affects the training characteristics. Could anyone have a wandb report of the my_fill50k dataset training from a run with the standard code on Cuda?

To reproduce:
After installing vision-aided-loss you have to uninstall PyTorch and install the nightly version again. Otherwise it does not work on apple mps anymore.

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