Skip to content

Studio: stop rejecting --mmproj-device CUDA1 when gpu_ids are saved - #12505

Merged
Etherll merged 2 commits into
unslothai:mainfrom
1fanwang:1fanwang/companion-widen-within-gpu-ids
Oct 2, 2026
Merged

Etherll merged 2 commits into
unslothai:mainfrom
1fanwang:1fanwang/companion-widen-within-gpu-ids

Conversation

@1fanwang

@1fanwang 1fanwang commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

With two GPUs selected in a model's saved settings, loading it with the projector on the second GPU (--mmproj-offload --mmproj-device CUDA1) fails with "invalid device: CUDA1" whenever the fit places the model on the first GPU alone. The same load works when no gpu_ids are saved, because only then does Studio widen the child's GPU mask to the companion device added in #11823.

An explicit gpu_ids list turned that widening off, so llama-server only saw the GPU the fit chose. This change keeps the widening and limits it to the GPUs in gpu_ids: a projector on a selected GPU becomes reachable, and a GPU the user left out stays hidden.

Fixes #12467

Testing Done

Two B300 GPUs, llama.cpp built with CUDA from master at ggml-org/llama.cpp@5fc4f3c, and the Studio backend from main at 38d48d3 with and without this change. load_12467_v2.py calls LlamaCppBackend.load_model on SmolVLM-256M-Instruct (Q8_0 GGUF plus its projector). The issue run passes the issue's settings, gpu_ids (0, 1) and extra args --mmproj-offload --mmproj-device CUDA1, then sends one image request; the control run passes neither. Paths in the logs are shown relative to the working directory. The runtime requirements came from a package mirror, with exact pins relaxed where the mirror lacked them (numpy 2.4.6, and cut_cross_entropy, diceware and ddgs left out; none is on this path).

Load main this PR
gpu_ids (0, 1) with --mmproj-device CUDA1 invalid device: CUDA1, load fails mask [0] widened to [0, 1], loads, image request answered
No gpu_ids or extra args loads on GPU 0 loads on GPU 0

Setup, on a host with two CUDA GPUs:

git clone https://github.com/unslothai/unsloth.git src
git -C src checkout 38d48d3e8ac3e7d1c5c9ef7cf732d897411f426a
cp -r src src-fix
git -C src-fix apply ../this-pr.diff  # the diff of this PR
pip install -r src/studio/backend/requirements/no-torch-runtime.txt -r src/studio/backend/requirements/studio.txt
git clone https://github.com/ggml-org/llama.cpp.git
git -C llama.cpp checkout 5fc4f3c8c7103ffd0b7ff5ee4855bcc78a3ed5cd
cmake -S llama.cpp -B llama.cpp/build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=103 -DLLAMA_CURL=OFF
cmake --build llama.cpp/build --target llama-server -j
mkdir model  # SmolVLM-256M-Instruct-Q8_0.gguf and its mmproj from ggml-org/SmolVLM-256M-Instruct-GGUF

main, issue settings:

$ LLAMA_SERVER_PATH=llama.cpp/build/bin/llama-server python load_12467_v2.py src issue
[info     ] GGUF size: 0.2 GB, mmproj: 0.1 GB, est. KV cache: 0.1 GB, context: 4096, GPUs free: [(0, 274114), (1, 274114)], selected: [0], --fit: off
[debug    ] [llama-server] error while handling argument "--mmproj-device": invalid device: CUDA1
[error    ] llama-server exited with code 1. Output (tail): error while handling argument "--mmproj-device": invalid device: CUDA1
load_model raised RuntimeError: llama-server rejected the value for '--mmproj-device': invalid device: CUDA1. Check it in this model's extra arguments, or reinstall llama.cpp if you did not set it.
mode=issue load_model returned False, is_loaded=False

This PR, issue settings (the lines starting with a pid are per-process GPU memory: the one llama-server process holds memory on both cards):

$ LLAMA_SERVER_PATH=llama.cpp/build/bin/llama-server python load_12467_v2.py src-fix issue
[info     ] GGUF size: 0.2 GB, mmproj: 0.1 GB, est. KV cache: 0.1 GB, context: 4096, GPUs free: [(0, 274114), (1, 274114)], selected: [0], --fit: off
[info     ] Companion device flags name GPUs by their unpinned numbering; fitted the pinned mask to them: [0] -> [0, 1]
[debug    ] [llama-server] 0.00.245.777 I cmn  common_param:   - CUDA0   : NVIDIA B300 SXM6 PC (274113 MiB, 273487 MiB free)
[debug    ] [llama-server] 0.00.428.846 I cmn  common_param:   - CUDA1   : NVIDIA B300 SXM6 PC (274113 MiB, 273487 MiB free)
[debug    ] [llama-server] 0.00.570.505 I srv    load_model: loaded multimodal model, '<work>/model/mmproj-SmolVLM-256M-Instruct-Q8_0.gguf'
[info     ] llama-server ready on port 40369 for model 'ggml-org/SmolVLM-256M-Instruct-GGUF'
mode=issue load_model returned True, is_loaded=True
4347, <GPU 0>, 928 MiB
4347, <GPU 1>, 736 MiB
0, <GPU 0>, 942 MiB
1, <GPU 1>, 750 MiB
POST /v1/chat/completions: 200 Red

This PR, control:

$ LLAMA_SERVER_PATH=llama.cpp/build/bin/llama-server python load_12467_v2.py src-fix control
[info     ] GGUF size: 0.2 GB, mmproj: 0.1 GB, est. KV cache: 0.1 GB, context: 4096, GPUs free: [(0, 274114), (1, 274114)], selected: [0], --fit: off
[debug    ] [llama-server] 0.00.198.655 I cmn  common_param:   - CUDA0   : NVIDIA B300 SXM6 PC (274113 MiB, 273487 MiB free)
[debug    ] [llama-server] 0.00.338.777 I srv    load_model: loaded multimodal model, '<work>/model/mmproj-SmolVLM-256M-Instruct-Q8_0.gguf'
[info     ] llama-server ready on port 51027 for model 'ggml-org/SmolVLM-256M-Instruct-GGUF'
mode=control load_model returned True, is_loaded=True
4832, <GPU 0>, 1050 MiB
0, <GPU 0>, 1064 MiB
1, <GPU 1>, 4 MiB
POST /v1/chat/completions: 200 Red
Reproducer source: load_12467_v2.py
import base64
import io
import logging
import subprocess
import sys

import httpx
from PIL import Image

tree, mode = sys.argv[1], sys.argv[2]
sys.path.insert(0, f"{tree}/studio/backend")
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(message)s", stream=sys.stdout)

from core.inference.llama_cpp import GgufLoadIntent, LlamaCppBackend

MODEL = "model"  # directory holding the two GGUF files
kwargs = {}
if mode == "issue":
    kwargs = {"gpu_ids": (0, 1), "extra_args": ("--mmproj-offload", "--mmproj-device", "CUDA1")}
backend = LlamaCppBackend()
intent = GgufLoadIntent(
    model_identifier="ggml-org/SmolVLM-256M-Instruct-GGUF",
    gguf_path=f"{MODEL}/SmolVLM-256M-Instruct-Q8_0.gguf",
    mmproj_path=f"{MODEL}/mmproj-SmolVLM-256M-Instruct-Q8_0.gguf",
    is_vision=True,
    **kwargs,
)
try:
    loaded = backend.load_model(intent)
except Exception as exc:
    loaded = False
    print(f"load_model raised {type(exc).__name__}: {exc}")
print(f"mode={mode} load_model returned {loaded}, is_loaded={backend.is_loaded}")
if backend.is_loaded:
    print(subprocess.run(["nvidia-smi", "--query-compute-apps=pid,gpu_uuid,used_memory", "--format=csv,noheader"], capture_output=True, text=True).stdout.strip())
    print(subprocess.run(["nvidia-smi", "--query-gpu=index,uuid,memory.used", "--format=csv,noheader"], capture_output=True, text=True).stdout.strip())
    buf = io.BytesIO()
    Image.new("RGB", (64, 64), (255, 0, 0)).save(buf, format="PNG")
    image_url = "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode()
    reply = httpx.post(
        f"{backend.base_url}/v1/chat/completions",
        json={
            "messages": [{"role": "user", "content": [
                {"type": "text", "text": "What color is this image? Answer in one word."},
                {"type": "image_url", "image_url": {"url": image_url}},
            ]}],
            "max_tokens": 8,
            "temperature": 0,
        },
        timeout=120,
    )
    print("POST /v1/chat/completions:", reply.status_code, reply.json()["choices"][0]["message"]["content"].strip() if reply.status_code == 200 else reply.text[:200])
    backend.unload_model()

An explicit gpu_ids selection turned off companion-device widening, so
when the fit pinned the model to one selected GPU, --mmproj-device CUDA1
still named a hidden card and llama-server rejected it. Widen onto cards
in gpu_ids and keep unselected cards out.

Fixes unslothai#12467

Signed-off-by: 1fanwang <[email protected]>
@danielhanchen

Copy link
Copy Markdown
Member

Confirmed that on main the companion-device widening in llama_cpp.py is turned off entirely whenever gpu_ids is saved, so a projector on a second selected GPU is rejected. Limiting the widening to the selected GPUs looks like the right fix, and we will get this reviewed.

@LeoBorcherding

Copy link
Copy Markdown
Collaborator

this happens on AMD too. RX 5700 XT + RX 6500 XT, Windows 11, ROCm llama-server b11160: with gpu_ids (0, 1) and --mmproj-device ROCm1, base fails with invalid device: ROCm1, same as the CUDA report. at aa654c9 the mask widens ([0] -> [0, 1]) and the flag is accepted. the full load then stops on this box because the 5700 XT (gfx1010) has no kernels in this llama.cpp build, which is unrelated to the PR, so the two-GPU success is still only covered by the B300 run. LeoBorcherding#102 (comment)

@Etherll

Etherll commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

A model with saved GPU selections and a projector on the second selected GPU now loads instead of failing with invalid device.

What changed

  • With gpu_ids saved, the GPU mask never widened to the GPU named by --mmproj-device, so when the fit picked only the first GPU, llama-server could not see the projector GPU and refused the flag. The mask now widens onto GPUs inside gpu_ids; a GPU outside the selection stays hidden.
  • The GPU list Studio reported after that widening still omitted the projector GPU, so reloads from it (a respawn, or a rollback after a failed model switch) failed again, and deselecting that GPU did not reload. A follow-up commit (199269e) now records the widened list, so those reloads keep the projector GPU and deselecting it reloads.

On two GPUs with llama.cpp b11160 and SmolVLM-256M plus its projector, base (38d48d3) failed with invalid device. Head (199269e) loaded with the projector on the requested GPU, answered an image request, and loaded again after the reported GPU list was sent back; at aa654c9 that reload failed with invalid device. With the parent's visible GPUs reversed, base put the projector on the main GPU and head put it on the requested one. A projector on an unselected GPU is still rejected, loads without saved GPUs are unchanged, and CPU-only loads work. GPU placement and companion-device unit tests match base apart from the new tests. AMD, Windows and macOS were not tested here.

CI: fork CI is still running in Etherll#134; this comment will be updated with the result. Status: pending CI.

With gpu_ids saved and the fit choosing fewer GPUs, the mask now widens onto a
companion card inside gpu_ids, but the effective pin was recorded before that.
/status echoed the narrower pin, a request carrying it matched the loaded model
and became the stored intent, and a respawn or rollback replaying it reloaded
without the projector's GPU ("invalid device" again). Deselecting that GPU was
also treated as already loaded. Record the widened mask once it is applied.
@Etherll
Etherll merged commit a91ee37 into unslothai:main Oct 2, 2026
Etherll added a commit that referenced this pull request Oct 2, 2026
… saved" (#12505)

This reverts commit a91ee37. It was merged before Codex review converged; it will be re-opened for review.
Stanley00 pushed a commit to stanley-fork/unsloth that referenced this pull request Oct 3, 2026
Reverts PRs that were merged before their review converged, newest first.
They are re-opened as new PRs for review.

- unslothai#12499 (lift a carried model picker row like a sidebar chat, and lighten both drag copies), with its follow-up unslothai#12562 (make carried rows a faintly frosted, darker copy)
- unslothai#11361 (WSL2 Windows localhost hint in startup banner)
- unslothai#12505 (stop rejecting --mmproj-device CUDA1 when gpu_ids are saved)
- unslothai#12523 (renew the chat-run lease while long prefill is still advancing)
- unslothai#12529 (count only the lock's own waits in the unlockable-filesystem row)
- unslothai#12526 (move torchao int8 weights back to the GPU after an oversized request streams pinned groups)
- unslothai#12516 (use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5)
- unslothai#12514 (keep the reap-margin check off the edge of its own window)
- unslothai#12486 (train a dataset's system column as the system prompt)
- unslothai#12475 (prevent IME confirmation from submitting chat renames)
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…slothai#12615)

* 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.

* Parity: keep the reap-margin check off the edge of its own window (unslothai#12514)

The row sleeps the first child for 3000 ms of a 2 x 4000 ms deadline and
asserts the CUDA-only child's bound lands in [2000, 3000] ms. The expected
value is 3000 minus the few ms spent around the sleep, which sits on the
window's upper edge, so a Start-Sleep that wakes one timer tick early on
Windows answers 3001 and fails a run that computed the bound correctly.
Sleep 3200 ms instead, so the expected bound is about 2800 ms with margin
on both sides, and print the bound in the row's name so the next failure
says what it saw.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit dae96ea)

* Parity: keep the reap-margin check off the edge of its own window (unslothai#12514)

The row sleeps the first child for 3000 ms of a 2 x 4000 ms deadline and
asserts the CUDA-only child's bound lands in [2000, 3000] ms. The expected
value is 3000 minus the few ms spent around the sleep, which sits on the
window's upper edge, so a Start-Sleep that wakes one timer tick early on
Windows answers 3001 and fails a run that computed the bound correctly.
Sleep 3200 ms instead, so the expected bound is about 2800 ms with margin
on both sides, and print the bound in the row's name so the next failure
says what it saw.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit dae96ea)

* Tighten timeout test comment

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Shubhankar Tripathy <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…lothai#12618)

* 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.

* Count only the lock's own waits in the unlockable-filesystem row (unslothai#12529)

The row patches time.sleep process-wide to prove _optional_top_up_lock does
not retry a mount that cannot lock. The lock waits on the calling thread,
but a background thread left by an earlier test in the same worker that
sleeps 50 ms during the window lands in the same list, and the row fails
with "waited on a filesystem that cannot lock: [0.05]" for a wait the lock
never made. Record sleeps from the test's thread only, hand other threads
the real sleep so they keep their pacing, and print what was recorded.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 5b78baf)

* Count only the lock's own waits in the unlockable-filesystem row (unslothai#12529)

The row patches time.sleep process-wide to prove _optional_top_up_lock does
not retry a mount that cannot lock. The lock waits on the calling thread,
but a background thread left by an earlier test in the same worker that
sleeps 50 ms during the window lands in the same list, and the row fails
with "waited on a filesystem that cannot lock: [0.05]" for a wait the lock
never made. Record sleeps from the test's thread only, hand other threads
the real sleep so they keep their pacing, and print what was recorded.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 5b78baf)

* Tighten test comment

* Ignore stray background threads' flock calls in the unlockable-filesystem row

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Shubhankar Tripathy <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…ten both drag copies (unslothai#12622)

* 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: lift a carried model picker row like a sidebar chat, and lighten both drag copies (unslothai#12499)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies

Dragging a Pinned model in the model picker only dimmed the row. It now lifts
a copy that follows the pointer, with the drop line redrawn above it and a
short settle into the new slot, through the same helpers the sidebar uses.
Every tab (Chat, Images, Audio, Video) draws its picker with HubModelPicker,
so all of them get it.

The carried copy in both lists is now a translucent shade off the list it came
from, with a light blur, instead of a solid hover-colored pill.

* Studio: keep a carried Connected or fine-tuned row on its own pill

A Connected row's ml-4 carried into the copy and pushed it 16px off the pill it was sized to,
and a fine-tuned row lifted its plain keyed wrapper, so the copy came out square with the
selected shell's highlight inside. Drop the margin on the copy and lift the marked pill.

---------

Co-authored-by: Etherll <[email protected]>
(cherry picked from commit 9838541)

* Studio: make carried rows a faintly frosted, darker copy (unslothai#12562)

A carried sidebar chat, sidebar section header, or model picker Pinned row
now reads as a see-through pill a shade darker than its list in both
themes, with a faint blur and a fainter hairline. The section header copy
gets the same pill; it had no surface before.

(cherry picked from commit 3ebc7bf)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies (unslothai#12499)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies

Dragging a Pinned model in the model picker only dimmed the row. It now lifts
a copy that follows the pointer, with the drop line redrawn above it and a
short settle into the new slot, through the same helpers the sidebar uses.
Every tab (Chat, Images, Audio, Video) draws its picker with HubModelPicker,
so all of them get it.

The carried copy in both lists is now a translucent shade off the list it came
from, with a light blur, instead of a solid hover-colored pill.

* Studio: keep a carried Connected or fine-tuned row on its own pill

A Connected row's ml-4 carried into the copy and pushed it 16px off the pill it was sized to,
and a fine-tuned row lifted its plain keyed wrapper, so the copy came out square with the
selected shell's highlight inside. Drop the margin on the copy and lift the marked pill.

---------

Co-authored-by: Etherll <[email protected]>
(cherry picked from commit 9838541)

* Studio: make carried rows a faintly frosted, darker copy (unslothai#12562)

A carried sidebar chat, sidebar section header, or model picker Pinned row
now reads as a see-through pill a shade darker than its list in both
themes, with a faint blur and a fainter hairline. The section header copy
gets the same pill; it had no surface before.

(cherry picked from commit 3ebc7bf)

* Trim comments in pinned row drag preview

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Michael Han <[email protected]>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…ai#12614)

* 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: train a dataset's system column as the system prompt (unslothai#12486)

* Train a dataset's system column as the system prompt

* Keep rows trainable when the system column cannot be rendered

Templates that reject a system role (codegemma's own template, for
one) now train the conversation without the column instead of
dropping every row that has one. The system turn is also added per row
inside the existing error handling, so a malformed row is dropped on
its own rather than failing the whole dataset.

---------

Co-authored-by: Etherl <[email protected]>
(cherry picked from commit ed6d0e8)

* Studio: train a dataset's system column as the system prompt (unslothai#12486)

* Train a dataset's system column as the system prompt

* Keep rows trainable when the system column cannot be rendered

Templates that reject a system role (codegemma's own template, for
one) now train the conversation without the column instead of
dropping every row that has one. The system turn is also added per row
inside the existing error handling, so a malformed row is dropped on
its own rather than failing the whole dataset.

---------

Co-authored-by: Etherl <[email protected]>
(cherry picked from commit ed6d0e8)

* Studio: keep a dataset's system column when converting ChatML to Alpaca

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Nilay <[email protected]>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…nslothai#12620)

Re-lands unslothai#12505 (reverted in unslothai#12569). Limits companion-device mask widening to the GPUs in gpu_ids instead of disabling it, and records the widened pin for /status and dedupe. Fixes unslothai#12467.

Co-authored-by: Stefan Wang <[email protected]>
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 3, 2026
…nslothai#12613)

* 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.

* fix(studio): prevent IME confirmation from submitting chat renames (unslothai#12475)

* fix(studio): preserve chat rename during IME composition

* fix(studio): keep rename dialogs open when Escape dismisses an IME candidate

Radix's Dialog closes on Escape from a document capture listener, before
the input's onKeyDown guard runs. Prevent that close while composing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 079dc91)

* fix(studio): prevent IME confirmation from submitting chat renames (unslothai#12475)

* fix(studio): preserve chat rename during IME composition

* fix(studio): keep rename dialogs open when Escape dismisses an IME candidate

Radix's Dialog closes on Escape from a document capture listener, before
the input's onKeyDown guard runs. Prevent that close while composing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 079dc91)

* Trim comments in IME rename guard

* Let idle macOS Pinyin Enter through the rename IME guard

Track compositionstart/compositionend on the rename inputs and reuse
imeKeydownBlocksComposerSubmit, so a 229 Enter is only treated as IME owned
while a composition is open or just ended (WebKit bug 165004). An idle
Pinyin Enter (keyCode 229, isComposing false, unslothai#12137) saves the rename again.

* Reset rename IME state on focus and blur

A compositionend can go missing (WSL Chrome, macOS input-method switch),
which pinned the shared rename IME state open and swallowed later idle
Pinyin Enters. Focus changes always commit or cancel the composition, so
reset there, matching the composers.

* Clear rename IME timestamp on focus change and gate keyCode 13 candidate Enter

* Tighten IME rename guard comments

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Kei YAMAZAKI <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 3, 2026
…#11187) (unslothai#12621)

* 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.

* fix(studio): WSL2 Windows localhost hint in startup banner (unslothai#11187) (unslothai#11361)

* fix(studio): show WSL2 Windows localhost hint in startup banner

When Studio binds 0.0.0.0 under WSL2 NAT, LAN addresses are intentionally
not advertised. Add a banner line telling users to open localhost from the
Windows host (unslothai#11187).

* Simplify WSL2 banner hint gating and test the startup wiring

* Show the WSL2 localhost hint only in NAT mode

* Skip the WSL2 localhost hint inside containers

* Check the WSL mode before importing the container probe

_is_wsl_nat runs on every wildcard bind, so importing utils.paths.file_manager
up front broke the stubbed run module in tests/studio/install off WSL. Also
point LAN users at mirrored networking instead of telling them to avoid the
WSL IP, which does work from Windows, and cover a :: bind.

* Print the WSL2 hint where the reachability note goes

Under WSL NAT the "private/LAN address" note described WSL's own NAT address
as reachable on the network. Show the Windows localhost URL and the mirrored
networking tip in its place instead of as an extra block in the banner.

---------

Co-authored-by: Daniel Han <[email protected]>
Co-authored-by: Etherll <[email protected]>
(cherry picked from commit cd4d5c1)

* fix(studio): WSL2 Windows localhost hint in startup banner (unslothai#11187) (unslothai#11361)

* fix(studio): show WSL2 Windows localhost hint in startup banner

When Studio binds 0.0.0.0 under WSL2 NAT, LAN addresses are intentionally
not advertised. Add a banner line telling users to open localhost from the
Windows host (unslothai#11187).

* Simplify WSL2 banner hint gating and test the startup wiring

* Show the WSL2 localhost hint only in NAT mode

* Skip the WSL2 localhost hint inside containers

* Check the WSL mode before importing the container probe

_is_wsl_nat runs on every wildcard bind, so importing utils.paths.file_manager
up front broke the stubbed run module in tests/studio/install off WSL. Also
point LAN users at mirrored networking instead of telling them to avoid the
WSL IP, which does work from Windows, and cover a :: bind.

* Print the WSL2 hint where the reachability note goes

Under WSL NAT the "private/LAN address" note described WSL's own NAT address
as reachable on the network. Show the Windows localhost URL and the mirrored
networking tip in its place instead of as an extra block in the banner.

---------

Co-authored-by: Daniel Han <[email protected]>
Co-authored-by: Etherll <[email protected]>
(cherry picked from commit cd4d5c1)

* Trim comments in WSL hint changes

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Sourav Rajvi <[email protected]>
danielhanchen added a commit that referenced this pull request Oct 3, 2026
…e, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (#12616)

* Revert "Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies" (#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 (#11187)" (#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" (#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" (#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" (#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" (#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" (#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" (#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" (#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" (#12475)

This reverts commit 079dc91. It was merged before Codex review converged; it will be re-opened for review.

* Studio: use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (#12516)

* Match ComfyUI's FLUX.1 T5 prompt length (256 floor, real length, 512 cap)

diffusers pads every FLUX.1 T5 prompt to 512 tokens and runs T5 without an
attention mask, so the padding changes the embeddings and adds 256 joint
attention tokens per step. ComfyUI pads to 256 and otherwise keeps the real
length. Pass max_sequence_length = clamp(T5 length incl. EOS, 256, 512) per
chunk for flux.1 and flux.1-kontext, signature gated, never over an explicit
value; the negative prompt counts only when true CFG encodes it.

* Run Qwen-Image true CFG with an empty negative like ComfyUI

diffusers enables Qwen-Image true CFG only when a negative prompt is passed,
and Studio sends none when the box is blank, so the default guidance 4 never
applied CFG. ComfyUI encodes an empty negative and applies CFG. For
true_cfg_scale families with guidance above 1 and no negative, pass an empty
negative; an explicit negative and guidance <= 1 are unchanged.

* Image steps and guidance defaults follow ComfyUI's templates

Default (steps, guidance) per model now match ComfyUI's official template for
the same checkpoint: FLUX.1 dev / Kontext / Krea dev 20 steps (Krea dev at the
FLUX guidance default 3.5), FLUX.2 dev 20, FLUX.2 klein base 20 at CFG 5,
Qwen-Image-2.1 25, Qwen-Image-Edit 2511 40 at 4, Qwen-Image-2512 50 at 4,
Z-Image-Turbo 8, Z-Image base 25 at 3.0 (diffusers Z-Image guidance is
ComfyUI cfg - 1), SDXL 25. Backend and UI tables stay in sync; explicit
request values are untouched.

* Ideogram 4 defaults to ComfyUI's 20-step constant-guidance schedule

ComfyUI's Ideogram 4 template samples 20 steps at constant guidance 7 with
the logit-normal schedule at mu 0.5 / std 1.75. Default to 20 / 7 and pass
those schedule parameters whenever guidance is constant; an explicit 48
steps at 7 still runs the card's tapered schedule with the pipeline's own
mu / std.

* Video steps and guidance defaults follow ComfyUI's templates

ComfyUI's official templates sample Wan2.2-TI2V-5B at 20 steps / CFG 5,
Wan2.2-T2V-A14B at 20 steps / CFG 3.5 (Lightning LoRA off) and
HunyuanVideo-1.5 at 20 steps / CFG 6, against Studio's 50-step defaults.
Match them in the family defaults, the per-variant table (A14B now has its
own key ahead of the generic Wan one) and the UI table. Explicit values are
unchanged.

* Sample Qwen-Image, Z-Image, Wan2.2 and HunyuanVideo-1.5 at ComfyUI's shift

The shipped schedulers shift sigmas differently from ComfyUI's defaults for
the same models: Qwen-Image / Qwen-Image-Edit resolve a dynamic exponential
shift (about 2.0 at 1024 px) with a 0.02 terminal stretch against a constant
3.1, Z-Image base ships 6.0 against 3.0, Wan2.2 TI2V-5B / T2V-A14B ship 5.0 /
3.0 against 8 / 5, HunyuanVideo-1.5 480p / 720p ship 5.0 / 9.0 against 7.
Add a per-family comfy_flow_shift and rebuild the scheduler at load with that
static shift (no dynamic mu, no terminal stretch). Families without the field
keep their shipped scheduler.

* Ideogram 4: follow ComfyUI's Default preset and its CFG override

The template's scheduler widgets are stale: steps / mu / std come from the
'Default' preset (20 / 0.0 / 1.75), and a CFG override in the model path
drops guidance 7 to 3 over the sampling range 0.7 to 1.0, which on the
shift-1 flow model is sigma <= 0.3. Use mu 0.0 / std 1.75 and, at the
default guidance 7, pass a per-step guidance_schedule of 7 then 3 on exactly
the steps whose logit-normal sigma is <= 0.3 (last 3 of 20 at 1024^2).
Other guidance values stay constant; an explicit 48 / 7 keeps the card
taper.

* FLUX.1 T5: bucket prompts past 256 tokens to 512

Every distinct T5 length is a new denoiser shape. On the compiled default
path with CUDA graphs, exact lengths cost a 14 s recompile for the first
length past 256 and a 0.4 to 1 s graph capture for each further one, until
the 4-graph cap made later shapes (resolution changes included) run eager.
Keep ComfyUI's 256 for prompts up to 256 tokens and pad longer ones to 512,
the old behaviour: two shapes per resolution. This deviates from ComfyUI's
exact length for 257 to 512 token prompts only (unmasked padding changes
their embeddings slightly).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ideogram 4 defaults comment: mu 0.0 and the 7 to 3 guidance switch

* sd.cpp: map Z-Image's diffusers guidance to standard CFG

The shared Z-Image default is now diffusers' g = 3 (ComfyUI cfg 4), but sd-cli takes
--cfg-scale as standard CFG, so the native engine sampled Z-Image base at cfg 3.
Pass g + 1 for Z-Image; Turbo's 0 still turns CFG off.

---------

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 fd2522b)

* Studio: use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (#12516)

* Match ComfyUI's FLUX.1 T5 prompt length (256 floor, real length, 512 cap)

diffusers pads every FLUX.1 T5 prompt to 512 tokens and runs T5 without an
attention mask, so the padding changes the embeddings and adds 256 joint
attention tokens per step. ComfyUI pads to 256 and otherwise keeps the real
length. Pass max_sequence_length = clamp(T5 length incl. EOS, 256, 512) per
chunk for flux.1 and flux.1-kontext, signature gated, never over an explicit
value; the negative prompt counts only when true CFG encodes it.

* Run Qwen-Image true CFG with an empty negative like ComfyUI

diffusers enables Qwen-Image true CFG only when a negative prompt is passed,
and Studio sends none when the box is blank, so the default guidance 4 never
applied CFG. ComfyUI encodes an empty negative and applies CFG. For
true_cfg_scale families with guidance above 1 and no negative, pass an empty
negative; an explicit negative and guidance <= 1 are unchanged.

* Image steps and guidance defaults follow ComfyUI's templates

Default (steps, guidance) per model now match ComfyUI's official template for
the same checkpoint: FLUX.1 dev / Kontext / Krea dev 20 steps (Krea dev at the
FLUX guidance default 3.5), FLUX.2 dev 20, FLUX.2 klein base 20 at CFG 5,
Qwen-Image-2.1 25, Qwen-Image-Edit 2511 40 at 4, Qwen-Image-2512 50 at 4,
Z-Image-Turbo 8, Z-Image base 25 at 3.0 (diffusers Z-Image guidance is
ComfyUI cfg - 1), SDXL 25. Backend and UI tables stay in sync; explicit
request values are untouched.

* Ideogram 4 defaults to ComfyUI's 20-step constant-guidance schedule

ComfyUI's Ideogram 4 template samples 20 steps at constant guidance 7 with
the logit-normal schedule at mu 0.5 / std 1.75. Default to 20 / 7 and pass
those schedule parameters whenever guidance is constant; an explicit 48
steps at 7 still runs the card's tapered schedule with the pipeline's own
mu / std.

* Video steps and guidance defaults follow ComfyUI's templates

ComfyUI's official templates sample Wan2.2-TI2V-5B at 20 steps / CFG 5,
Wan2.2-T2V-A14B at 20 steps / CFG 3.5 (Lightning LoRA off) and
HunyuanVideo-1.5 at 20 steps / CFG 6, against Studio's 50-step defaults.
Match them in the family defaults, the per-variant table (A14B now has its
own key ahead of the generic Wan one) and the UI table. Explicit values are
unchanged.

* Sample Qwen-Image, Z-Image, Wan2.2 and HunyuanVideo-1.5 at ComfyUI's shift

The shipped schedulers shift sigmas differently from ComfyUI's defaults for
the same models: Qwen-Image / Qwen-Image-Edit resolve a dynamic exponential
shift (about 2.0 at 1024 px) with a 0.02 terminal stretch against a constant
3.1, Z-Image base ships 6.0 against 3.0, Wan2.2 TI2V-5B / T2V-A14B ship 5.0 /
3.0 against 8 / 5, HunyuanVideo-1.5 480p / 720p ship 5.0 / 9.0 against 7.
Add a per-family comfy_flow_shift and rebuild the scheduler at load with that
static shift (no dynamic mu, no terminal stretch). Families without the field
keep their shipped scheduler.

* Ideogram 4: follow ComfyUI's Default preset and its CFG override

The template's scheduler widgets are stale: steps / mu / std come from the
'Default' preset (20 / 0.0 / 1.75), and a CFG override in the model path
drops guidance 7 to 3 over the sampling range 0.7 to 1.0, which on the
shift-1 flow model is sigma <= 0.3. Use mu 0.0 / std 1.75 and, at the
default guidance 7, pass a per-step guidance_schedule of 7 then 3 on exactly
the steps whose logit-normal sigma is <= 0.3 (last 3 of 20 at 1024^2).
Other guidance values stay constant; an explicit 48 / 7 keeps the card
taper.

* FLUX.1 T5: bucket prompts past 256 tokens to 512

Every distinct T5 length is a new denoiser shape. On the compiled default
path with CUDA graphs, exact lengths cost a 14 s recompile for the first
length past 256 and a 0.4 to 1 s graph capture for each further one, until
the 4-graph cap made later shapes (resolution changes included) run eager.
Keep ComfyUI's 256 for prompts up to 256 tokens and pad longer ones to 512,
the old behaviour: two shapes per resolution. This deviates from ComfyUI's
exact length for 257 to 512 token prompts only (unmasked padding changes
their embeddings slightly).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ideogram 4 defaults comment: mu 0.0 and the 7 to 3 guidance switch

* sd.cpp: map Z-Image's diffusers guidance to standard CFG

The shared Z-Image default is now diffusers' g = 3 (ComfyUI cfg 4), but sd-cli takes
--cfg-scale as standard CFG, so the native engine sampled Z-Image base at cfg 3.
Pass g + 1 for Z-Image; Turbo's 0 still turns CFG off.

---------

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 fd2522b)

* Tighten comments in ComfyUI parity changes

* Keep Qwen-Image-Edit-2509 on its ComfyUI template shift 3.0

* Studio: pick the Ideogram 4 ComfyUI preset by step count so 48 steps keeps std 1.5

* Trim comments in the ComfyUI defaults change

* Studio: keep Qwen-Image-Edit-2509 on its ComfyUI template defaults (20 steps, guidance 4)

* Drop a 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>
yermakoffivan pushed a commit to yermakoffivan/unsloth that referenced this pull request Oct 3, 2026
…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>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…nslothai#12505)

* Studio: widen companion devices within explicit gpu_ids

An explicit gpu_ids selection turned off companion-device widening, so
when the fit pinned the model to one selected GPU, --mmproj-device CUDA1
still named a hidden card and llama-server rejected it. Widen onto cards
in gpu_ids and keep unselected cards out.

Fixes unslothai#12467

Signed-off-by: 1fanwang <[email protected]>

* Studio: record the widened explicit pin as the effective GPU pin

With gpu_ids saved and the fit choosing fewer GPUs, the mask now widens onto a
companion card inside gpu_ids, but the effective pin was recorded before that.
/status echoed the narrower pin, a request carrying it matched the loaded model
and became the stored intent, and a respawn or rollback replaying it reloaded
without the projector's GPU ("invalid device" again). Deselecting that GPU was
also treated as already loaded. Record the widened mask once it is applied.

---------

Signed-off-by: 1fanwang <[email protected]>
Co-authored-by: Etherll <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
Reverts PRs that were merged before their review converged, newest first.
They are re-opened as new PRs for review.

- unslothai#12499 (lift a carried model picker row like a sidebar chat, and lighten both drag copies), with its follow-up unslothai#12562 (make carried rows a faintly frosted, darker copy)
- unslothai#11361 (WSL2 Windows localhost hint in startup banner)
- unslothai#12505 (stop rejecting --mmproj-device CUDA1 when gpu_ids are saved)
- unslothai#12523 (renew the chat-run lease while long prefill is still advancing)
- unslothai#12529 (count only the lock's own waits in the unlockable-filesystem row)
- unslothai#12526 (move torchao int8 weights back to the GPU after an oversized request streams pinned groups)
- unslothai#12516 (use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5)
- unslothai#12514 (keep the reap-margin check off the edge of its own window)
- unslothai#12486 (train a dataset's system column as the system prompt)
- unslothai#12475 (prevent IME confirmation from submitting chat renames)
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…slothai#12615)

* 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.

* Parity: keep the reap-margin check off the edge of its own window (unslothai#12514)

The row sleeps the first child for 3000 ms of a 2 x 4000 ms deadline and
asserts the CUDA-only child's bound lands in [2000, 3000] ms. The expected
value is 3000 minus the few ms spent around the sleep, which sits on the
window's upper edge, so a Start-Sleep that wakes one timer tick early on
Windows answers 3001 and fails a run that computed the bound correctly.
Sleep 3200 ms instead, so the expected bound is about 2800 ms with margin
on both sides, and print the bound in the row's name so the next failure
says what it saw.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit dae96ea)

* Parity: keep the reap-margin check off the edge of its own window (unslothai#12514)

The row sleeps the first child for 3000 ms of a 2 x 4000 ms deadline and
asserts the CUDA-only child's bound lands in [2000, 3000] ms. The expected
value is 3000 minus the few ms spent around the sleep, which sits on the
window's upper edge, so a Start-Sleep that wakes one timer tick early on
Windows answers 3001 and fails a run that computed the bound correctly.
Sleep 3200 ms instead, so the expected bound is about 2800 ms with margin
on both sides, and print the bound in the row's name so the next failure
says what it saw.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit dae96ea)

* Tighten timeout test comment

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Shubhankar Tripathy <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…lothai#12618)

* 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.

* Count only the lock's own waits in the unlockable-filesystem row (unslothai#12529)

The row patches time.sleep process-wide to prove _optional_top_up_lock does
not retry a mount that cannot lock. The lock waits on the calling thread,
but a background thread left by an earlier test in the same worker that
sleeps 50 ms during the window lands in the same list, and the row fails
with "waited on a filesystem that cannot lock: [0.05]" for a wait the lock
never made. Record sleeps from the test's thread only, hand other threads
the real sleep so they keep their pacing, and print what was recorded.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 5b78baf)

* Count only the lock's own waits in the unlockable-filesystem row (unslothai#12529)

The row patches time.sleep process-wide to prove _optional_top_up_lock does
not retry a mount that cannot lock. The lock waits on the calling thread,
but a background thread left by an earlier test in the same worker that
sleeps 50 ms during the window lands in the same list, and the row fails
with "waited on a filesystem that cannot lock: [0.05]" for a wait the lock
never made. Record sleeps from the test's thread only, hand other threads
the real sleep so they keep their pacing, and print what was recorded.

Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 5b78baf)

* Tighten test comment

* Ignore stray background threads' flock calls in the unlockable-filesystem row

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Shubhankar Tripathy <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…ten both drag copies (unslothai#12622)

* 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: lift a carried model picker row like a sidebar chat, and lighten both drag copies (unslothai#12499)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies

Dragging a Pinned model in the model picker only dimmed the row. It now lifts
a copy that follows the pointer, with the drop line redrawn above it and a
short settle into the new slot, through the same helpers the sidebar uses.
Every tab (Chat, Images, Audio, Video) draws its picker with HubModelPicker,
so all of them get it.

The carried copy in both lists is now a translucent shade off the list it came
from, with a light blur, instead of a solid hover-colored pill.

* Studio: keep a carried Connected or fine-tuned row on its own pill

A Connected row's ml-4 carried into the copy and pushed it 16px off the pill it was sized to,
and a fine-tuned row lifted its plain keyed wrapper, so the copy came out square with the
selected shell's highlight inside. Drop the margin on the copy and lift the marked pill.

---------

Co-authored-by: Etherll <[email protected]>
(cherry picked from commit 9838541)

* Studio: make carried rows a faintly frosted, darker copy (unslothai#12562)

A carried sidebar chat, sidebar section header, or model picker Pinned row
now reads as a see-through pill a shade darker than its list in both
themes, with a faint blur and a fainter hairline. The section header copy
gets the same pill; it had no surface before.

(cherry picked from commit 3ebc7bf)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies (unslothai#12499)

* Studio: lift a carried model picker row like a sidebar chat, and lighten both drag copies

Dragging a Pinned model in the model picker only dimmed the row. It now lifts
a copy that follows the pointer, with the drop line redrawn above it and a
short settle into the new slot, through the same helpers the sidebar uses.
Every tab (Chat, Images, Audio, Video) draws its picker with HubModelPicker,
so all of them get it.

The carried copy in both lists is now a translucent shade off the list it came
from, with a light blur, instead of a solid hover-colored pill.

* Studio: keep a carried Connected or fine-tuned row on its own pill

A Connected row's ml-4 carried into the copy and pushed it 16px off the pill it was sized to,
and a fine-tuned row lifted its plain keyed wrapper, so the copy came out square with the
selected shell's highlight inside. Drop the margin on the copy and lift the marked pill.

---------

Co-authored-by: Etherll <[email protected]>
(cherry picked from commit 9838541)

* Studio: make carried rows a faintly frosted, darker copy (unslothai#12562)

A carried sidebar chat, sidebar section header, or model picker Pinned row
now reads as a see-through pill a shade darker than its list in both
themes, with a faint blur and a fainter hairline. The section header copy
gets the same pill; it had no surface before.

(cherry picked from commit 3ebc7bf)

* Trim comments in pinned row drag preview

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Michael Han <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…ai#12614)

* 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: train a dataset's system column as the system prompt (unslothai#12486)

* Train a dataset's system column as the system prompt

* Keep rows trainable when the system column cannot be rendered

Templates that reject a system role (codegemma's own template, for
one) now train the conversation without the column instead of
dropping every row that has one. The system turn is also added per row
inside the existing error handling, so a malformed row is dropped on
its own rather than failing the whole dataset.

---------

Co-authored-by: Etherl <[email protected]>
(cherry picked from commit ed6d0e8)

* Studio: train a dataset's system column as the system prompt (unslothai#12486)

* Train a dataset's system column as the system prompt

* Keep rows trainable when the system column cannot be rendered

Templates that reject a system role (codegemma's own template, for
one) now train the conversation without the column instead of
dropping every row that has one. The system turn is also added per row
inside the existing error handling, so a malformed row is dropped on
its own rather than failing the whole dataset.

---------

Co-authored-by: Etherl <[email protected]>
(cherry picked from commit ed6d0e8)

* Studio: keep a dataset's system column when converting ChatML to Alpaca

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Nilay <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…nslothai#12620)

Re-lands unslothai#12505 (reverted in unslothai#12569). Limits companion-device mask widening to the GPUs in gpu_ids instead of disabling it, and records the widened pin for /status and dedupe. Fixes unslothai#12467.

Co-authored-by: Stefan Wang <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…nslothai#12613)

* 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.

* fix(studio): prevent IME confirmation from submitting chat renames (unslothai#12475)

* fix(studio): preserve chat rename during IME composition

* fix(studio): keep rename dialogs open when Escape dismisses an IME candidate

Radix's Dialog closes on Escape from a document capture listener, before
the input's onKeyDown guard runs. Prevent that close while composing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 079dc91)

* fix(studio): prevent IME confirmation from submitting chat renames (unslothai#12475)

* fix(studio): preserve chat rename during IME composition

* fix(studio): keep rename dialogs open when Escape dismisses an IME candidate

Radix's Dialog closes on Escape from a document capture listener, before
the input's onKeyDown guard runs. Prevent that close while composing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 079dc91)

* Trim comments in IME rename guard

* Let idle macOS Pinyin Enter through the rename IME guard

Track compositionstart/compositionend on the rename inputs and reuse
imeKeydownBlocksComposerSubmit, so a 229 Enter is only treated as IME owned
while a composition is open or just ended (WebKit bug 165004). An idle
Pinyin Enter (keyCode 229, isComposing false, unslothai#12137) saves the rename again.

* Reset rename IME state on focus and blur

A compositionend can go missing (WSL Chrome, macOS input-method switch),
which pinned the shared rename IME state open and swallowed later idle
Pinyin Enters. Focus changes always commit or cancel the composition, so
reset there, matching the composers.

* Clear rename IME timestamp on focus change and gate keyCode 13 candidate Enter

* Tighten IME rename guard comments

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Kei YAMAZAKI <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…#11187) (unslothai#12621)

* 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.

* fix(studio): WSL2 Windows localhost hint in startup banner (unslothai#11187) (unslothai#11361)

* fix(studio): show WSL2 Windows localhost hint in startup banner

When Studio binds 0.0.0.0 under WSL2 NAT, LAN addresses are intentionally
not advertised. Add a banner line telling users to open localhost from the
Windows host (unslothai#11187).

* Simplify WSL2 banner hint gating and test the startup wiring

* Show the WSL2 localhost hint only in NAT mode

* Skip the WSL2 localhost hint inside containers

* Check the WSL mode before importing the container probe

_is_wsl_nat runs on every wildcard bind, so importing utils.paths.file_manager
up front broke the stubbed run module in tests/studio/install off WSL. Also
point LAN users at mirrored networking instead of telling them to avoid the
WSL IP, which does work from Windows, and cover a :: bind.

* Print the WSL2 hint where the reachability note goes

Under WSL NAT the "private/LAN address" note described WSL's own NAT address
as reachable on the network. Show the Windows localhost URL and the mirrored
networking tip in its place instead of as an extra block in the banner.

---------

Co-authored-by: Daniel Han <[email protected]>
Co-authored-by: Etherll <[email protected]>
(cherry picked from commit cd4d5c1)

* fix(studio): WSL2 Windows localhost hint in startup banner (unslothai#11187) (unslothai#11361)

* fix(studio): show WSL2 Windows localhost hint in startup banner

When Studio binds 0.0.0.0 under WSL2 NAT, LAN addresses are intentionally
not advertised. Add a banner line telling users to open localhost from the
Windows host (unslothai#11187).

* Simplify WSL2 banner hint gating and test the startup wiring

* Show the WSL2 localhost hint only in NAT mode

* Skip the WSL2 localhost hint inside containers

* Check the WSL mode before importing the container probe

_is_wsl_nat runs on every wildcard bind, so importing utils.paths.file_manager
up front broke the stubbed run module in tests/studio/install off WSL. Also
point LAN users at mirrored networking instead of telling them to avoid the
WSL IP, which does work from Windows, and cover a :: bind.

* Print the WSL2 hint where the reachability note goes

Under WSL NAT the "private/LAN address" note described WSL's own NAT address
as reachable on the network. Show the Windows localhost URL and the mirrored
networking tip in its place instead of as an extra block in the banner.

---------

Co-authored-by: Daniel Han <[email protected]>
Co-authored-by: Etherll <[email protected]>
(cherry picked from commit cd4d5c1)

* Trim comments in WSL hint changes

---------

Co-authored-by: Etherl <[email protected]>
Co-authored-by: Sourav Rajvi <[email protected]>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…e, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (unslothai#12616)

* 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: use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (unslothai#12516)

* Match ComfyUI's FLUX.1 T5 prompt length (256 floor, real length, 512 cap)

diffusers pads every FLUX.1 T5 prompt to 512 tokens and runs T5 without an
attention mask, so the padding changes the embeddings and adds 256 joint
attention tokens per step. ComfyUI pads to 256 and otherwise keeps the real
length. Pass max_sequence_length = clamp(T5 length incl. EOS, 256, 512) per
chunk for flux.1 and flux.1-kontext, signature gated, never over an explicit
value; the negative prompt counts only when true CFG encodes it.

* Run Qwen-Image true CFG with an empty negative like ComfyUI

diffusers enables Qwen-Image true CFG only when a negative prompt is passed,
and Studio sends none when the box is blank, so the default guidance 4 never
applied CFG. ComfyUI encodes an empty negative and applies CFG. For
true_cfg_scale families with guidance above 1 and no negative, pass an empty
negative; an explicit negative and guidance <= 1 are unchanged.

* Image steps and guidance defaults follow ComfyUI's templates

Default (steps, guidance) per model now match ComfyUI's official template for
the same checkpoint: FLUX.1 dev / Kontext / Krea dev 20 steps (Krea dev at the
FLUX guidance default 3.5), FLUX.2 dev 20, FLUX.2 klein base 20 at CFG 5,
Qwen-Image-2.1 25, Qwen-Image-Edit 2511 40 at 4, Qwen-Image-2512 50 at 4,
Z-Image-Turbo 8, Z-Image base 25 at 3.0 (diffusers Z-Image guidance is
ComfyUI cfg - 1), SDXL 25. Backend and UI tables stay in sync; explicit
request values are untouched.

* Ideogram 4 defaults to ComfyUI's 20-step constant-guidance schedule

ComfyUI's Ideogram 4 template samples 20 steps at constant guidance 7 with
the logit-normal schedule at mu 0.5 / std 1.75. Default to 20 / 7 and pass
those schedule parameters whenever guidance is constant; an explicit 48
steps at 7 still runs the card's tapered schedule with the pipeline's own
mu / std.

* Video steps and guidance defaults follow ComfyUI's templates

ComfyUI's official templates sample Wan2.2-TI2V-5B at 20 steps / CFG 5,
Wan2.2-T2V-A14B at 20 steps / CFG 3.5 (Lightning LoRA off) and
HunyuanVideo-1.5 at 20 steps / CFG 6, against Studio's 50-step defaults.
Match them in the family defaults, the per-variant table (A14B now has its
own key ahead of the generic Wan one) and the UI table. Explicit values are
unchanged.

* Sample Qwen-Image, Z-Image, Wan2.2 and HunyuanVideo-1.5 at ComfyUI's shift

The shipped schedulers shift sigmas differently from ComfyUI's defaults for
the same models: Qwen-Image / Qwen-Image-Edit resolve a dynamic exponential
shift (about 2.0 at 1024 px) with a 0.02 terminal stretch against a constant
3.1, Z-Image base ships 6.0 against 3.0, Wan2.2 TI2V-5B / T2V-A14B ship 5.0 /
3.0 against 8 / 5, HunyuanVideo-1.5 480p / 720p ship 5.0 / 9.0 against 7.
Add a per-family comfy_flow_shift and rebuild the scheduler at load with that
static shift (no dynamic mu, no terminal stretch). Families without the field
keep their shipped scheduler.

* Ideogram 4: follow ComfyUI's Default preset and its CFG override

The template's scheduler widgets are stale: steps / mu / std come from the
'Default' preset (20 / 0.0 / 1.75), and a CFG override in the model path
drops guidance 7 to 3 over the sampling range 0.7 to 1.0, which on the
shift-1 flow model is sigma <= 0.3. Use mu 0.0 / std 1.75 and, at the
default guidance 7, pass a per-step guidance_schedule of 7 then 3 on exactly
the steps whose logit-normal sigma is <= 0.3 (last 3 of 20 at 1024^2).
Other guidance values stay constant; an explicit 48 / 7 keeps the card
taper.

* FLUX.1 T5: bucket prompts past 256 tokens to 512

Every distinct T5 length is a new denoiser shape. On the compiled default
path with CUDA graphs, exact lengths cost a 14 s recompile for the first
length past 256 and a 0.4 to 1 s graph capture for each further one, until
the 4-graph cap made later shapes (resolution changes included) run eager.
Keep ComfyUI's 256 for prompts up to 256 tokens and pad longer ones to 512,
the old behaviour: two shapes per resolution. This deviates from ComfyUI's
exact length for 257 to 512 token prompts only (unmasked padding changes
their embeddings slightly).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ideogram 4 defaults comment: mu 0.0 and the 7 to 3 guidance switch

* sd.cpp: map Z-Image's diffusers guidance to standard CFG

The shared Z-Image default is now diffusers' g = 3 (ComfyUI cfg 4), but sd-cli takes
--cfg-scale as standard CFG, so the native engine sampled Z-Image base at cfg 3.
Pass g + 1 for Z-Image; Turbo's 0 still turns CFG off.

---------

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 fd2522b)

* Studio: use ComfyUI's default settings for FLUX.1, Qwen-Image, Z-Image, Ideogram 4, Wan2.2 and HunyuanVideo-1.5 (unslothai#12516)

* Match ComfyUI's FLUX.1 T5 prompt length (256 floor, real length, 512 cap)

diffusers pads every FLUX.1 T5 prompt to 512 tokens and runs T5 without an
attention mask, so the padding changes the embeddings and adds 256 joint
attention tokens per step. ComfyUI pads to 256 and otherwise keeps the real
length. Pass max_sequence_length = clamp(T5 length incl. EOS, 256, 512) per
chunk for flux.1 and flux.1-kontext, signature gated, never over an explicit
value; the negative prompt counts only when true CFG encodes it.

* Run Qwen-Image true CFG with an empty negative like ComfyUI

diffusers enables Qwen-Image true CFG only when a negative prompt is passed,
and Studio sends none when the box is blank, so the default guidance 4 never
applied CFG. ComfyUI encodes an empty negative and applies CFG. For
true_cfg_scale families with guidance above 1 and no negative, pass an empty
negative; an explicit negative and guidance <= 1 are unchanged.

* Image steps and guidance defaults follow ComfyUI's templates

Default (steps, guidance) per model now match ComfyUI's official template for
the same checkpoint: FLUX.1 dev / Kontext / Krea dev 20 steps (Krea dev at the
FLUX guidance default 3.5), FLUX.2 dev 20, FLUX.2 klein base 20 at CFG 5,
Qwen-Image-2.1 25, Qwen-Image-Edit 2511 40 at 4, Qwen-Image-2512 50 at 4,
Z-Image-Turbo 8, Z-Image base 25 at 3.0 (diffusers Z-Image guidance is
ComfyUI cfg - 1), SDXL 25. Backend and UI tables stay in sync; explicit
request values are untouched.

* Ideogram 4 defaults to ComfyUI's 20-step constant-guidance schedule

ComfyUI's Ideogram 4 template samples 20 steps at constant guidance 7 with
the logit-normal schedule at mu 0.5 / std 1.75. Default to 20 / 7 and pass
those schedule parameters whenever guidance is constant; an explicit 48
steps at 7 still runs the card's tapered schedule with the pipeline's own
mu / std.

* Video steps and guidance defaults follow ComfyUI's templates

ComfyUI's official templates sample Wan2.2-TI2V-5B at 20 steps / CFG 5,
Wan2.2-T2V-A14B at 20 steps / CFG 3.5 (Lightning LoRA off) and
HunyuanVideo-1.5 at 20 steps / CFG 6, against Studio's 50-step defaults.
Match them in the family defaults, the per-variant table (A14B now has its
own key ahead of the generic Wan one) and the UI table. Explicit values are
unchanged.

* Sample Qwen-Image, Z-Image, Wan2.2 and HunyuanVideo-1.5 at ComfyUI's shift

The shipped schedulers shift sigmas differently from ComfyUI's defaults for
the same models: Qwen-Image / Qwen-Image-Edit resolve a dynamic exponential
shift (about 2.0 at 1024 px) with a 0.02 terminal stretch against a constant
3.1, Z-Image base ships 6.0 against 3.0, Wan2.2 TI2V-5B / T2V-A14B ship 5.0 /
3.0 against 8 / 5, HunyuanVideo-1.5 480p / 720p ship 5.0 / 9.0 against 7.
Add a per-family comfy_flow_shift and rebuild the scheduler at load with that
static shift (no dynamic mu, no terminal stretch). Families without the field
keep their shipped scheduler.

* Ideogram 4: follow ComfyUI's Default preset and its CFG override

The template's scheduler widgets are stale: steps / mu / std come from the
'Default' preset (20 / 0.0 / 1.75), and a CFG override in the model path
drops guidance 7 to 3 over the sampling range 0.7 to 1.0, which on the
shift-1 flow model is sigma <= 0.3. Use mu 0.0 / std 1.75 and, at the
default guidance 7, pass a per-step guidance_schedule of 7 then 3 on exactly
the steps whose logit-normal sigma is <= 0.3 (last 3 of 20 at 1024^2).
Other guidance values stay constant; an explicit 48 / 7 keeps the card
taper.

* FLUX.1 T5: bucket prompts past 256 tokens to 512

Every distinct T5 length is a new denoiser shape. On the compiled default
path with CUDA graphs, exact lengths cost a 14 s recompile for the first
length past 256 and a 0.4 to 1 s graph capture for each further one, until
the 4-graph cap made later shapes (resolution changes included) run eager.
Keep ComfyUI's 256 for prompts up to 256 tokens and pad longer ones to 512,
the old behaviour: two shapes per resolution. This deviates from ComfyUI's
exact length for 257 to 512 token prompts only (unmasked padding changes
their embeddings slightly).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ideogram 4 defaults comment: mu 0.0 and the 7 to 3 guidance switch

* sd.cpp: map Z-Image's diffusers guidance to standard CFG

The shared Z-Image default is now diffusers' g = 3 (ComfyUI cfg 4), but sd-cli takes
--cfg-scale as standard CFG, so the native engine sampled Z-Image base at cfg 3.
Pass g + 1 for Z-Image; Turbo's 0 still turns CFG off.

---------

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 fd2522b)

* Tighten comments in ComfyUI parity changes

* Keep Qwen-Image-Edit-2509 on its ComfyUI template shift 3.0

* Studio: pick the Ideogram 4 ComfyUI preset by step count so 48 steps keeps std 1.5

* Trim comments in the ComfyUI defaults change

* Studio: keep Qwen-Image-Edit-2509 on its ComfyUI template defaults (20 steps, guidance 4)

* Drop a 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>
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Companion-device mask widening (#11823) is skipped when the model has saved gpu_ids, so --mmproj-device CUDA1 is still rejected

4 participants