Skip to content
This repository was archived by the owner on Oct 25, 2026. It is now read-only.

feat: expose V100 LoRA FP32 protection in WebUI - #10

Merged
LingyeSoul merged 3 commits into
LingyeSoul:mainfrom
buxinzi2233:codex/webui-v100-fp32-control
Aug 15, 2026
Merged

LingyeSoul merged 3 commits into
LingyeSoul:mainfrom
buxinzi2233:codex/webui-v100-fp32-control

Conversation

@buxinzi2233

Copy link
Copy Markdown

Summary

  • expose lora_fp32_compute as an editable auto/true/false control for LoRA-family variants
  • preserve backend V100/sm_70 FP16 auto-detection by omitting the TOML key when auto is selected
  • persist explicit true/false overrides as booleans and normalize custom presets the same way
  • hide the field for non-LoRA networks and add localized help for Chinese, English, Japanese, and Korean

Validation

  • .venv/bin/pytest -q tests/test_config_service.py tests/test_mixed_precision_resolver.py (55 passed)
  • npm run build (passed)
  • browser interaction verified the three-state control, dirty state, save, and reload behavior
  • git diff --check (passed)

else:
current[key] = normalized == "true"
continue
if key == "lora_fp32_compute":

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High: Legacy network_args still overrides this controlnnAn existing network_args = ["lora_fp32_compute=false"] remains in the overlay while this writes the new top-level value. The trainer intentionally gives network_args precedence, so selecting true still runs false. Remove/promote the legacy entry when loading and saving this field.

Comment thread webui/services/config_service.py Outdated
if normalized not in _LORA_FP32_COMPUTE_CHOICES:
raise ValueError("lora_fp32_compute must be auto, true, or false")
if normalized == "auto":
out.pop("lora_fp32_compute", None)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium: auto cannot clear a custom preset overridennDropping the method key works only when lower layers also omit it. If a custom preset explicitly sets true/false, choosing auto at the variant layer leaves that preset value effective. Persist a method-layer reset sentinel and consume it after the training merge.

Comment thread webui/services/config_service.py Outdated
# explicit true/false force the user's choice. Surface the omitted state as
# "auto" in the WebUI without writing that sentinel into the training TOML.
if (
merged.get("network_module") == "networks.lora_anima"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium: Non-LoRA variants can still display this fieldnnThis condition only controls injection when the key is absent. A custom preset carrying lora_fp32_compute leaves the key in merged even after a non-LoRA method replaces network_module, so EasyControl and other families show an irrelevant control. Remove it when the effective module is not networks.lora_anima.

"torch_compile": "Enable torch.compile for the forward pass. Faster training after initial compilation. Compiles each DiT block at native shapes — one graph per token-count bucket family, no static padding.",
"compile_dynamic_seq": "Mark only the native token-sequence axis dynamic inside each compiled DiT block. Required with free-fit shapes so a tier reuses one graph instead of compiling one graph per token count.",
"v100_flash_stability": "V100 FlashAttention diagnostic mode. off uses full Flash; hybrid routes cross-attention to Torch SDPA; safe keeps Flash and enables attention-boundary finite checks. A generated production preset uses off only after every local validation gate passes; safe is diagnostic only.",
"lora_fp32_compute": "FP32 protection for the LoRA family. auto enables it only for V100/sm_70 FP16 training; true forces FP32 adapter compute; false explicitly disables it. When active, adapter parameters, optimizer inputs, and saved checkpoint tensors stay FP32 while frozen DiT weights keep the model dtype. Usually leave this on auto.",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium: false is not unconditional in reliable block-swap modennThe runtime explicitly overrides lora_fp32_compute=false for V100 reliable block-swap mode to preserve its safety contract. Saying false always disables protection is misleading; document that exception here and in the other locales.

@LingyeSoul
LingyeSoul merged commit 5c5f211 into LingyeSoul:main Aug 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants