This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modules import patches, txt2img, script_callbacks, infotext_utils, errors, scripts | |
from functools import wraps | |
import inspect | |
import json | |
global_carry_info = None | |
def wrap_txt2img_upscale(func): | |
@wraps(func) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Civitai click "Show more" | |
// @namespace w-e-w | |
// @version 1.4 | |
// @description Automatically click the "Show more" button and other specific buttons when they appear on the page | |
// @author https://github.com/w-e-w | |
// @match https://civitai.com/models/* | |
// @match https://civitai.com/images/* | |
// @icon https://civitai.com/favicon.ico | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modules import scripts | |
import gradio as gr | |
class DemoExt(scripts.Script): | |
def __init__(self): | |
super().__init__() | |
self.promp_elm = None | |
self.promp_n_elm = None | |
self.on_after_component_elem_id = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def parse_interval_rule(symbols, num): | |
match symbols: | |
case '[': | |
return lambda n: n >= num | |
case '(': | |
return lambda n: n > num | |
case ']': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import urllib.request | |
import base64 | |
import json | |
import time | |
import os | |
webui_server_url = 'http://127.0.0.1:7860' | |
out_dir = 'api_out' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pkg_resources import parse_version | |
from importlib.util import find_spec | |
from subprocess import check_output | |
from pathlib import Path | |
from os import environ | |
import re | |
def get_version_from_changelog(): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
character_translation_table = str.maketrans('"*/:<>?\\|\t\n\v\f\r', '"*/:<>?\│ ') | |
leading_space_pattern = re.compile(r'^\s+') | |
def replace_illegal_filename_characters(input_filename: str): | |
r""" | |
Replace illegal characters with full-width variant | |
Table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; modify version of https://github.com/AutoHotkey/AutoHotkeyUX/blob/988fc7e6f84635dc0eb8ebee679d6766f4e25e65/WindowSpy.ahk | |
; ahk_exe as Regex escape full path | |
; id of Control Under Mouse | |
; | |
; Window Spy for AHKv2 | |
; | |
#Requires AutoHotkey v2.0 | |
#NoTrayIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cd /d "%~dp0" | |
set PATH=%~dp0internal\git\cmd;%~dp0internal\python;%~dp0internal\python\Scripts;%PATH% | |
set TRANSFORMERS_CACHE=%~dp0internal\transformers-cache | |
if not exist "internal" mkdir "internal" | |
if not exist "internal\git" ( | |
if not exist "internal\cache_downloads" mkdir "internal\cache_downloads" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import pytz | |
import re | |
def replace_datetime(input_str: str, time_datetime: datetime.datetime = None): | |
""" | |
Args: | |
input_str (`str`): | |
the String to be Formatted |
NewerOlder