Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

light-and-ray
Copy link
Contributor

@light-and-ray light-and-ray commented Apr 30, 2024

While making this request I faced with problems and decided to include a small refactoring

I've made these things:

  1. Move all entry of scripts/sam.py into lib_segment_anything/sam.py except Script. It was needed to avoid ui tab duplication because script/api.py imports these entry and the module sam was duplicated
  2. Move api.py into lib_segment_anything
  3. Add special tab for segment anything. Disabled by default. In this mode txt2img script is hidden, and all img2img stuff goes into this tab via JS onUiLoaded callback, so all features work as usual img2img tab
  4. In special tab mode there are few resizable columns for prettier look

Screenshot 2024-04-30 at 12-21-01 Stable Diffusion

@chnccy
Copy link

chnccy commented Apr 30, 2024 via email

@light-and-ray
Copy link
Contributor Author

light-and-ray commented Apr 30, 2024

Maybe it's a good idea to enable this tab by default. Because accordion is really to big and not very useful to be inside txt2img/img2img tab. Especially when dino box and mask dilation are shown

Screenshot 2024-04-30 at 12-50-52 Stable Diffusion

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.

2 participants