-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Align PT and Flax API - allow loading checkpoint from PyTorch configs #827
Conversation
…finalize_flax_pipe
The documentation is not available anymore as the PR was closed or merged. |
assert np.abs((np.abs(images[0, 0, :2, :2, -2:], dtype=np.float32).sum() - 0.05652401)) < 1e-3 | ||
assert np.abs((np.abs(images, dtype=np.float32).sum() - 2383808.2)) < 1e-2 | ||
|
||
def test_stable_diffusion_v1_4_bfloat_16(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no safety + outer pmap
assert np.abs((np.abs(images[0, 0, :2, :2, -2:], dtype=np.float32).sum() - 0.06652832)) < 1e-3 | ||
assert np.abs((np.abs(images, dtype=np.float32).sum() - 2384849.8)) < 1e-2 | ||
|
||
def test_stable_diffusion_v1_4_bfloat_16_with_safety(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with safety + inner pmap
|
||
# shard inputs and rng | ||
params = replicate(params) | ||
prng_seed = jax.random.split(prng_seed, 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to replace 8
with jax.device_count()
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this would indeed be a good idea (in case someone wants to open a PR for it, please feel free)
…huggingface#827) * up * finish * add more tests * up * up * finish
…huggingface#827) * up * finish * add more tests * up * up * finish
No description provided.