unsloth/studio/backend/requirements
Daniel Han-Chen 7b5fe1cf10 Fix/adjust diffusion: round 25 P1 batch for PR #5754
Five P1 findings from round 25 reviewer aggregate.

1. routes/datasets.py: /download-progress now reuses the same
   identifier hardening that round 24 added to the model route.
   Token-shaped repo_ids like owner/hf_abcdefghij0123456789 used to
   pass the cheap _is_valid_repo_id regex and end up in warning logs.

2. routes/models.py: extend the llama.cpp cache-delete guard to
   path-ownership matching. A GGUF chat model loaded via a local HF
   snapshot path under models--owner--repo/snapshots used to slip
   past the owner/repo string compare and could be rmtree'd while
   llama-server still mmap'd it. Shares one fail-closed HF cache
   scan and an _owned_cache_path_matches helper with the
   safetensors and diffusion guards (round 25 also dedupes the
   diffusion-specific rescan).

3. routes/models.py: extend the safetensors cache-delete guard the
   same way for safetensors models loaded from local snapshot paths.

4. utils/datasets/llm_assist.py: _run_with_helper and
   _run_multi_pass_advisor now acquire the global llama backend via
   routes.inference.get_llama_cpp_backend instead of instantiating
   a private LlamaCppBackend. _gpu_workload_busy_for_helper already
   ensures the global backend is idle on entry, so this is safe, and
   it makes the helper/advisor load visible to the global delete
   guards (loading_model_identifier and friends).

5. requirements/studio.txt: bump huggingface-hub from 0.36.2 pin to
   1.3.0,<2.0 floor and mirror the no-torch-runtime.txt transformers
   and tokenizers constraints. Fresh installs from studio.txt used
   to resolve transformers 5.x with hub 0.36.2, which crashed
   Flux2KleinPipeline import on missing is_offline_mode the first
   time the user hit /api/inference/images/load.

Includes merge of origin/main (PR #5753 install pin bumps and the
mlx export save_method fix from #5727) so the PR diff stops showing
silent reverts of those landed changes.

Tests: PYTHONPATH=studio/backend pytest
test_diffusion_backend.py test_diffusion_routes.py
test_cached_gguf_routes.py test_llama_cpp_cache_aware_disk_check.py
test_inference_model_validation.py
test_models_get_model_config_case_resolution.py
==> 105 passed locally. The 15 flash-attention test failures and
the test_studio_api SDK suite errors reproduce on HEAD without
these changes (pre-existing, unrelated infrastructure).
2026-05-25 12:14:40 +00:00
..
single-env Studio: add github_repo seed reader and GitHub Support Bot recipe (#5169) 2026-04-24 12:02:03 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
base.txt move requirements/ to studio/backend/ and update paths in setup.sh 2026-02-17 19:02:25 +00:00
extras-no-deps.txt change torchcodec version to 0.10.0 in extra-no-deps (#5043) 2026-04-16 19:50:57 +04:00
extras.txt Fixing Qwen3.5 bug and adding Outetts dependencies (#4459) 2026-03-19 01:52:07 -07:00
no-torch-runtime.txt Fix/adjust diffusion: round 11 export-active defense-in-depth + state/path/gguf for PR #5754 2026-05-25 04:30:10 +00:00
overrides.txt fix: Windows installer fails on _yaml.pyd Access Denied (os error 5) (#4617) 2026-03-26 05:15:19 -07:00
studio.txt Fix/adjust diffusion: round 25 P1 batch for PR #5754 2026-05-25 12:14:40 +00:00
triton-kernels.txt move requirements/ to studio/backend/ and update paths in setup.sh 2026-02-17 19:02:25 +00:00