SenshiSentou / sd-webui-cardmaster

Card Master extension for A1111 Web UI
The Unlicense
44 stars 2 forks source link

ko-fi

Card Master

Card Master adds a host of easability and quality of life features to the cards found in the "Extra Networks" tabs (TIs, Hypernetworks, Checkpoints, and, most notably, LoRAs).

Card zoom

The first thing you might notice is a zoom slider added to the extra tabs header. This makes browsing large collections of checkpoints and LoRAs much faster. The card will grow on hover, so you won't miss any information.

Docked detail view

Right next to the zoom slider is a button that will toggle a side panel called the "docked detail view" (this is referred to as an inspector in code). This detail view will show more granular information about a card.

By default, clicking on a card will apply all activation texts if there are any left to add, or remove them all if all were already present. Right-clicking will pin the card to the detail view so you can interact with it.

However, both click, double click, and right click actions are fully customizable from the settings page.

Other detail views

If you don't like having a full detail view taking up space all the time, you might prefer to bind one of your card click actions to open either the floating detail view or compact detail view instead. The floating detail view looks identical to the docked one, opening up on top of the card you clicked, and closing when you mouse our of it. The compact detail view omits all information except for the tags and functions the same way.

The compact detail view

Activation text sections

A lot or LoRAs come with several different activation text "sections" – usually to offer things like outfit variations and the like. As you can see above, Card Master makes extensive use of these. Most authors follow civit.ai's convention, which is to separate sections with a double comma (,,). Card Master accepts this, as well as a semicolon (;) as an explicit separator.

In addition, Card Master will split the activation text out into separate sections if the first tag is ever repeated. For example, tomachan, long hair, outfit1, tomachan, ponytail, outfit2 will be split into tomachan, long hair, outfit1 and tomachan, ponytail, outfit2.

Behaviours to be aware of

There are a couple things Card Master is opinionated about, causing it to deviate from the default A1111 behaviour:

  1. When adding activation texts, only those that are not already present in the prompt will be added; duplicate texts will never be added.
  2. When clicking a card, if all activation texts are already present, both the <lora:name:weight> and all of its associated tags will be removed from the prompts.

There are also two "invisible" behaviours:

  1. When adding an activation text from a detail view, if that card's <lora:name:weight> text is not already present in the prompt, it will automatically be added.
  2. When a card or activation text is clicked to be added or removed from the prompt text, the alt key can be held to apply this effect to the negative prompt instead.

Installation

Open your A1111 Web UI and go to Extensions > Install from URL. Paste in the link to this repo (https://github.com/SenshiSentou/sd-webui-cardmaster.git), click Install and restart the web ui.

This extension was formerly known as Tiny Cards. If you are installing this extension manually and already had Tinycards installed, please remove or disable the old version first.