Skip to content

Phase 2 - Input tooltips, autocorrect, synced run names, default names - #1300

Open
O-J1 wants to merge 36 commits into
Nerogar:masterfrom
O-J1:input-tooltips-and-co
Open

Phase 2 - Input tooltips, autocorrect, synced run names, default names#1300
O-J1 wants to merge 36 commits into
Nerogar:masterfrom
O-J1:input-tooltips-and-co

Conversation

@O-J1

@O-J1 O-J1 commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator
  1. Input validation tooltips
  2. Reworked model outputs section:
    • 3 options, default, friendly and custom
    • Better support for EU, Middle Eastern and Asian numerical practices/chars (safe type coercions)
    • Auto-correction for basic things like floats, ints and path normalisation
  3. Run Name is synchronised to saves, backups and tensorboard as a prefix.
  4. Debounced workspace dir. Closes [Bug]: Always-On Tensorboard create unwanted workspace directories #1028
  5. Fixed backup resum bug with LoHA. Closes [Bug]: Restart of Z-Image Base LoHA after stopping fails with Rank Mismatch. #1340
image

When autocorrect is not turned on we surface a tooltip:

image

@O-J1 O-J1 added the waiting waiting for something / cannot fix currently label Feb 9, 2026
@O-J1 O-J1 removed the waiting waiting for something / cannot fix currently label Feb 22, 2026
@O-J1
O-J1 marked this pull request as ready for review February 22, 2026 13:05
Comment thread modules/ui/TrainUI.py
Comment thread modules/util/config/TrainConfig.py Outdated
Comment thread modules/util/config/TrainConfig.py Outdated
Comment thread modules/util/config/TrainConfig.py Outdated
Comment thread modules/util/ui/autocorrect.py Outdated
Comment thread modules/util/ui/validation.py Outdated
Comment thread modules/util/ui/ToolTip.py Outdated
Comment thread modules/util/ui/validation.py Outdated
Comment thread modules/ui/TrainUI.py
Comment thread modules/util/ui/validation.py Outdated
@O-J1
O-J1 marked this pull request as ready for review April 7, 2026 10:47
@O-J1

O-J1 commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator Author

@dxqb Would you be able to review this now?

@O-J1
O-J1 requested a review from dxqb May 3, 2026 19:16
Comment thread modules/util/ui/ToolTip.py
Comment thread modules/ui/ModelTab.py
Comment thread modules/ui/ModelTab.py
Comment thread modules/cloud/BaseCloud.py Outdated
Comment thread modules/util/time_util.py Outdated
Comment thread modules/ui/TrainUI.py Outdated
Comment thread modules/util/ui/autocorrect.py
Comment thread modules/util/ui/components.py
Comment thread modules/util/ui/ToolTip.py
Comment thread modules/ui/TrainUI.py
@dxqb

dxqb commented May 10, 2026

Copy link
Copy Markdown
Collaborator

@dxqb Would you be able to review this now?

finally did
[adding this because our github bot doesn't post reviews)

Co-authored-by: Copilot <copilot@github.com>
@O-J1

O-J1 commented May 11, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed review comments as best I could

@dxqb

dxqb commented May 14, 2026

Copy link
Copy Markdown
Collaborator

👀

@dxqb
dxqb changed the base branch from master to merge May 17, 2026 10:55
@dxqb
dxqb changed the base branch from merge to master May 17, 2026 10:56
@O-J1

O-J1 commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

@dxqb Merged updates and addressed some things + fixed the lokr regression.

You stated this "I think there is an easier way. Will follow up" last month. Everything else has been resolved aside from the name discussion

dxqb

This comment was marked as resolved.

@BitcrushedHeart

BitcrushedHeart commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

I'd like to ask that auto-correct doesn't kick in until the user clicks off the input box - currently if you are a really slow typer, or if you're remoting into your PC and adjusting the settings via a remote delay, you could be halfway through typing something and then autocorrect kicks you off. A better method considering UX is to only auto-correct after the user exits the input field.

I'd also agree with dxqb - os.mkdir is a better solution than 'Actually, can you open your file explorer, find the destination folder that you want to use, right click, click 'Create New Folder', open it, copy that path, and then copy and paste it into this textbox?'

Honestly I'm iffy in general on autocorrect at all - feels like fixing a problem that doesn't exist, I'm much more a fan of just... throw an exception.

@O-J1

O-J1 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

Honestly I'm iffy in general on autocorrect at all - feels like fixing a problem that doesn't exist, I'm much more a fan of just... throw an exception.

I dont ever want to have to deal with users being stupid in the common pitfall fields again if I can help it+ it helps people from different cultures (arabic, jp and eu) still use their specific decimal separators too.

Ive already pared it back massively to only obvious things.

@O-J1

O-J1 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

@dxqb @BitcrushedHeart PathIOType.OUTPUT fields now mkdir

if self.peft_type == PeftType.OFT_2:
return

rank_key = next((k for k in state_dict if k.endswith(".lora_down.weight")), None)

@dxqb dxqb Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't understand this new check. there already is a check below this new inserted code. it already finds the rank_key based on the peft type.
what does this do what the existing check doesn't also do? Please have a look at this code in context before you reply. on it's own, it might make sense, but not with the following section

abs_path = os.path.abspath(trimmed)
output_dir = abs_path if output_is_dir else os.path.dirname(abs_path)
try:
os.makedirs(output_dir, exist_ok=True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks, but validation.py shouldn't create directories as a side effect:

Image

there is no need for this I think. all directories that need to be created, are already created elsewhere:

  • workspace_dir: GenericTrainer.init (modules/trainer/GenericTrainer.py:74-75) — os.makedirs(os.path.join(config.workspace_dir, "tensorboard"), exist_ok=True), which recursively creates workspace_dir too.
  • cache_dir: GenericTrainer.start() (modules/trainer/GenericTrainer.py:134) — os.makedirs(self.config.quantization.cache_dir, exist_ok=True) where quantization.cache_dir defaults to cache_dir + "/quantization".
  • final_output_dir: created by the model savers right before writing (modules/modelSaver/mixin/LoRASaverMixin.py:51,67,75, EmbeddingSaverMixin.py:32).
  • debug_dir: created via _save_image/_save_text in ModelSetupDebugMixin when a debug artifact is actually written.

final_output_dir = parent if parent != "." else "./models"
else:
run_name = ""
final_output_dir = "./models"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

minor but looks weird to me. why not just "models"?

"Increase your total epochs to continue."
)

def get_last_backup_path(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think we should touch the backup-finding logic at all. Why should you even have incompatible backups in the same workspace? What problem does this solve?

If you disagree, please submit it as a separate PR. It is incredible difficult to review a PR that does so many completely unrelated things.

last_backup_path = self.config.get_last_backup_path(require_compatible=True)
assert last_backup_path is not None

if self.config.training_method == TrainingMethod.LORA:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LOHA regression? if you mean this, I think that was a user error: #1340 (comment)

@dxqb

dxqb commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

I made minor changes to be able to start it, but don't have write access to this branch. You'll find them here: O-J1#2
If you agree with the changes, click merge and it'll end up in this PR branch.

There are 2 unaddressed comments from an earlier review and I have added a few new ones.
Top-level overview,

  • I like the entire run name logic
  • I like the new "error tooltips" that tell the user what he did wrong
  • I think autocorrect is unnecessary and you might have only had this idea, because there were no "error tooltips" yet, so correcting automatically was the next best thing. However, if you disagree and this has limited scope now (basically, typing errors), I'll merge this.
  • I don't see a reason to touch the backup discovery logic at all, and don't understand what problem this solves. If you disagree, please submit this as a separate PR and let's have a closer look, but this can just subtly break too many things for a PR that should be about user interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants