Commit e3b9d0e3 authored by pieresimakp's avatar pieresimakp
Browse files

Merge branch 'master' into img2img-detect-image-size

parents 771ea212 91ae48fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@ jobs:
          cache-dependency-path: |
          cache-dependency-path: |
            **/requirements*txt
            **/requirements*txt
      - name: Run tests
      - name: Run tests
        run: python launch.py --tests --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test
        run: python launch.py --tests test --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test
      - name: Upload main app stdout-stderr
      - name: Upload main app stdout-stderr
        uses: actions/upload-artifact@v3
        uses: actions/upload-artifact@v3
        if: always()
        if: always()
+1 −0
Original line number Original line Diff line number Diff line
@@ -178,6 +178,7 @@ def load_loras(names, multipliers=None):




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


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

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


var shadowRootLoaded = setInterval(function() {
onUiLoaded(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);

    setupBracketChecking('txt2img_prompt', 'txt2img_token_counter')
    setupBracketChecking('txt2img_prompt', 'txt2img_token_counter')
    setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_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')
    setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter')
}, 1000);
})
 No newline at end of file
+1 −1
Original line number Original line Diff line number Diff line
<div class='card' {preview_html} onclick={card_clicked}>
<div class='card' style={style} onclick={card_clicked}>
	{metadata_button}
	{metadata_button}


	<div class='actions'>
	<div class='actions'>
+26 −0
Original line number Original line Diff line number Diff line
@@ -636,3 +636,29 @@ SOFTWARE.
   See the License for the specific language governing permissions and
   See the License for the specific language governing permissions and
   limitations under the License.
   limitations under the License.
</pre>
</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
Loading