Fix diffusion training validation, dataset upload atomicity, and LoRA error mapping
This commit is contained in:
parent
26a81c5e17
commit
e5c63cdfff
21 changed files with 428 additions and 71 deletions
|
|
@ -24,7 +24,7 @@ import numpy as np
|
|||
|
||||
BASE = "Tongyi-MAI/Z-Image-Turbo"
|
||||
PROMPT = "A cinematic photograph of a red fox in a snowy forest at dawn, highly detailed"
|
||||
OUT = Path("/mnt/disks/unslothai/ubuntu/workspace_81/outputs/quant_research/nvfp4_t211_images")
|
||||
OUT = Path(__file__).resolve().parent.parent / "outputs" / "quant_research" / "nvfp4_t211_images"
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------- diag
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import numpy as np
|
|||
|
||||
BASE = "Tongyi-MAI/Z-Image-Turbo"
|
||||
PROMPT = "A cinematic photograph of a red fox in a snowy forest at dawn, highly detailed"
|
||||
OUT = Path("/mnt/disks/unslothai/ubuntu/workspace_81/outputs/quant_research/sparse_images")
|
||||
OUT = Path(__file__).resolve().parent.parent / "outputs" / "quant_research" / "sparse_images"
|
||||
|
||||
|
||||
def _psnr(a, b):
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ function Uninstall-UnslothStudio {
|
|||
# 2. A loaded module under a target root (orphaned mp-fork python holding a
|
||||
# venv DLL). Scoped to names that load our DLLs to keep the scan fast.
|
||||
try {
|
||||
$cands = Get-Process -Name python, pythonw, unsloth, llama-server, llama-cli -ErrorAction SilentlyContinue
|
||||
$cands = Get-Process -Name python, pythonw, unsloth, llama-server, llama-cli, sd-cli, sd-server -ErrorAction SilentlyContinue
|
||||
foreach ($proc in $cands) {
|
||||
$hit = $false
|
||||
try {
|
||||
|
|
@ -366,7 +366,7 @@ function Uninstall-UnslothStudio {
|
|||
_StopStudioProcesses -KnownRoots $knownRoots
|
||||
# Also stop anything holding a handle on the exact paths we delete (llama-server,
|
||||
# the CLI shim, an mp-fork python with a venv DLL) so the dir delete isn't refused.
|
||||
_StopProcessesLockingRoots -Roots (@($knownRoots) + @($defaultDataDir, $defaultLlamaCpp, $defaultCache, $defaultNode))
|
||||
_StopProcessesLockingRoots -Roots (@($knownRoots) + @($defaultDataDir, $defaultLlamaCpp, $defaultSdCpp, $defaultCache, $defaultNode))
|
||||
|
||||
# ── Remove custom-root install trees ──
|
||||
_Step "Removing data and install directories..."
|
||||
|
|
@ -380,6 +380,9 @@ function Uninstall-UnslothStudio {
|
|||
continue
|
||||
}
|
||||
_RemovePath $r
|
||||
# The native diffusion sibling (<custom root>.parent\stable-diffusion.cpp) is
|
||||
# intentionally NOT removed: sd.cpp writes no owner marker and sits in the user's
|
||||
# own parent dir, so auto-deleting it could destroy a user-managed clone.
|
||||
}
|
||||
# Default install dir (always at %USERPROFILE%\.unsloth\studio when present).
|
||||
if ($defaultStudioHome) { _RemovePath $defaultStudioHome }
|
||||
|
|
|
|||
|
|
@ -217,8 +217,11 @@ _remove_path "$HOME/.unsloth/studio"
|
|||
# when absent. A user-set UNSLOTH_LLAMA_CPP_PATH is intentionally kept.
|
||||
_remove_path "$HOME/.unsloth/llama.cpp"
|
||||
# Default-mode native diffusion (stable-diffusion.cpp / sd-cli) build, a sibling of
|
||||
# studio like llama.cpp (install_sd_cpp_prebuilt.default_install_dir()). No-op in
|
||||
# env/custom mode and when absent. A user-set UNSLOTH_SD_CPP_PATH is kept.
|
||||
# studio like llama.cpp (install_sd_cpp_prebuilt.default_install_dir()). Only the default
|
||||
# location is removed. In env/custom mode the install is <custom root>.parent/
|
||||
# stable-diffusion.cpp, which is intentionally left in place: sd.cpp writes no owner
|
||||
# marker and sits in the user's own parent dir, so auto-deleting it could destroy a
|
||||
# user-managed stable-diffusion.cpp clone. A user-set UNSLOTH_SD_CPP_PATH is kept.
|
||||
_remove_path "$HOME/.unsloth/stable-diffusion.cpp"
|
||||
_remove_path "$HOME/.unsloth/.cache"
|
||||
# Isolated Node.js runtime (install_node_prebuilt.py), a sibling of studio in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue