Adds a `flux_unet` model family for Flux.1 D checkpoints that ship only the
UNet weights (no baked-in CLIP/T5/VAE) and require external encoder loading.
Affected checkpoints: lust_v10, cyberrealisticFlux_v25,
getphatFLUXReality_v11Softcore, moodyDesireMix_v20PRO,
fcFluxPonyPerfectBase. These live in `models/diffusion_models/` (or
`models/unet/`) on the ComfyUI host and are loaded via UNETLoader instead
of CheckpointLoaderSimple.
Detection:
- New `FLUX_UNET_ONLY_PATTERNS` constant in config.py lists known
UNet-only filename substrings.
- `detect_model_family()` returns `flux_unet` when any pattern matches,
taking precedence over base_model field (same architecture-override
pattern used for FluxPony hybrids).
Workflow:
- New flux_unet workflow in comfyui.py uses UNETLoader + DualCLIPLoader
(clip_l.safetensors + t5xxl_fp16.safetensors, type=flux) + VAELoader
(ae.safetensors) wired into the same Flux KSampler graph as the
monolithic flux family.
- Family defaults inherit from flux (sampler/scheduler/steps/cfg) with
external_clip flag set.
Smoke-tested end-to-end on madcat with getphatFLUXReality_v11Softcore
producing valid output. Flux.2 Klein checkpoints (lust_v10,
moodyDesireMix) still fail because they require a different text encoder
(qwen_3_8b) — see follow-up commit.
13 new tests; 240 -> 253 total.
Models like gonzalomoXLFluxPony are architecturally Flux but CivitAI
tags them as 'Pony', causing the SDXL workflow to be sent to ComfyUI
which fails validation. The filename now overrides base_model when it
contains 'flux'.
Also adds:
- Full Flux Dev/Schnell workflow template (ModelSamplingFlux,
FluxGuidance, ConditioningZeroOut, EmptySD3LatentImage); KSampler
cfg locked to 1.0, caller cfg routed to FluxGuidance
- --family/-F flag to manually override family detection
- queue_prompt now surfaces ComfyUI node_errors from 400 responses
- Tests for Flux workflow builder (8 cases) and updated family defaults
- Add sampler/scheduler/steps/vae to MODEL_FAMILY_DEFAULTS for all families
- Add zimage family detection for ZImageTurbo models
- Flux and zimage families use ae.safetensors VAE
- SD 1.5 families use checkpoint built-in VAE
- SDXL families use sdxl_vae.safetensors
- API auto-applies family defaults when request uses default values
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add [paths] section to config.toml for custom model directories
- Add get_model_paths() function that merges config with defaults
- Update get_default_output_path() to check config first
- Add --set-path option to tsr config command
- Update download_routes.py to use centralized path function
- Add tests for path configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>