Skip to content

fix: Add memory host requirement to prevent OOM failures - #221

Merged
anika-suman-amazon merged 2 commits into
aws-deadline:mainlinefrom
anika-suman-amazon:fix/flux2-klein-host-requirements
May 21, 2026
Merged

anika-suman-amazon merged 2 commits into
aws-deadline:mainlinefrom
anika-suman-amazon:fix/flux2-klein-host-requirements

Conversation

@anika-suman-amazon

Copy link
Copy Markdown
Contributor

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.

@anika-suman-amazon
anika-suman-amazon requested a review from a team May 14, 2026 18:18
@anika-suman-amazon
anika-suman-amazon force-pushed the fix/flux2-klein-host-requirements branch 2 times, most recently from fd66a8d to dec4244 Compare May 14, 2026 18:20
Comment thread job_bundles/flux2_klein_lora/README.md Outdated
…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
anika-suman-amazon force-pushed the fix/flux2-klein-host-requirements branch from dec4244 to 3286e87 Compare May 14, 2026 18:36
@anika-suman-amazon anika-suman-amazon changed the title fix: add memory host requirement to prevent OOM failures fix: Add memory host requirement to prevent OOM failures May 14, 2026
@anika-suman-amazon
anika-suman-amazon merged commit 8c8678a into aws-deadline:mainline May 21, 2026
4 checks passed
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.

3 participants