Improved Model Detection: Updated the determine_embedding_distribution() function to handle different model types, including SDXL, SD 1.x, and SD 2.x. Added checks to identify the model structure and find the correct embedding layer.
Error Handling:
Implemented checks to detect unsupported models (like SDXL) without crashing. Added informative messages for users when certain features are unavailable due to model incompatibility.
Updated add_tab() Function:
Modified to handle cases where the embedding distribution cannot be determined. Added conditional execution of functions based on model compatibility. Included warning messages in the UI for unsupported models.
Embedding Layer Access: Changed how the embedding layer is accessed to accommodate different model structures. Implemented a more flexible approach to navigate through the model's attributes.
SD A1111 B34T EmbLab is a simple embedding workshop extension for Stable Diffusion A1111 UI (SD1.5 version). This tool allows users to easily modify, merge, and create embeddings using groups of tokens.
This project was inspired by:
- A reuploaded clone: embedding-inspector of a deleted repository
- stable-diffusion-webui-embedding-editor
- Merge embeddings by groups of prompts or combine all into one token
- Zonal editor tool for copying and pasting chunks of weights between tokens
- Pen tool for "drawing" weights on each token track
- Ability to change the accent of each token track and combine them into final tokens
- Save results as an Embedding (Textual Inversion)
- Create a single-token style by merging 4-5 tokens (e.g., "shine shock string detailed sharp")
- Use the single-token adjustment to modify your prompt results
- Duplicate a "token track," increase its accent, and use the pen tool to create an adjustment track
- Combine tokens using parts of other token weights
- This tool is designed for SD1.5 but can be used for experimentation and fun
- The interface may appear complex, resembling a sound editor
- While not a "magic box" solution, it offers flexibility for those who enjoy experimenting
A video tutorial is available to help you understand the basics of this extension.
https://github.com/834t/sd-a1111-b34t-emblab
Enjoy experimenting with SD A1111 B34T EmbLab!
Short Overview: