Skip to content

Pyside6 dataset tool including lmstudio#1599

Open
CrunchyBanana1 wants to merge 12 commits into
Nerogar:masterfrom
CrunchyBanana1:pyside6-dataset-tool-lmstudio
Open

Pyside6 dataset tool including lmstudio#1599
CrunchyBanana1 wants to merge 12 commits into
Nerogar:masterfrom
CrunchyBanana1:pyside6-dataset-tool-lmstudio

Conversation

@CrunchyBanana1

@CrunchyBanana1 CrunchyBanana1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Ports the dataset tool to the new PySide6 UI and replaces the local caption models with an LM Studio (OpenAI-compatible API) backend.

Included

  • PySide6 dataset tool window: file list, image view, brush/fill mask editing, prompt editing, keyboard shortcuts
  • PySide6 batch mask-generation dialog (existing ClipSeg / Rembg / Rembg-Human / Hex Color models)
  • LM Studio captioning: LMStudioCaptionModel, a single-image "Caption Image" button, and a batch dialog (server URL, system/user prompts, modes, progress, cancel)
  • Server URL + prompts persisted to a local json
  • Cooperative cancel for batch runs (stops after the current image)

Preview
grafik

grafik grafik ezgif-5413e5ef6f646aa5

Credits
The LM Studio captioning flow is adapted from LM_Studio_Image_Captioner by Kazi Shashwata Rahman (@shashwata2020), used under the MIT License. Thanks!


⚠️ Disclosure: This was written by an AI coding agent (Claude Code). I'm submitting it but I don't understand the code myself and can't personally vouch for its correctness — please review carefully before merging. Happy to change or drop it.

CrunchyBanana1 and others added 12 commits July 7, 2026 23:38
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds load_lmstudio_captioning_model + caption_current_image to
CaptionUIController and a create_captions_lmstudio method alongside the
existing local-model create_captions (kept intact for the Ctk dialog).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Thread a cooperative is_cancelled check through caption_folder/caption_images
(checked before each image) and wire a Cancel button in the LM Studio batch
caption dialog that stops the run after the current image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Attribution to Kazi Shashwata Rahman (shashwata2020), MIT License, whose
tool the LM Studio request flow is adapted from.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reset the draw origin to the click point on mouse-press so the first dab is a
dot rather than a line connecting to where the last stroke ended. Dragging
still paints a continuous line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Draw a circle overlay that follows the cursor and matches the current brush
radius (adjustable via mouse wheel), plus a crosshair pointer, so the brush
footprint is visible before painting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Enter-to-save was bound to the prompt field's returnPressed, so it did nothing
while the canvas had focus (e.g. right after painting a mask). Make Return and
keypad Enter window-level shortcuts and flash a "saved" confirmation in the
title bar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bracket keys shrink/grow the brush (alongside the mouse wheel), handled in
keyPressEvent so typing brackets into the caption box still works. The canvas
takes click-focus so the keys apply once painting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dxqb dxqb changed the base branch from merge to master July 12, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant