Fix Z-Image image-gen + LoRA training; add separate LoRA training base model
- images.py: stop reusing cached prompt embeds for Z-Image. Its encode_prompt
returns per-sample lists the pipeline consumes during a run, so cache-HIT
reuse corrupted the batch (AssertionError: len(size) == bsz in unpatchify).
Z-Image now always encodes natively; cache key also bound to id(pipeline).
- loras.py: fix wrong import (multi_model_manager lives in codai.models.manager,
not codai.api.state) used for VRAM unload + base-model path resolution; add an
up-front architecture guard so transformer/DiT models (Z-Image/Flux/SD3) fail
with a clear message instead of crashing in the CLIP tokenizer.
- New train_base_model on LoraTrainRequest: train LoRAs against a separate
UNet-based SD1.x/SDXL model while generation keeps using the DiT image model.
- gen_township_fighters.py: thread --lora-train-base-model / web field through
train_lora, _train_profile_loras, stage_loras/stage_env_loras, all run + per-
card call sites; CONFIG_FIELDS + live default_args apply on /start, /save-config.
Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com>
Showing
This diff is collapsed.
Please
register
or
sign in
to comment