Scripts: hold VRAM back for frame generation on 12 GB cards #107

Closed
github-bot wants to merge 0 commits from github-bot/gh-107 into main AGit
Owner

@⁠horizonlullaby on GitHub · 2026-11-30 13:00 UTC · original
horizonlullaby:fix/script-framegen-vram-budget → main · +9 −1 · 1 files · 47 commits · closed without merging

The GUI launcher holds a fifth of the card's budget back when frame generation is on; scripts/play-foxhound.ps1 -FrameGen (and victory run with VICTORY_FRAMEGEN=1) did not, so on a 12 GB card Streamline reported "Exceeded VRAM budget", DLSS upscaling failed and no generated frame was shown (DLSS Frame Generation: 22 presents ..., 0 frames shown by it).

This adds -VramBudgetMB (default 0) and, when -FrameGen is on without an explicit value, sets VICTORY_VRAM_BUDGET_MB = 9000 — the same reserve the launcher makes, made explicit for 12 GB cards.

Measured on an RTX 5070 12 GB, 2560x1440, DLSS Balanced, FG on:

  • without reserve: Exceeded VRAM budget + 0 frames shown by it;
  • with 9000 MB: 22 presents with it on, 44 frames shown by it, no out-of-VRAM warnings; rendered median 20.5 fps in ~6.1k-draw scenes (~41 shown), ~28 rendered in lighter scenes (~56 shown).

Long-term it might be better to reserve inside victory.exe when VICTORY_FRAMEGEN=1 is seen, so every entry point behaves the same; happy to rework.

Refs #106.

**@⁠horizonlullaby** on GitHub · 2026-11-30 13:00 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/107) `horizonlullaby:fix/script-framegen-vram-budget` → `main` · +9 −1 · 1 files · 47 commits · closed without merging The GUI launcher holds a fifth of the card's budget back when frame generation is on; `scripts/play-foxhound.ps1 -FrameGen` (and `victory run` with `VICTORY_FRAMEGEN=1`) did not, so on a 12 GB card Streamline reported "Exceeded VRAM budget", DLSS upscaling failed and **no generated frame was shown** (`DLSS Frame Generation: 22 presents ..., 0 frames shown by it`). This adds `-VramBudgetMB` (default 0) and, when `-FrameGen` is on without an explicit value, sets `VICTORY_VRAM_BUDGET_MB = 9000` — the same reserve the launcher makes, made explicit for 12 GB cards. Measured on an RTX 5070 12 GB, 2560x1440, DLSS Balanced, FG on: - without reserve: `Exceeded VRAM budget` + `0 frames shown by it`; - with 9000 MB: `22 presents with it on, 44 frames shown by it`, no out-of-VRAM warnings; rendered median 20.5 fps in ~6.1k-draw scenes (~41 shown), ~28 rendered in lighter scenes (~56 shown). Long-term it might be better to reserve inside `victory.exe` when `VICTORY_FRAMEGEN=1` is seen, so every entry point behaves the same; happy to rework. Refs #106.
play-foxhound.ps1 -FrameGen now sets VICTORY_VRAM_BUDGET_MB (default 9000, or
-VramBudgetMB). The GUI launcher already holds a fifth of the budget back; the
script did not, so on a 12 GB card Streamline reported "Exceeded VRAM budget",
DLSS upscaling failed and no generated frame was shown.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 13:05:26 +00:00
Author
Owner

@⁠IRennie74 on GitHub · 2026-11-30 18:22 UTC · original · edited 2026-11-30 18:44 UTC

VICTORY_VRAM_BUDGET_MB is a cap ("no more than this is taken as the budget", host.rs), so a fixed 9000 only does the right thing on cards with about 11-12 GB of budget:

  • 16-24 GB cards: -FrameGen now caps them at 9000 MB, which takes 5-13 GB away from textures for no reason.
  • 8 GB cards: the budget is already under 9000, so nothing is held back. That is the same situation that failed on 12 GB before this change.

The GUI launcher's rule, a fifth of the card's own budget held back, scales with the card. Doing the same here, by reading the adapter's budget or by setting VICTORY_TEXTURE_ROOM_PERCENT=80 with VICTORY_FRAMEGEN_ROOM_RESERVE=1 as VIctory-NVIDIA's victory play does when frame generation is on, would give 12 GB cards about what you measured without hurting larger or smaller ones. As you say, doing it inside victory.exe when VICTORY_FRAMEGEN=1 is seen would cover every entry point.

Also, the reserve is set whenever -FrameGen is passed, including on cards where DLSS frame generation cannot run (RTX 30 and older), where it only costs texture memory unless another frame generation path is used. Setting it only when a frame generation path actually starts would avoid that.

**@⁠IRennie74** on GitHub · 2026-11-30 18:22 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/107#issuecomment-7287765595) · edited 2026-11-30 18:44 UTC `VICTORY_VRAM_BUDGET_MB` is a cap ("no more than this is taken as the budget", `host.rs`), so a fixed 9000 only does the right thing on cards with about 11-12 GB of budget: - **16-24 GB cards:** `-FrameGen` now caps them at 9000 MB, which takes 5-13 GB away from textures for no reason. - **8 GB cards:** the budget is already under 9000, so nothing is held back. That is the same situation that failed on 12 GB before this change. The GUI launcher's rule, a fifth of the card's own budget held back, scales with the card. Doing the same here, by reading the adapter's budget or by setting `VICTORY_TEXTURE_ROOM_PERCENT=80` with `VICTORY_FRAMEGEN_ROOM_RESERVE=1` as VIctory-NVIDIA's `victory play` does when frame generation is on, would give 12 GB cards about what you measured without hurting larger or smaller ones. As you say, doing it inside `victory.exe` when `VICTORY_FRAMEGEN=1` is seen would cover every entry point. Also, the reserve is set whenever `-FrameGen` is passed, including on cards where DLSS frame generation cannot run (RTX 30 and older), where it only costs texture memory unless another frame generation path is used. Setting it only when a frame generation path actually starts would avoid that.
github-bot closed this pull request 2026-12-01 01:10:30 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 01:34 UTC · original

Thanks. Closing because the 9,000 MB budget is applied whatever the card: on a 16 or 24 GB card with frame generation it would hold the layer far below what the card has.

Room for frame generation is being handled in the layer itself for the next release (a reserve taken from the card's own memory), which covers the 12 GB case this was written for.

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 01:34 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/107#issuecomment-7297661147) Thanks. Closing because the 9,000 MB budget is applied whatever the card: on a 16 or 24 GB card with frame generation it would hold the layer far below what the card has. Room for frame generation is being handled in the layer itself for the next release (a reserve taken from the card's own memory), which covers the 12 GB case this was written for.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.