unsloth/studio/backend/tests
Daniel Han e098ee52ea Add the HiDream-I1 family to the image backend
A 17B MoE DiT (16 double + 32 single layers, 4 routed experts) with four text
encoders, on HiDreamImagePipeline (diffusers 0.39). One family covers the open
Full / Dev / Fast repos (same arch); per-variant generation defaults follow the
upstream inference recipes (Full 50 steps at guidance 5, the distilled Dev 28
and Fast 16 guidance-free).

The repos name a Llama-3.1-8B text_encoder_4 in their model_index but do not
ship its weights; the official example passes the gated meta-llama repo in by
hand. The loader instead assembles the component from the open unsloth mirror
(byte-identical weights, already inside the non-GGUF trust gate), injected at
the three pipeline from_pretrained sites, with output_hidden_states matching
the official example. Memory planning counts the assembled TE4: 34.2 GB DiT +
28.8 GB encoders, ~63 GB bf16-resident.
2026-07-17 13:24:57 +00:00
..
__init__.py
conftest.py
test_amd_apu_unified_memory.py
test_anthropic_cache_ttl.py
test_anthropic_citations.py
test_anthropic_citations_edge.py
test_anthropic_code_execution.py
test_anthropic_compaction.py
test_anthropic_fast_mode_and_refusal.py
test_anthropic_fast_mode_edge.py
test_anthropic_messages.py Studio /v1/messages: accept thinking and unknown content blocks (#7017) 2026-07-09 12:20:02 +02:00
test_anthropic_thinking_translation.py
test_anthropic_tool_versions.py
test_anthropic_web_fetch.py
test_api_key_expiry.py
test_api_monitor.py
test_api_perf_serialization.py
test_apple_gpu_sensors.py
test_audio_token_detection.py
test_bootstrap_timeout.py
test_browse_folders_route.py
test_bypass_permissions.py
test_cache_case_resolution.py
test_cached_gguf_routes.py Studio: tighten image-generation fix comments and docstrings 2026-07-13 13:32:28 +00:00
test_capability_detection.py
test_chat_eos_template_refresh.py Studio: stop chat generation on the assistant-turn-end token (fixes Qwen3.5 loop) (#6804) 2026-07-06 10:07:56 -07:00
test_chat_history_routes.py Studio chat: tool-call nudging on by default (API stays opt-in) (#6883) 2026-07-06 19:41:19 -07:00
test_chat_history_storage.py Sort chat recents by last activity (#6844) 2026-07-07 17:54:32 +01:00
test_chat_load_during_training.py
test_chat_only_reason.py
test_chat_template_tool_arguments.py Studio: coerce tool_call arguments to dict before chat templating (fixes MLX tool follow-up error) (#6807) 2026-07-06 10:12:22 -07:00
test_chat_turn_end_eos.py Studio: stop chat generation on the assistant-turn-end token (fixes Qwen3.5 loop) (#6804) 2026-07-06 10:07:56 -07:00
test_checkpoints_scan.py
test_cleanup_cancelled_checkpoints.py
test_cloudflare_tunnel.py
test_coding_agents.py feat: detect installed coding agent CLIs in Studio settings (#6909) 2026-07-08 05:26:50 -07:00
test_completion_masking.py Studio: auto-detect completion masking markers, stop silent full-sequence training (#7054) 2026-07-11 05:13:45 -07:00
test_compute_buffer.py Studio: account for DeepSeek-V4 compute buffer in context auto-fit (#6940) 2026-07-07 07:20:31 -07:00
test_consent_gate.py
test_context_overflow_truncation.py
test_cpu_threads.py
test_data_recipe_github_progress.py
test_data_recipe_pump_resilience.py
test_data_recipe_seed.py Fix per-block ID collisions and add block cleanup for unstructured uploads (#6944) 2026-07-08 20:03:03 -07:00
test_datacenter_gpu_tuning.py
test_dataset_upload_limits.py
test_deepseek_v4_thinking_effort.py Add DeepSeek-V4-Flash-GGUF to Studio with none/high/max reasoning (#6908) 2026-07-07 06:13:43 -07:00
test_default_output_dir_name.py
test_desktop_auth.py Stub routes.preview in the desktop auth test so main imports order-independently 2026-07-04 17:07:47 +00:00
test_detect_mmproj_file.py
test_diffusion_arch_patches.py
test_diffusion_attention.py diffusion: address review round (FBCache context guard, aiter/ROCm, video cleanup, prequant + ControlNet gating) 2026-07-09 08:52:16 +00:00
test_diffusion_auto_policy.py Resolve pre-quantized checkpoints per base variant 2026-07-17 11:07:17 +00:00
test_diffusion_backend.py Add the Lumina Image 2.0 family to the image catalog 2026-07-17 11:07:17 +00:00
test_diffusion_base_precision.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-07-08 05:02:13 +00:00
test_diffusion_cache.py perf(image): compile numeric parity, cache-hook compile arming, FBCache toggle crash fix, TE fp8 zero-row guard 2026-07-10 16:07:46 +00:00
test_diffusion_compile_cache.py Warm-save the compile cache by default, compile U-Net denoisers whole-module 2026-07-11 06:18:29 +00:00
test_diffusion_controlnet.py Studio: preserve foreign gallery files, force safetensors on remote ControlNets, and close dataset/seed/GPU gaps 2026-07-13 10:02:42 +00:00
test_diffusion_dataset_api.py Studio: restore Reapply target on async image/video load errors; recheck training state before dataset commit; reclaim partial sd.cpp installs on retry 2026-07-13 15:27:46 +00:00
test_diffusion_device.py
test_diffusion_dit_trainer.py Add FLUX.2 Klein and FLUX.2-dev DiT LoRA training 2026-07-17 09:34:01 +00:00
test_diffusion_eager_patches.py
test_diffusion_engine_router.py Tighten comments and docstrings added by the image-generation fixes 2026-07-13 05:29:09 +00:00
test_diffusion_gguf_compile.py
test_diffusion_inference_info.py Advertise per-family footprints and surface Auto badges for resolved controls 2026-07-04 07:47:01 +00:00
test_diffusion_krea2.py diffusion: add AGPL-3.0 SPDX header to Krea2 / LoRA / ControlNet files 2026-07-09 06:46:45 +00:00
test_diffusion_lora.py Support LoRA adapters on torchao int8/fp8 quantized image pipelines 2026-07-17 09:37:17 +00:00
test_diffusion_lora_trainer.py Add FLUX.2 Klein and FLUX.2-dev DiT LoRA training 2026-07-17 09:34:01 +00:00
test_diffusion_memory.py Harden the diffusion memory plan against transient free-VRAM undercounts 2026-07-17 08:46:12 +00:00
test_diffusion_more_families.py Add the HiDream-I1 family to the image backend 2026-07-17 13:24:57 +00:00
test_diffusion_precision.py perf(image): compile numeric parity, cache-hook compile arming, FBCache toggle crash fix, TE fp8 zero-row guard 2026-07-10 16:07:46 +00:00
test_diffusion_prequant.py Resolve pre-quantized checkpoints per base variant 2026-07-17 11:07:17 +00:00
test_diffusion_routes.py Studio: gate gallery serve/export on ownership; keep image progress active until persisted; reserve diffusion training before the dataset scan 2026-07-13 14:40:18 +00:00
test_diffusion_sdxl.py
test_diffusion_speed.py Warm-save the compile cache by default, compile U-Net denoisers whole-module 2026-07-11 06:18:29 +00:00
test_diffusion_train_perf.py Merge branch 'diffusion-train-perf' into diffusion-train-precision 2026-07-05 07:56:14 +00:00
test_diffusion_training.py Studio: gate gallery serve/export on ownership; keep image progress active until persisted; reserve diffusion training before the dataset scan 2026-07-13 14:40:18 +00:00
test_diffusion_transformer_quant.py Keep Qwen-Image's text-stream linears bf16 on int8 (short prompts break torch._int_mm) 2026-07-17 07:16:23 +00:00
test_embedding_model_security_gate.py Run the malware gate on the RAG embedding model before it loads (#6887) 2026-07-07 04:30:21 -07:00
test_embedding_model_settings.py
test_exec_utf8.py
test_export_absolute_paths.py
test_export_capability.py
test_export_imatrix_compressed.py
test_export_log_cursor.py
test_export_size_estimate.py
test_external_provider_proxy_env.py
test_external_provider_usage_chunk.py
test_file_security.py
test_frontend_resolution.py
test_gemini_provider.py
test_gemma4_chat_template_override.py
test_gemma_tool_parse_edge_cases.py Studio: parse Mistral [TOOL_CALLS] and rehearsal tool-call shapes (#5704) 2026-07-06 18:52:13 -07:00
test_gguf_completion_usage.py
test_gguf_metadata.py
test_gguf_reload_inheritance.py
test_gguf_route_cursor_reset.py
test_gguf_routing.py
test_gguf_tool_non_streaming.py
test_gguf_xet_fallback_integration.py
test_gpu_arbiter.py Studio: tighten image-generation fix comments and docstrings 2026-07-13 13:32:28 +00:00
test_gpu_selection.py Studio: apply ruff-format kwarg spacing to the diffusion review changes 2026-07-07 05:53:48 +00:00
test_gpu_selection_sandbox.py
test_hf_xet_fallback.py Studio: don't pin transformers before the training worker activates the 5.x sidecar (#6968) 2026-07-08 05:33:16 -07:00
test_host_defaults.py
test_identity.py
test_image_gallery.py Studio: gate gallery serve/export on ownership; keep image progress active until persisted; reserve diffusion training before the dataset scan 2026-07-13 14:40:18 +00:00
test_index_bootstrap_origin.py
test_index_bootstrap_origin_extra.py
test_inference_default_models_non_blocking.py Speed up Studio startup path (#6899) 2026-07-07 18:08:07 -07:00
test_inference_dispatcher_resilience.py Studio: harden OpenAI-compatible GGUF streaming (#6950) 2026-07-09 12:09:08 -03:00
test_inference_model_validation.py
test_inference_orchestrator_crash_message.py
test_install_resolve_prebuilt.py Studio: detect Windows Intel GPUs via the registry before WMI (#7064) 2026-07-10 17:59:04 -03:00
test_kv_cache_estimation.py
test_lifespan_shutdown.py
test_linux_external_media_paths.py
test_llama_admission.py Studio: queue local GGUF OpenAI-compatible requests before llama-server (#7047) 2026-07-10 17:05:48 -03:00
test_llama_cpp_cache_aware_disk_check.py
test_llama_cpp_context_fit.py
test_llama_cpp_effective_parallel_slots.py Studio: queue local GGUF OpenAI-compatible requests before llama-server (#7047) 2026-07-10 17:05:48 -03:00
test_llama_cpp_freshness.py Studio: source CPU llama.cpp prebuilts from unslothai/llama.cpp (#6311) 2026-07-08 05:34:59 -07:00
test_llama_cpp_load_progress.py
test_llama_cpp_load_progress_live.py
test_llama_cpp_load_progress_matrix.py
test_llama_cpp_max_context_threshold.py
test_llama_cpp_mmproj_fallback.py
test_llama_cpp_mtp_detection.py
test_llama_cpp_no_context_shift.py
test_llama_cpp_props_readback.py
test_llama_cpp_start_failure_classification.py
test_llama_cpp_stream_cancel.py Studio: harden OpenAI-compatible GGUF streaming (#6950) 2026-07-09 12:09:08 -03:00
test_llama_cpp_tool_loop.py Studio: stream reasoning tokens in the tool-loop generator (fixes DeepSeek thinking not streaming with a pill on) (#6947) 2026-07-07 19:50:40 -03:00
test_llama_cpp_update.py Studio: add Vulkan llama.cpp support (#5819) 2026-07-09 03:39:48 -07:00
test_llama_cpp_vulkan_probe.py Studio: add Vulkan llama.cpp support (#5819) 2026-07-09 03:39:48 -07:00
test_llama_cpp_wait_for_health.py
test_llama_cpp_wait_for_vram_settle.py
test_llama_cpp_windows_nvidia_path.py
test_llama_route.py
test_llama_route_timeouts.py Studio: harden OpenAI-compatible GGUF streaming (#6950) 2026-07-09 12:09:08 -03:00
test_llama_server_args.py
test_llama_stats.py
test_llm_assist_startup_opt_in.py
test_load_progress_ready_fraction.py
test_local_llama_cpp_link.py
test_local_model_format.py Studio: tighten image-generation fix comments and docstrings 2026-07-13 13:32:28 +00:00
test_log_filter_no_truncation.py
test_logging_middleware.py
test_login_rate_limit.py
test_mcp_config_import.py
test_mcp_servers.py studio: tool calling for DeepSeek (R1/V3/V3.1), GLM 4.x, Kimi K2 on safetensors + MLX (#5624) 2026-07-06 15:40:46 -07:00
test_mcp_stdio_improvements.py
test_mcp_stdio_pr5863.py
test_message_content.py
test_middleware.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-07-10 08:07:50 +00:00
test_mlx_inference_backend.py feat(cli): support MLX distributed inference (#6845) 2026-07-08 03:25:39 -07:00
test_mlx_repair.py Studio: exclude mlx-lm 0.31.3 (broke gemma4/qwen3_5 QK-norm load on Apple Silicon) (#6803) 2026-07-06 19:40:06 -07:00
test_mlx_training_worker_config.py Add has_blackwell_gpu to the mlx worker test's wheel_utils stub (#6980) 2026-07-08 07:22:54 -07:00
test_mmproj_vram_accounting.py
test_model_defaults_none_guard.py
test_model_ids.py
test_model_update_robustness.py Auto Xet to HTTP download fallback in from_pretrained; share Studio's fallback via unsloth_zoo (#6638) 2026-07-06 05:13:25 -07:00
test_models_get_model_config_case_resolution.py
test_mtp_drafter_companion.py Studio: resolve the repo-root MTP drafter after the MTP/ GGUF rename (#7031) 2026-07-09 06:46:00 -07:00
test_mtp_mla_target_ctx.py
test_mtp_vram_budget.py
test_multimodal_document.py
test_namespace_shadow_guard_pr6269.py
test_native_context_length.py
test_native_template_trust_remote_code.py studio: tool calling for DeepSeek (R1/V3/V3.1), GLM 4.x, Kimi K2 on safetensors + MLX (#5624) 2026-07-06 15:40:46 -07:00
test_nudge_tool_calls_wiring.py Studio: keep the nudge wiring test collectable without the unsloth stack (#6924) 2026-07-06 21:57:56 -07:00
test_offline_gguf_cache_fallback.py Fix case-variant model matching and GGUF cache reuse in unsloth start (#6900) 2026-07-08 02:32:06 -07:00
test_offline_inference_parent.py
test_openai_auto_switch.py Studio: hint at Model auto-switch in the OpenAI "No model loaded" 400 (#7006) 2026-07-10 17:48:27 -03:00
test_openai_catalog.py
test_openai_citation_markers.py
test_openai_citation_markers_edge.py
test_openai_code_execution.py
test_openai_compaction.py
test_openai_container_crud.py
test_openai_image_generation.py
test_openai_images_generations_route.py
test_openai_models_path_leak.py
test_openai_responses_translation.py
test_openai_tool_passthrough.py Studio: queue local GGUF OpenAI-compatible requests before llama-server (#7047) 2026-07-10 17:05:48 -03:00
test_openai_tool_result_fallbacks.py
test_orchestrator_unload_cancel.py Studio: serialize the compare-mode dispatcher lifecycle to fix a start race (#6922) 2026-07-06 22:09:41 -07:00
test_passthrough_healing.py Studio: harden OpenAI-compatible GGUF streaming (#6950) 2026-07-09 12:09:08 -03:00
test_personalization_settings.py
test_pr5624_regressions.py studio: tool calling for DeepSeek (R1/V3/V3.1), GLM 4.x, Kimi K2 on safetensors + MLX (#5624) 2026-07-06 15:40:46 -07:00
test_presence_penalty.py Studio: apply presence_penalty on the safetensors and MLX inference paths (#6923) 2026-07-06 22:24:47 -07:00
test_preview.py
test_preview_followups.py
test_preview_routes.py
test_preview_sharing_settings.py
test_preview_token.py
test_pricing.py
test_pricing_edge.py
test_process_lifetime.py
test_providers_api.py
test_pytorch_mirror.py
test_rag_captioning.py
test_rag_chunking.py
test_rag_embed_llama_server.py
test_rag_embeddings.py
test_rag_ingestion.py
test_rag_job_events_queue_lifecycle.py
test_rag_loopback_trust_env.py
test_rag_ocr_fallback.py
test_rag_parsing.py
test_rag_preview.py
test_rag_reconcile_orphaned.py
test_rag_retrieval.py
test_rag_store.py
test_rag_whole_document.py
test_recommended_folders_has_model.py
test_recommended_folders_permission.py
test_resolve_quant_gguf.py
test_responses_api.py
test_responses_tool_passthrough.py Studio: parse Mistral [TOOL_CALLS] and rehearsal tool-call shapes (#5704) 2026-07-06 18:52:13 -07:00
test_rocm_oom_guard.py
test_s3_dataset.py
test_safetensors_capability_advertise.py Add DeepSeek-V4-Flash-GGUF to Studio with none/high/max reasoning (#6908) 2026-07-07 06:13:43 -07:00
test_safetensors_reasoning_stream.py Studio: parse Mistral [TOOL_CALLS] and rehearsal tool-call shapes (#5704) 2026-07-06 18:52:13 -07:00
test_safetensors_tool_loop.py Studio chat: tool-call nudging on by default (API stays opt-in) (#6883) 2026-07-06 19:41:19 -07:00
test_safetensors_toolcall_wiring.py studio: deterministic backend tool-calling wiring test (#6836) 2026-07-06 10:08:39 -07:00
test_sandbox_tools.py
test_sd_cpp_args.py Reject sd-cli batch runs and clear stale output targets before a run 2026-07-05 01:49:19 +00:00
test_sd_cpp_backend.py Studio: tighten image-generation fix comments and docstrings 2026-07-13 13:32:28 +00:00
test_sd_cpp_engine.py Reject sd-cli batch runs and clear stale output targets before a run 2026-07-05 01:49:19 +00:00
test_sd_cpp_install.py Studio: restore Reapply target on async image/video load errors; recheck training state before dataset commit; reclaim partial sd.cpp installs on retry 2026-07-13 15:27:46 +00:00
test_sd_cpp_server.py
test_secure_tools_execute.py
test_secure_tunnel_gate.py
test_security_gate_consistency.py Run the malware gate on the RAG embedding model before it loads (#6887) 2026-07-07 04:30:21 -07:00
test_server_disk_logging.py
test_setup_cache_env_hf_home.py
test_sf_client_tools_passthrough.py Studio: client-tool passthrough healing for safetensors and MLX (#6870) 2026-07-06 19:48:36 -07:00
test_slot_offload_fit.py
test_sse_streaming_headers.py
test_ssm_runtime.py
test_startup_banner_loopback.py
test_startup_llama_probe_non_blocking.py
test_studio_api.py
test_studio_train_validation.py
test_tensor_parallel.py
test_think_prefill_reemit.py Studio: render thinking blocks for safetensors inference with prefilled <think> templates (#6816) 2026-07-08 08:14:03 -07:00
test_thinking_parameter.py
test_tool_approvals.py
test_tool_call_parser_strict.py Studio: parse Mistral [TOOL_CALLS] and rehearsal tool-call shapes (#5704) 2026-07-06 18:52:13 -07:00
test_tool_confirm_loop.py
test_tool_confirm_stream.py
test_tool_loop_controller.py
test_tool_message_empty_content.py
test_tool_policy_gates.py
test_tool_policy_state.py
test_tool_strip_guard.py Studio: Gemma tool-call streaming follow-ups + nested-XML escape fix (#6476) (#6611) 2026-07-06 10:39:37 -07:00
test_tool_xml_strip.py Studio: parse Mistral [TOOL_CALLS] and rehearsal tool-call shapes (#5704) 2026-07-06 18:52:13 -07:00
test_torchao_select.py Studio: fix flash-attn and torchao install on Blackwell (sm_100+) GPUs (Closes #6961) (#6970) 2026-07-08 06:38:10 -07:00
test_tp_vision_regression.py
test_trained_model_scan.py
test_training_before_spawn.py
test_training_history_update.py
test_training_nan_loss_handling.py
test_training_preflight.py Add MLX backend support for CLI unsloth train (#6709) 2026-07-08 03:25:26 -07:00
test_training_progress_prep_timeout.py
test_training_progress_stream_nan.py
test_training_pump_resilience.py
test_training_raw_support.py
test_training_resume.py
test_training_runs.py
test_training_start_offload.py Tighten comments and docstrings added by the image-generation fixes 2026-07-13 05:29:09 +00:00
test_training_streaming.py
test_training_vram_coexistence.py
test_training_worker_flash_attn.py Studio: fix flash-attn and torchao install on Blackwell (sm_100+) GPUs (Closes #6961) (#6970) 2026-07-08 06:38:10 -07:00
test_training_worker_import_discipline.py Studio: don't pin transformers before the training worker activates the 5.x sidecar (#6968) 2026-07-08 05:33:16 -07:00
test_training_xet_fallback.py
test_transformers_version.py
test_trc_approval_cache.py
test_utils.py
test_validate_gguf_runtime_message.py
test_validate_model_error.py
test_video_backend.py Tighten comments in the image stack tests and scripts 2026-07-12 12:21:14 +00:00
test_video_families.py Merge remote-tracking branch 'origin/video-hunyuan-gate' into fold-integration 2026-07-07 01:15:20 +00:00
test_video_gallery.py Studio: gate gallery serve/export on ownership; keep image progress active until persisted; reserve diffusion training before the dataset scan 2026-07-13 14:40:18 +00:00
test_video_routes.py Studio: gate gallery serve/export on ownership; keep image progress active until persisted; reserve diffusion training before the dataset scan 2026-07-13 14:40:18 +00:00
test_vision_cache.py
test_vram_estimation.py
test_windows_gpu_detection_mock.py
test_worker_activates_correct_transformers.py Studio: don't pin transformers before the training worker activates the 5.x sidecar (#6968) 2026-07-08 05:33:16 -07:00
test_yaml_trust_remote_code_removed.py