Repository navigation
fix: Add memory host requirement to prevent OOM failures - #221
Merged
anika-suman-amazon merged 2 commits intoMay 21, 2026
Merged
anika-suman-amazon merged 2 commits into
anika-suman-amazon merged 2 commits into
Conversation
anika-suman-amazon
force-pushed
the
fix/flux2-klein-host-requirements
branch
2 times, most recently
from
May 14, 2026 18:20
fd66a8d to
dec4244
Compare
Cherie-Chen
reviewed
May 14, 2026
…lures The FLUX.2 Klein 4B model requires ~8GB RAM to load transformer weights, causing OOM on instances with 32 GiB when combined with OS/CUDA overhead. Added amount.worker.memory min 65536 MiB to both job templates and updated README fleet requirements. Signed-off-by: Anika Suman <anika-suman-amazon@users.noreply.github.com>
anika-suman-amazon
force-pushed
the
fix/flux2-klein-host-requirements
branch
from
May 14, 2026 18:36
dec4244 to
3286e87
Compare
Cherie-Chen
approved these changes
May 14, 2026
leon-li-inspire
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The FLUX.2 Klein 4B model requires ~8GB RAM to load transformer weights, causing OOM on instances with 32 GiB when combined with OS/CUDA overhead. Added amount.worker.memory min 65536 MiB to both job templates and updated README fleet requirements.
What was the problem/requirement? (What/Why)
Jobs get scheduled on instances with 32 GiB RAM (e.g., g5.2xlarge), which isn't enough to load the 7.7 GB transformer weights plus PyTorch/CUDA overhead. This causes OOM failures during training.
What was the solution? (How)
Added amount.worker.memory: min 65536 (64 GiB) to hostRequirements in both job templates. Updated README fleet requirements to document this.
What is the impact of this change?
Jobs will only schedule on instances with 64 GiB+ RAM, preventing OOM failures.
How was this change tested?
g5.2xlarge (32 GiB): OOM at model load and during training
g5.4xlarge (64 GiB): Training and image generation both completed successfully
If this is a sample, then please describe the steps that you took to test it.
Include output from your testing to demonstrate it working as expected if possible.
Was this change documented?
Yes--updated README fleet requirements for both job bundles.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.