Repository navigation
feat(studio): split a picture into regions with KohakuGBC - #82
Merged
Merged
Conversation
拆成区域 in a picture's menu reads the picture with KohakuGBC and fills a new 画面 beside it with the regions and description it finds. 设置 › 功能 gets a 看图拆区域 switch (off by default) with the 助手 model that reads pictures, a one-step install, and a version picker under 高级. GBC runs are now owned: 停止 and quitting end them, progress reaches the card, and the install runs PyTorch from the trainer's index before the version itself, since KohakuGBC is not on PyPI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
KohakuGBC's panel was removed in the 11-04 UI rebuild (6ebea87). Its services and IPC stayed in the app, but nothing called them. This brings it back in the shape of the approved design (https://claude.ai/artifact/Q8dumU4DBFpTmneaqvipwB). All five decisions there were taken as recommended.
.venv, PyTorch from the trainer's index, thenpip install -e .[torch]. KohakuGBC is not on PyPI.gbc:cancel) and quitting (stopGbcProcessesonbefore-quit) end them; the install is abortable too. Progress goes to the card (event:gbc-parse, from Hugging Face download bars), and the status check is cached.runStreamgainssignalandsplitCarriageReturn.How it was verified
pnpm lint(0 errors, the same 12 warnings as main),pnpm format:check,pnpm typecheck,pnpm test:unit(3544 passed). New tests:shared/gbc.test.ts: graph to regions, and the reasons it can't run.main/services/gbc.test.ts: a fakegbcprocess covering the config, progress, 停止, quit and failures.renderer/studio/pictureRegions.test.ts: the new 画面's size and placement, and how regions are applied.run.test.ts: abort and carriage-return splitting.pnpm build && pnpm test:e2e(345 passed). Newe2e/specs/gbc.e2e.tscovers the menu with the feature off and on, filling a 画面, 停止, a failure, the not-ready entry, and setup in 设置. The visual audit now includes the GBC section in 设置 › 功能.gbc-picture-menu-light,gbc-regions-light,gbc-reading-dark,gbc-settings-light,gbc-settings-dark.docs/reference/architecture.md(GBC section),docs/reference/studio-node-board.md(picture actions),docs/how-to/setup.md(「功能」 row),docs/reference/glossary.md.Platforms affected
Notes for the reviewer
shortfor regions,detailfor the description).gbc:run,gbc:list-imagesandgbc:thumbnails(folders and sidecar files, for training captions) still have no UI. Those are a later round, as decided.