Commit 92a32361 authored by AUTOMATIC1111's avatar AUTOMATIC1111
Browse files

Merge branch 'dev' into sdxl

parents 9a3f35b0 9893d09b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
name: Run Linting/Formatting on Pull Requests
name: Linter

on:
  - push
@@ -6,7 +6,9 @@ on:

jobs:
  lint-python:
    name: ruff
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
@@ -22,7 +24,9 @@ jobs:
      - name: Run Ruff
        run: ruff .
  lint-js:
    name: eslint
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
+3 −1
Original line number Diff line number Diff line
name: Run basic features tests on CPU with empty SD model
name: Tests

on:
  - push
@@ -6,7 +6,9 @@ on:

jobs:
  test:
    name: tests on CPU with empty model
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
+2 −1
Original line number Diff line number Diff line
@@ -719,7 +719,7 @@ class Api:

    def launch(self, server_name, port):
        self.app.include_router(self.router)
        uvicorn.run(self.app, host=server_name, port=port, timeout_keep_alive=0)
        uvicorn.run(self.app, host=server_name, port=port, timeout_keep_alive=shared.cmd_opts.timeout_keep_alive)

    def kill_webui(self):
        restart.stop_program()
@@ -732,3 +732,4 @@ class Api:
    def stop_webui(request):
        shared.state.server_command = "stop"
        return Response("Stopping.")
+2 −0
Original line number Diff line number Diff line
@@ -106,4 +106,6 @@ parser.add_argument("--skip-version-check", action='store_true', help="Do not ch
parser.add_argument("--no-hashing", action='store_true', help="disable sha256 hashing of checkpoints to help loading performance", default=False)
parser.add_argument("--no-download-sd-model", action='store_true', help="don't download SD1.5 model even if no model is found in --ckpt-dir", default=False)
parser.add_argument('--subpath', type=str, help='customize the subpath for gradio, use with reverse proxy')
parser.add_argument('--add-stop-route', action='store_true', help='add /_stop route to stop server')
parser.add_argument('--api-server-stop', action='store_true', help='enable server stop/restart/kill via api')
parser.add_argument('--timeout-keep-alive', type=int, default=30, help='set timeout_keep_alive for uvicorn')
+8 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ import os.path
import filelock

from modules import shared
from modules.paths import data_path
from modules.paths import data_path, script_path


cache_filename = os.path.join(data_path, "cache.json")
@@ -26,8 +26,13 @@ def cache(subsection):
            if not os.path.isfile(cache_filename):
                cache_data = {}
            else:
                try:
                    with open(cache_filename, "r", encoding="utf8") as file:
                        cache_data = json.load(file)
                except Exception:
                    os.replace(cache_filename, os.path.join(script_path, "tmp", "cache.json"))
                    print('[ERROR] issue occurred while trying to read cache.json, move current cache to tmp/cache.json and create new cache')
                    cache_data = {}

    s = cache_data.get(subsection, {})
    cache_data[subsection] = s
Loading