Repository navigation
Studio: move torchao int8 weights back to the GPU after an oversized request streams pinned groups - #12617
Conversation
#12562 (make carried rows a faintly frosted, darker copy) landed after this branch was cut and restyles the shared ghost rule that #12499 introduced: it relies on --row-ghost-surface and .model-picker-row-ghost, and edits model-picker-pinned-drag-preview.test.ts, all of which the #12499 revert removes. Keeping it without #12499 leaves .sidebar-row-ghost reading an unset variable, so the conflict is resolved by dropping #12562's two hunks as well. It should be re-opened together with #12499. #12563, #12564 and #12597 are kept.
…request streams pinned groups (#12526) * Studio: restore pinned torchao groups by their inner tensors After an oversized request streams the pinned denoiser groups, restoring them skipped every tensor whose wrapper already reported the onload device. A torchao int8 weight can report cuda after a streamed offload while its int8 data and scales sit on the host, so the restore left them there and the next request failed with a device mismatch (Qwen-Image-2.1 int8 at 12 or 16 GB, a 2400x1792 render followed by a 1024 render). _placed_on() judges a torchao subclass by its flattened inner tensors; plain tensors keep the device check. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: check torchao restore placement through the inner tensors in the test The new test read .qdata/.scale directly, which only exist on torchao's v2 Int8Tensor. On torchao 0.14 (the default for torch <= 2.9) int8 weights keep the v1 layout, so the test raised AttributeError instead of checking the restore. Walk __tensor_flatten__ recursively so both layouts are covered. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Etherll <[email protected]> (cherry picked from commit d883d2d)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…request streams pinned groups (#12526) * Studio: restore pinned torchao groups by their inner tensors After an oversized request streams the pinned denoiser groups, restoring them skipped every tensor whose wrapper already reported the onload device. A torchao int8 weight can report cuda after a streamed offload while its int8 data and scales sit on the host, so the restore left them there and the next request failed with a device mismatch (Qwen-Image-2.1 int8 at 12 or 16 GB, a 2400x1792 render followed by a 1024 render). _placed_on() judges a torchao subclass by its flattened inner tensors; plain tensors keep the device check. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: check torchao restore placement through the inner tensors in the test The new test read .qdata/.scale directly, which only exist on torchao's v2 Int8Tensor. On torchao 0.14 (the default for torch <= 2.9) int8 weights keep the v1 layout, so the test raised AttributeError instead of checking the restore. Walk __tensor_flatten__ recursively so both layouts are covered. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Etherll <[email protected]> (cherry picked from commit d883d2d)
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The red |
…request streams pinned groups (unslothai#12617) * Revert "Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies" (unslothai#12499) This reverts commit 9838541. It was merged before Codex review converged; it will be re-opened for review. * Revert "fix(studio): WSL2 Windows localhost hint in startup banner (unslothai#11187)" (unslothai#11361) This reverts commit cd4d5c1. It was merged before Codex review converged; it will be re-opened for review. * Revert "Studio: stop rejecting --mmproj-device CUDA1 when gpu_ids are saved" (unslothai#12505) This reverts commit a91ee37. It was merged before Codex review converged; it will be re-opened for review. * Revert "Studio: renew the chat-run lease while long prefill is still advancing" (unslothai#12523) This reverts commit d8740d3. It was merged before Codex review converged; it will be re-opened for review. * Revert "Count only the lock's own waits in the unlockable-filesystem row" (unslothai#12529) This reverts commit 5b78baf. It was merged before Codex review converged; it will be re-opened for review. * Revert "Studio: move torchao int8 weights back to the GPU after an oversized request streams pinned groups" (unslothai#12526) This reverts commit d883d2d. It was merged before Codex review converged; it will be re-opened for review. * Revert "Studio: use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5" (unslothai#12516) This reverts commit fd2522b. It was merged before Codex review converged; it will be re-opened for review. * Revert "Parity: keep the reap-margin check off the edge of its own window" (unslothai#12514) This reverts commit dae96ea. It was merged before Codex review converged; it will be re-opened for review. * Revert "Studio: train a dataset's system column as the system prompt" (unslothai#12486) This reverts commit ed6d0e8. It was merged before Codex review converged; it will be re-opened for review. * Revert "fix(studio): prevent IME confirmation from submitting chat renames" (unslothai#12475) This reverts commit 079dc91. It was merged before Codex review converged; it will be re-opened for review. * Studio: move torchao int8 weights back to the GPU after an oversized request streams pinned groups (unslothai#12526) * Studio: restore pinned torchao groups by their inner tensors After an oversized request streams the pinned denoiser groups, restoring them skipped every tensor whose wrapper already reported the onload device. A torchao int8 weight can report cuda after a streamed offload while its int8 data and scales sit on the host, so the restore left them there and the next request failed with a device mismatch (Qwen-Image-2.1 int8 at 12 or 16 GB, a 2400x1792 render followed by a 1024 render). _placed_on() judges a torchao subclass by its flattened inner tensors; plain tensors keep the device check. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: check torchao restore placement through the inner tensors in the test The new test read .qdata/.scale directly, which only exist on torchao's v2 Int8Tensor. On torchao 0.14 (the default for torch <= 2.9) int8 weights keep the v1 layout, so the test raised AttributeError instead of checking the restore. Walk __tensor_flatten__ recursively so both layouts are covered. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Etherll <[email protected]> (cherry picked from commit d883d2d) * Studio: move torchao int8 weights back to the GPU after an oversized request streams pinned groups (unslothai#12526) * Studio: restore pinned torchao groups by their inner tensors After an oversized request streams the pinned denoiser groups, restoring them skipped every tensor whose wrapper already reported the onload device. A torchao int8 weight can report cuda after a streamed offload while its int8 data and scales sit on the host, so the restore left them there and the next request failed with a device mismatch (Qwen-Image-2.1 int8 at 12 or 16 GB, a 2400x1792 render followed by a 1024 render). _placed_on() judges a torchao subclass by its flattened inner tensors; plain tensors keep the device check. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: check torchao restore placement through the inner tensors in the test The new test read .qdata/.scale directly, which only exist on torchao's v2 Int8Tensor. On torchao 0.14 (the default for torch <= 2.9) int8 weights keep the v1 layout, so the test raised AttributeError instead of checking the restore. Walk __tensor_flatten__ recursively so both layouts are covered. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Etherll <[email protected]> (cherry picked from commit d883d2d) * Tighten docstrings in torchao placement fix * State why the torchao placement test skips on unversioned configs * Drop duplicated test docstring --------- Co-authored-by: Etherl <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Re-opens #12526 for review. It was merged before its review converged and was reverted in #12569.
The change is the original squash commit, cherry-picked unchanged (
git cherry-pick -x d883d2d15), with authorship kept for @danielhanchen. The full description and discussion are on #12526.#12569 has merged, so this PR targets
mainand its diff shows only this change.