• Stefy Lanza (nextime / spora )'s avatar
    h3: run the newer diffusers as a 75 MB overlay, and train through it · 3d53da50
    Stefy Lanza (nextime / spora ) authored
    H3 and Krea 2 need diffusers >= 0.40 while the server runs 0.38. Upgrading in
    place is not free: measured on this box, SDXL comes out bit-identical but Z-Image
    drifts (mean |diff| 0.0146, max 0.32, against a same-version control that is
    bit-identical) — so the upgrade would silently change image output for a model
    that is working fine.
    
    Since diffusers is imported once per process, the split only has to be
    per-process. The H3 venv is now created with --system-site-packages and given
    nothing but diffusers>=0.40 and huggingface_hub>=1.23; torch, transformers and the
    rest are inherited from the server's venv. That is 75 MB instead of the several GB
    a standalone venv costs, and keeps one torch on the machine.
    CODERAI_H3_STANDALONE_VENV=1 still builds a fully independent venv from
    requirements-h3.txt, for the day the parent's torch is too old.
    
    Training follows the same boundary: tools/lora_train_worker.py runs one job in the
    overlay — references written out as PNGs, request flattened to JSON, progress
    returned as JSON lines and mirrored onto the usual /v1/loras/progress so polling is
    unchanged. _train_via_overlay() drives it.
    
    Routing is by capability, not hardcoded: _diffusers_has(arch) tries to load the
    classes, so wan and ltx2 train in-process (0.38 has them) while h3 and krea go
    out-of-process — and if the main venv is ever upgraded they move back in-process
    with no config change.
    
    Verified: the overlay resolves diffusers 0.40 with torch/transformers inherited and
    leaves the parent untouched; a probe job ran under it, reached _train_flow_dit and
    reported back through the job file. The trainers themselves are still unrun against
    real weights.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
    3d53da50
Name
Last commit
Last update
..
__init__.py Loading commit data...
_film_net.py Loading commit data...
_rife_ifnet.py Loading commit data...
app.py Loading commit data...
archive.py Loading commit data...
audio_backends.py Loading commit data...
audio_clean.py Loading commit data...
audio_gen.py Loading commit data...
audio_stems.py Loading commit data...
canary_worker.py Loading commit data...
characters.py Loading commit data...
colibri_worker.py Loading commit data...
crisperwhisper_worker.py Loading commit data...
custom_pipelines.py Loading commit data...
diarization.py Loading commit data...
ds4_kv_janitor.py Loading commit data...
ds4_worker.py Loading commit data...
embeddings.py Loading commit data...
environments.py Loading commit data...
faceswap.py Loading commit data...
fastlog.py Loading commit data...
h3_worker.py Loading commit data...
hub_compat.py Loading commit data...
images.py Loading commit data...
k3_worker.py Loading commit data...
kt_worker.py Loading commit data...
lipsync.py Loading commit data...
log.py Loading commit data...
lora_archs.py Loading commit data...
loras.py Loading commit data...
melotts_worker.py Loading commit data...
ocr.py Loading commit data...
parler_worker.py Loading commit data...
pipelines.py Loading commit data...
prompt_cache.py Loading commit data...
pyannote_worker.py Loading commit data...
ratelimit.py Loading commit data...
rerank.py Loading commit data...
runpod_client.py Loading commit data...
runpod_ledger.py Loading commit data...
runpod_worker.py Loading commit data...
spatial.py Loading commit data...
speaker_embeddings.py Loading commit data...
speaker_registry.py Loading commit data...
state.py Loading commit data...
stt_backends.py Loading commit data...
text.py Loading commit data...
transcriptions.py Loading commit data...
tts.py Loading commit data...
tts_backends.py Loading commit data...
urlutils.py Loading commit data...
video.py Loading commit data...
vllm_worker.py Loading commit data...
voice_clone.py Loading commit data...
voice_convert.py Loading commit data...
vpr_salad_server.py Loading commit data...