mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #408] serve: let the image encoder run on its own GPU (vision.cuda_device) #187
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Efs-O on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/408
Request: let the image encoder run on its own GPU, chosen in the config, separate from the cards the engine uses.
Why: I have three cards: two RTX 5060 Ti 16 GB that hold the IQ3_S layer split (
"gpu": [0, 1]) and a spare RTX 3060 12 GB. With--vision gpu,strata-visionstarts with the engine's environment (child_env(cfg), soCUDA_VISIBLE_DEVICES=0,1) and lands on card 0. It takes room the expert cache could use (the "few % slower" in the docs) while the 3060 sits idle. I couldn't find a setting for this; the env is shared atserver.pywhereVision(cfg["vision"], ..., env=env)is built.What I run locally (0.1.30): an optional
"cuda_device"in the config'svisionsection. When it is set, the encoder gets a copy of the env withCUDA_DEVICE_ORDER=PCI_BUS_IDandCUDA_VISIBLE_DEVICES=<n>(numbered like nvidia-smi, as in #51). When it is absent, nothing changes.Plus a unit test next to
GpuChoice.test_env: the encoder env gets"2", the engine env stays"0,1", and withoutcuda_devicethe engine's env is returned unchanged.Measured (Windows 10, driver CUDA 13.0, engine 0.1.30, prebuilt
strata-vision.exewith sm_86):nvidia-smishowsstrata-vision.exeon the 3060 only. The 3060 went from about 0.9 to 2.3 GB, and the two 5060 Tis stayed at about 14.9 / 15.0 GB./v1/statusreports"vision": {"enabled": true, "available": true}./v1/chat/completions(image_urldata URL) was described correctly, with 1,073 prompt tokens and 11.5 s for the full request including 151 output tokens.Open points for you:
--visiontoargsbut left out--vram-reserve-mib, since 700 is already the engine default.vision_archs(86/89/120 in the prebuilt). This patch does not check that.Happy to open a PR if this shape works for you.
@Niko1221 commented on GitHub (Oct 1, 2026):
Thanks, taken as you described for the next release:
"cuda_device"in the config'svisionsection runs the encoder on that card alone (numbered likenvidia-smi); without it nothing changes. Documented in DETAILS.md (Images), with a note to lower--vram-reserve-mibto 700 in that case. Credited to you. This issue closes with the release.@Niko1221 commented on GitHub (Oct 1, 2026):
Released in 0.1.33:
"cuda_device"in the vision section. Thanks!