Merge image-generation bug fixes (#6872)
Fold PR #6872's image-generation fixes into the branch, deduped against the round-12 dataset-upload and gallery integrity work already on image-generation. Fixes carried forward from #6872: - fp8 single-file transformer memory estimate: an fp8 checkpoint loads with no quantization_config and diffusers upcasts it to bf16 (~2x resident), so budget it accordingly in _plan_memory and estimate_safetensors_dense_mib. - dense-quant OOM-evict preflight: when the GGUF fits resident but the dense bf16 transformer this path materializes does not, skip the fast path up front rather than evict the current pipeline and OOM in finalization. Combined with the existing offload->resident candidate re-plan so both the family-table estimate and the on-disk shard measurement gate engagement (unified on the transformer_resident_override_mib plan override). - ControlNet: evict the previous module and its from_pipe wrapper before loading a new one so swapping ControlNets within a base-model load cannot accumulate to OOM. - ControlNet union_control_mode: raise on an unknown control type instead of silently defaulting to canny. - edit-family mask rejection: raise instead of silently dropping a mask on an image-editing model that has no inpaint pipeline. - companion cache: walk the snapshot dir and exclude transformer/ so the dense-quant prefetch's cached shards do not inflate the companion total and wrongly force offload. - training: drop piecewise_constant from the LR scheduler enum and force bf16 for fp16-incompatible families. - dataset upload: batch-atomic staging with the same-stem duplicate guard. - images page: guard negative-prompt restore on guidance>0, clear stale ControlNet selection on restore, and revert an optimistic quant label when a pipeline load never starts. - uninstall (sh + ps1): keep the owner-marker guard on sd.cpp removal. Conflicts resolved in favour of image-generation's evolved memory system, loadSpecFor catalog, and stop-and-save (lora_path) run detection; #6872's fp8 and dense-preflight fixes carried forward on top. All affected backend tests pass (test_diffusion_backend, test_diffusion_training, test_diffusion_lora_trainer, test_video_gallery, test_diffusion_controlnet).
This commit is contained in:
commit
ffa8a56391
21 changed files with 733 additions and 124 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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue