Unverified Commit db7caf9b authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge branch 'master' into patch-1

parents e5dd5d73 c1294d84
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ def load_loras(names, multipliers=None):


def lora_forward(module, input, res):
    input = devices.cond_cast_unet(input)
    if len(loaded_loras) == 0:
        return res

+4 −11
Original line number Diff line number Diff line
@@ -89,22 +89,15 @@ function checkBrackets(evt, textArea, counterElt) {
function setupBracketChecking(id_prompt, id_counter){
    var textarea = gradioApp().querySelector("#" + id_prompt + " > label > textarea");
    var counter = gradioApp().getElementById(id_counter)

    textarea.addEventListener("input", function(evt){
        checkBrackets(evt, textarea, counter)
    });
}

var shadowRootLoaded = setInterval(function() {
    var shadowRoot = document.querySelector('gradio-app').shadowRoot;
    if(! shadowRoot)  return false;

    var shadowTextArea = shadowRoot.querySelectorAll('#txt2img_prompt > label > textarea');
    if(shadowTextArea.length < 1)  return false;

    clearInterval(shadowRootLoaded);

onUiLoaded(function(){
    setupBracketChecking('txt2img_prompt', 'txt2img_token_counter')
    setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_token_counter')
    setupBracketChecking('img2img_prompt', 'imgimg_token_counter')
    setupBracketChecking('img2img_prompt', 'img2img_token_counter')
    setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter')
}, 1000);
})
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
@@ -636,3 +636,29 @@ SOFTWARE.
   See the License for the specific language governing permissions and
   limitations under the License.
</pre>

<h2><a href="https://github.com/explosion/curated-transformers/blob/main/LICENSE">Curated transformers</a></h2>
<small>The MPS workaround for nn.Linear on macOS 13.2.X is based on the MPS workaround for nn.Linear created by danieldk for Curated transformers</small>
<pre>
The MIT License (MIT)

Copyright (C) 2021 ExplosionAI GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</pre>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ contextMenuInit = function(){

    })

    gradioApp().getRootNode().appendChild(contextMenu)
    gradioApp().appendChild(contextMenu)

    let menuWidth = contextMenu.offsetWidth + 4;
    let menuHeight = contextMenu.offsetHeight + 4;
+1 −1
Original line number Diff line number Diff line
function keyupEditAttention(event){
	let target = event.originalTarget || event.composedPath()[0];
	if (!target.matches("[id*='_toprow'] textarea.gr-text-input[placeholder]")) return;
	if (! target.matches("[id*='_toprow'] [id*='_prompt'] textarea")) return;
	if (! (event.metaKey || event.ctrlKey)) return;

	let isPlus = event.key == "ArrowUp"
Loading