unsloth/studio/frontend/src
Daniel Han 8772f81e75 Address Codex review findings on the image-workflows PR
Keep diffusion.py importable without torch: the compile/arch patch modules
import torch at module level, so import them lazily at their load/unload
call sites instead of at module load. This restores the torchless contract
so get_diffusion_backend() works on a CPU/native sd.cpp install.

Match family reject keywords and aliases as whole path/name segments, not
raw substrings, so an unrelated word like edited, edition, or kontextual no
longer misroutes or hides a valid base image model, while supported edit
families (Qwen-Image-Edit, FLUX Kontext) still resolve. Mirror the same
segment matching in the picker task filter.

Route FLUX.2-dev native guidance through --guidance like the other FLUX
families rather than --cfg-scale. Reject native upscale requests that have
no input image. Read image header dimensions and reject over-limit inputs
before decoding pixels, so a crafted small-payload image cannot spike
memory. Reject an upscale that would shrink the source below its input
size. Validate the model_kind against the filename extension before the
GPU handoff. Estimate a local diffusers pipeline's size from its on-disk
weights so auto memory planning does not skip offload and OOM. Report
workflows: [txt2img] from the native backend status so the Create tab
stays enabled for a loaded native model. Clamp the outpaint canvas to the
backend's 4096px decode limit.

Adds regression tests for segment matching and kind/extension validation.
2026-07-02 05:46:50 +00:00
..
app Merge remote-tracking branch 'origin/main' into image-generation 2026-07-01 10:47:21 +00:00
assets Studio: mascot images degrade gracefully instead of showing alt text (#6146) 2026-06-10 08:22:17 -07:00
components Address Codex review findings on the image-workflows PR 2026-07-02 05:46:50 +00:00
config Studio macOS: faster startup, MLX self-heal, drop obsolete prebuilt pins (#6494) 2026-06-22 02:20:08 -07:00
features Address Codex review findings on the image-workflows PR 2026-07-02 05:46:50 +00:00
hooks Speed up Studio desktop startup (#6742) 2026-06-29 15:27:39 +02:00
i18n Merge remote-tracking branch 'origin/main' into image-generation 2026-07-02 02:36:18 +00:00
lib Chat: match reasoning thinking icon to the composer bulb (#6607) 2026-06-23 05:16:39 -07:00
shared studio/frontend: make toast and inline error text selectable and copyable (#5506) 2026-05-18 03:47:21 -07:00
stores Update license headers 2026-03-12 17:23:10 +00:00
types feat(studio): implement S3 dataset loading (completes #5951) (#6222) 2026-06-12 14:52:04 +02:00
utils Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
asset-queries.d.ts Studio: mascot images degrade gracefully instead of showing alt text (#6146) 2026-06-10 08:22:17 -07:00
index.css Studio: keep code block scrollbars off one-line code (#6474) 2026-06-22 05:04:03 -07:00
main.tsx Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
speech-recognition.d.ts studio: redesign chat composer (#5891) 2026-06-03 06:07:30 -07:00