Unverified Commit b8850592 authored by Martin Cairns's avatar Martin Cairns Committed by GitHub
Browse files

Merge branch 'AUTOMATIC1111:master' into adjust-ddim-uniform-steps

parents 6c9e427c dd028891
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line

function extensions_apply(_, _){
    disable = []
    update = []
    gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach(function(x){
        if(x.name.startsWith("enable_") && ! x.checked)
            disable.push(x.name.substr(7))

        if(x.name.startsWith("update_") && x.checked)
            update.push(x.name.substr(7))
    })

    restart_reload()

    return [JSON.stringify(disable), JSON.stringify(update)]
}

function extensions_check(){
    gradioApp().querySelectorAll('#extensions .extension_status').forEach(function(x){
        x.innerHTML = "Loading..."
    })

    return []
}

function install_extension_from_index(button, url){
    button.disabled = "disabled"
    button.value = "Installing..."

    textarea = gradioApp().querySelector('#extension_to_install textarea')
    textarea.value = url
	textarea.dispatchEvent(new Event("input", { bubbles: true }))

    gradioApp().querySelector('#install_extension_button').click()
}
+1173 −1070

File changed.

Preview size limit exceeded, changes collapsed.

+38 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
  " images in this directory. Loaded ": "개의 이미지가 이 경로에 존재합니다. ",
  " pages": "페이지로 나뉘어 표시합니다.",
  ", divided into ": "입니다. ",
  ". Use Installed tab to restart.": "에 성공적으로 설치하였습니다. 설치된 확장기능 탭에서 UI를 재시작해주세요.",
  "1st and last digit must be 1. ex:'1, 2, 1'": "1st and last digit must be 1. ex:'1, 2, 1'",
  "[wiki]": " [위키] 참조",
  "A directory on the same machine where the server is running.": "WebUI 서버가 돌아가고 있는 디바이스에 존재하는 디렉토리를 선택해 주세요.",
@@ -33,22 +34,28 @@
  "Always save all generated images": "생성된 이미지 항상 저장하기",
  "api": "",
  "append": "뒤에 삽입",
  "Append commas": "쉼표 삽입",
  "Apply and restart UI": "적용 후 UI 재시작",
  "Apply color correction to img2img results to match original colors.": "이미지→이미지 결과물이 기존 색상과 일치하도록 색상 보정 적용하기",
  "Apply selected styles to current prompt": "현재 프롬프트에 선택된 스타일 적용",
  "Apply settings": "설정 적용하기",
  "Auto focal point crop": "초점 기준 크롭(자동 감지)",
  "Autocomplete options": "자동완성 설정",
  "Batch count": "배치 수",
  "Batch from Directory": "저장 경로로부터 여러장 처리",
  "Batch img2img": "이미지→이미지 배치",
  "Batch Process": "이미지 여러장 처리",
  "Batch size": "배치 크기",
  "behind": "최신 아님",
  "BSRGAN 4x": "BSRGAN 4x",
  "built with gradio": "gradio로 제작되었습니다",
  "Cancel generate forever": "반복 생성 취소",
  "cfg cnt": "CFG 변화 횟수",
  "cfg count": "CFG 변화 횟수",
  "CFG Scale": "CFG 스케일",
  "cfg1 min/max": "CFG1 최소/최대",
  "cfg2 min/max": "CFG2 최소/최대",
  "Check for updates": "업데이트 확인",
  "Check progress": "진행도 체크",
  "Check progress (first)": "진행도 체크 (처음)",
  "checkpoint": " 체크포인트 ",
@@ -64,6 +71,9 @@
  "CodeFormer weight parameter; 0 = maximum effect; 1 = minimum effect": "CodeFormer 가중치 설정값 (0 = 최대 효과, 1 = 최소 효과)",
  "Collect": "즐겨찾기",
  "Color variation": "색깔 다양성",
  "Combinations": "조합",
  "Combinatorial batches": "조합 배치 수",
  "Combinatorial generation": "조합 생성",
  "copy": "복사",
  "Create a grid where images will have different parameters. Use inputs below to specify which parameters will be shared by columns and rows": "서로 다른 설정값으로 생성된 이미지의 그리드를 만듭니다. 아래의 설정으로 가로/세로에 어떤 설정값을 적용할지 선택하세요.",
  "Create a text file next to every image with generation parameters.": "생성된 이미지마다 생성 설정값을 담은 텍스트 파일 생성하기",
@@ -78,10 +88,12 @@
  "custom fold": "커스텀 경로",
  "Custom Name (Optional)": "병합 모델 이름 (선택사항)",
  "Dataset directory": "데이터셋 경로",
  "date": "생성 일자",
  "DDIM": "DDIM",
  "Decode CFG scale": "디코딩 CFG 스케일",
  "Decode steps": "디코딩 스텝 수",
  "Delete": "삭제",
  "delete next": "선택한 이미지부터 시작해서 삭제할 이미지 갯수",
  "Denoising": "디노이징",
  "Denoising Diffusion Implicit Models - best at inpainting": "Denoising Diffusion Implicit Models - 인페이팅에 뛰어남",
  "Denoising strength": "디노이즈 강도",
@@ -108,6 +120,7 @@
  "Draw mask": "마스크 직접 그리기",
  "Drop File Here": "파일을 끌어 놓으세요",
  "Drop Image Here": "이미지를 끌어 놓으세요",
  "Dropdown": "드롭다운",
  "Embedding": "임베딩",
  "Embedding Learning rate": "임베딩 학습률",
  "Emphasis: use (text) to make model pay more attention to text and [text] to make it pay less attention": "강조 : (텍스트)를 이용해 모델의 텍스트에 대한 가중치를 더 강하게 주고 [텍스트]를 이용해 더 약하게 줍니다.",
@@ -127,6 +140,8 @@
  "Euler a": "Euler a",
  "Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps to higher than 30-40 does not help": "Euler Ancestral - 매우 창의적, 스텝 수에 따라 완전히 다른 결과물이 나올 수 있음. 30~40보다 높은 스텝 수는 효과가 미미함",
  "Existing Caption txt Action": "이미 존재하는 캡션 텍스트 처리",
  "Extension": "확장기능",
  "Extensions": "확장기능",
  "Extra": "고급",
  "Extras": "부가기능",
  "extras": "부가기능",
@@ -134,7 +149,7 @@
  "Face restoration": "얼굴 보정",
  "Face restoration model": "얼굴 보정 모델",
  "Fall-off exponent (lower=higher detail)": "감쇠 지수 (낮을수록 디테일이 올라감)",
  "favorites": "즐겨찾기",
  "Favorites": "즐겨찾기",
  "File": "파일",
  "File format for grids": "그리드 이미지 파일 형식",
  "File format for images": "이미지 파일 형식",
@@ -150,6 +165,7 @@
  "First Page": "처음 페이지",
  "Firstpass height": "초기 세로길이",
  "Firstpass width": "초기 가로길이",
  "Fixed seed": "시드 고정",
  "Focal point edges weight": "경계면 가중치",
  "Focal point entropy weight": "엔트로피 가중치",
  "Focal point face weight": "얼굴 가중치",
@@ -186,6 +202,7 @@
  "Image Browser": "이미지 브라우저",
  "Image for img2img": "Image for img2img",
  "Image for inpainting with mask": "마스크로 인페인팅할 이미지",
  "Image not found (may have been already moved)": "이미지를 찾을 수 없습니다 (이미 옮겨졌을 수 있음)",
  "Images Browser": "이미지 브라우저",
  "Images directory": "이미지 경로",
  "Images filename pattern": "이미지 파일명 패턴",
@@ -205,6 +222,10 @@
  "Inpainting conditioning mask strength": "인페인팅 조절 마스크 강도",
  "Input directory": "인풋 이미지 경로",
  "Input images directory": "이미지 경로 입력",
  "Install": "설치",
  "Install from URL": "URL로부터 확장기능 설치",
  "Installed": "설치된 확장기능",
  "Installed into ": "확장기능을 ",
  "Interpolation Method": "보간 방법",
  "Interrogate\nCLIP": "CLIP\n분석",
  "Interrogate\nDeepBooru": "DeepBooru\n분석",
@@ -223,6 +244,7 @@
  "Just resize": "리사이징",
  "Keep -1 for seeds": "시드값 -1로 유지",
  "keep whatever was there originally": "이미지 원본 유지",
  "keyword": "프롬프트",
  "Label": "라벨",
  "Lanczos": "Lanczos",
  "Last prompt:": "마지막 프롬프트 : ",
@@ -230,10 +252,12 @@
  "Last saved image:": "마지막으로 저장된 이미지 : ",
  "latent noise": "잠재 노이즈",
  "latent nothing": "잠재 공백",
  "latest": "최신 버전",
  "LDSR": "LDSR",
  "LDSR processing steps. Lower = faster": "LDSR 스텝 수. 낮은 값 = 빠른 속도",
  "leakyrelu": "leakyrelu",
  "Leave blank to save images to the default path.": "기존 저장 경로에 이미지들을 저장하려면 비워두세요.",
  "Leave empty for auto": "자동 설정하려면 비워두십시오",
  "left": "왼쪽",
  "linear": "linear",
  "List of prompt inputs": "프롬프트 입력 리스트",
@@ -242,11 +266,13 @@
  "LMS Karras": "LMS Karras",
  "Load": "불러오기",
  "Loading...": "로딩 중...",
  "Local directory name": "로컬 경로 이름",
  "Localization (requires restart)": "현지화 (재시작 필요)",
  "Log directory": "로그 경로",
  "Loopback": "루프백",
  "Loops": "루프 수",
  "Loss:": "손실(Loss) : ",
  "Magic prompt": "매직 프롬프트",
  "Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution": "동일한 시드 값으로 생성되었을 이미지를 주어진 해상도로 최대한 유사하게 재현합니다.",
  "Make K-diffusion samplers produce same images in a batch as when making a single image": "K-diffusion 샘플러들이 단일 이미지를 생성하는 것처럼 배치에서도 동일한 이미지를 생성하게 하기",
  "Make Zip when Save?": "저장 시 Zip 생성하기",
@@ -260,7 +286,9 @@
  "Minimum number of pages per load": "한번 불러올 때마다 불러올 최소 페이지 수",
  "Modules": "모듈",
  "Move face restoration model from VRAM into RAM after processing": "처리가 완료되면 얼굴 보정 모델을 VRAM에서 RAM으로 옮기기",
  "Move to favorites": "즐겨찾기로 옮기기",
  "Move VAE and CLIP to RAM when training hypernetwork. Saves VRAM.": "하이퍼네트워크 훈련 진행 시 VAE와 CLIP을 RAM으로 옮기기. VRAM이 절약됩니다.",
  "Moved to favorites": "즐겨찾기로 옮겨짐",
  "Multiplier (M) - set to 0 to get model A": "배율 (M) - 0으로 적용하면 모델 A를 얻게 됩니다",
  "Name": "이름",
  "Negative prompt": "네거티브 프롬프트",
@@ -285,6 +313,7 @@
  "original": "원본 유지",
  "Original negative prompt": "기존 네거티브 프롬프트",
  "Original prompt": "기존 프롬프트",
  "Others": "기타",
  "Outpainting direction": "아웃페인팅 방향",
  "Outpainting mk2": "아웃페인팅 마크 2",
  "Output directory": "이미지 저장 경로",
@@ -303,6 +332,7 @@
  "Overwrite Old Hypernetwork": "기존 하이퍼네트워크 덮어쓰기",
  "Page Index": "페이지 인덱스",
  "parameters": "설정값",
  "path name": "경로 이름",
  "Path to directory where to write outputs": "결과물을 출력할 경로",
  "Path to directory with input images": "인풋 이미지가 있는 경로",
  "Paths for saving": "저장 경로",
@@ -424,6 +454,7 @@
  "Skip": "건너뛰기",
  "Slerp angle": "구면 선형 보간 각도",
  "Slerp interpolation": "구면 선형 보간",
  "sort by": "정렬 기준",
  "Source": "원본",
  "Source directory": "원본 경로",
  "Split image overlap ratio": "이미지 분할 겹침 비율",
@@ -431,6 +462,7 @@
  "Split oversized images": "사이즈가 큰 이미지 분할하기",
  "Stable Diffusion": "Stable Diffusion",
  "Stable Diffusion checkpoint": "Stable Diffusion 체크포인트",
  "step cnt": "스텝 변화 횟수",
  "step count": "스텝 변화 횟수",
  "step1 min/max": "스텝1 최소/최대",
  "step2 min/max": "스텝2 최소/최대",
@@ -467,7 +499,9 @@
  "txt2img": "텍스트→이미지",
  "txt2img history": "텍스트→이미지 기록",
  "uniform": "uniform",
  "unknown": "알수 없음",
  "up": "위쪽",
  "Update": "업데이트",
  "Upload mask": "마스크 업로드하기",
  "Upload prompt inputs": "입력할 프롬프트를 업로드하십시오",
  "Upscale Before Restoring Faces": "얼굴 보정을 진행하기 전에 업스케일링 먼저 진행하기",
@@ -479,9 +513,12 @@
  "Upscaler 2 visibility": "업스케일러 2 가시성",
  "Upscaler for img2img": "이미지→이미지 업스케일러",
  "Upscaling": "업스케일링",
  "URL for extension's git repository": "확장기능의 git 레포 URL",
  "Use a two step process to partially create an image at smaller resolution, upscale, and then improve details in it without changing composition": "저해상도 이미지를 1차적으로 생성 후 업스케일을 진행하여, 이미지의 전체적인 구성을 바꾸지 않고 세부적인 디테일을 향상시킵니다.",
  "Use an empty output directory to save pictures normally instead of writing to the output directory.": "저장 경로를 비워두면 기본 저장 폴더에 이미지들이 저장됩니다.",
  "Use BLIP for caption": "캡션에 BLIP 사용",
  "Use checkbox to enable the extension; it will be enabled or disabled when you click apply button": "체크박스를 이용해 적용할 확장기능을 선택하세요. 변경사항은 적용 후 UI 재시작 버튼을 눌러야 적용됩니다.",
  "Use checkbox to mark the extension for update; it will be updated when you click apply button": "체크박스를 이용해 업데이트할 확장기능을 선택하세요. 업데이트는 적용 후 UI 재시작 버튼을 눌러야 적용됩니다.",
  "Use deepbooru for caption": "캡션에 deepbooru 사용",
  "Use dropout": "드롭아웃 사용",
  "Use following tags to define how filenames for images are chosen: [steps], [cfg], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp]; leave empty for default.": "다음 태그들을 사용해 이미지 파일명 형식을 결정하세요 : [steps], [cfg], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp]. 비워두면 기본값으로 설정됩니다.",

modules/extensions.py

0 → 100644
+83 −0
Original line number Diff line number Diff line
import os
import sys
import traceback

import git

from modules import paths, shared


extensions = []
extensions_dir = os.path.join(paths.script_path, "extensions")


def active():
    return [x for x in extensions if x.enabled]


class Extension:
    def __init__(self, name, path, enabled=True):
        self.name = name
        self.path = path
        self.enabled = enabled
        self.status = ''
        self.can_update = False

        repo = None
        try:
            if os.path.exists(os.path.join(path, ".git")):
                repo = git.Repo(path)
        except Exception:
            print(f"Error reading github repository info from {path}:", file=sys.stderr)
            print(traceback.format_exc(), file=sys.stderr)

        if repo is None or repo.bare:
            self.remote = None
        else:
            self.remote = next(repo.remote().urls, None)
            self.status = 'unknown'

    def list_files(self, subdir, extension):
        from modules import scripts

        dirpath = os.path.join(self.path, subdir)
        if not os.path.isdir(dirpath):
            return []

        res = []
        for filename in sorted(os.listdir(dirpath)):
            res.append(scripts.ScriptFile(self.path, filename, os.path.join(dirpath, filename)))

        res = [x for x in res if os.path.splitext(x.path)[1].lower() == extension and os.path.isfile(x.path)]

        return res

    def check_updates(self):
        repo = git.Repo(self.path)
        for fetch in repo.remote().fetch("--dry-run"):
            if fetch.flags != fetch.HEAD_UPTODATE:
                self.can_update = True
                self.status = "behind"
                return

        self.can_update = False
        self.status = "latest"

    def pull(self):
        repo = git.Repo(self.path)
        repo.remotes.origin.pull()


def list_extensions():
    extensions.clear()

    if not os.path.isdir(extensions_dir):
        return

    for dirname in sorted(os.listdir(extensions_dir)):
        path = os.path.join(extensions_dir, dirname)
        if not os.path.isdir(path):
            continue

        extension = Extension(name=dirname, path=path, enabled=dirname not in shared.opts.disabled_extensions)
        extensions.append(extension)
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,11 @@ paste_fields = {}
bind_list = []


def reset():
    paste_fields.clear()
    bind_list.clear()


def quote(text):
    if ',' not in str(text):
        return text
Loading