SYMBOL INDEX (9937 symbols across 1009 files) FILE: cli/api-checkpoint.py function auth (line 21) | def auth(): function get (line 27) | def get(endpoint: str, dct: dict = None): FILE: cli/api-control.py function auth (line 27) | def auth(): function post (line 33) | def post(endpoint: str, dct: dict = None): function encode (line 41) | def encode(f): function generate (line 53) | def generate(args): # pylint: disable=redefined-outer-name FILE: cli/api-detect.py function auth (line 20) | def auth(): function post (line 26) | def post(endpoint: str, dct: dict = None): function encode (line 34) | def encode(f): function detect (line 46) | def detect(args): # pylint: disable=redefined-outer-name FILE: cli/api-enhance.py function auth (line 21) | def auth(): function post (line 27) | def post(endpoint: str, dct: dict = None): function encode (line 35) | def encode(f): function enhance (line 51) | def enhance(args): # pylint: disable=redefined-outer-name FILE: cli/api-faceid.py function auth (line 26) | def auth(): function post (line 32) | def post(endpoint: str, dct: dict = None): function encode (line 40) | def encode(f): function generate (line 52) | def generate(args): # pylint: disable=redefined-outer-name FILE: cli/api-grid.py class Options (line 16) | class Options: # set default parameters here class Server (line 30) | class Server: # set server and save options here or use command line arg... function post (line 49) | def post(): function generate (line 61) | def generate(x: int, y: int): # pylint: disable=redefined-outer-name function merge (line 82) | def merge(images: list[Image.Image], horizontal: bool, labels: list[str]... function grid (line 102) | def grid(x_file: str, y_file: str): FILE: cli/api-img2img.py function auth (line 26) | def auth(): function post (line 32) | def post(endpoint: str, dct: dict = None): function encode (line 40) | def encode(f): function generate (line 52) | def generate(args): # pylint: disable=redefined-outer-name FILE: cli/api-info.py function auth (line 21) | def auth(): function get (line 27) | def get(endpoint: str, dct: dict = None): function post (line 35) | def post(endpoint: str, dct: dict = None): function info (line 43) | def info(args): # pylint: disable=redefined-outer-name FILE: cli/api-interrogate.py function decode (line 21) | def decode(encoding): function encode (line 27) | def encode(f): function print_summary (line 39) | def print_summary(): function interrogate (line 46) | async def interrogate(f): function main (line 87) | async def main(): FILE: cli/api-json.py function auth (line 25) | def auth(): function post (line 31) | def post(endpoint: str, payload: dict = None): FILE: cli/api-mask.py function auth (line 23) | def auth(): function get (line 29) | def get(endpoint: str, dct: dict = None): function post (line 37) | def post(endpoint: str, dct: dict = None): function info (line 45) | def info(args): # pylint: disable=redefined-outer-name FILE: cli/api-model.js function options (line 12) | async function options(data) { function main (line 22) | async function main() { FILE: cli/api-preprocess.py function auth (line 23) | def auth(): function get (line 29) | def get(endpoint: str, dct: dict = None): function post (line 37) | def post(endpoint: str, dct: dict = None): function info (line 45) | def info(args): # pylint: disable=redefined-outer-name FILE: cli/api-progress.py class Dot (line 14) | class Dot(dict): function progress (line 34) | def progress(): FILE: cli/api-pulid.js function b64 (line 15) | function b64(file) { function options (line 24) | function options() { function init (line 58) | function init() { function main (line 70) | async function main() { FILE: cli/api-txt2img.js function main (line 27) | async function main() { FILE: cli/api-txt2img.py function auth (line 25) | def auth(): function post (line 31) | def post(endpoint: str, dct: dict = None): function generate (line 39) | def generate(args): # pylint: disable=redefined-outer-name FILE: cli/api-upscale.py function auth (line 21) | def auth(): function get (line 27) | def get(endpoint: str, dct: dict = None): function post (line 35) | def post(endpoint: str, dct: dict = None): function encode (line 43) | def encode(f): function upscale (line 56) | def upscale(args): # pylint: disable=redefined-outer-name FILE: cli/api-vqa.py function auth (line 21) | def auth(): function get (line 27) | def get(endpoint: str, dct: dict = None): function post (line 35) | def post(endpoint: str, dct: dict = None): function info (line 43) | def info(args): # pylint: disable=redefined-outer-name FILE: cli/api-xyz.py function auth (line 27) | def auth(): function post (line 33) | def post(endpoint: str, dct: dict = None): function generate (line 41) | def generate(args): # pylint: disable=redefined-outer-name FILE: cli/api-xyzenum.py function auth (line 21) | def auth(): function get (line 27) | def get(endpoint: str, dct: dict = None): FILE: cli/civitai-search.py class ModelImage (line 18) | class ModelImage(): method __init__ (line 19) | def __init__(self, dct: dict): method __str__ (line 29) | def __str__(self): class ModelFile (line 33) | class ModelFile(): method __init__ (line 34) | def __init__(self, dct: dict): method __str__ (line 45) | def __str__(self): class ModelVersion (line 50) | class ModelVersion(): method __init__ (line 51) | def __init__(self, dct: dict): method __str__ (line 67) | def __str__(self): class Model (line 72) | class Model(): method __init__ (line 73) | def __init__(self, dct: dict): method __str__ (line 92) | def __str__(self): function search_civitai (line 96) | def search_civitai( function models_to_dct (line 167) | def models_to_dct(all_models:list, model_id:int=None): function print_models (line 184) | def print_models(models: list[Model]): FILE: cli/download-file.py function get_filename (line 20) | def get_filename(args, res): function download_requests (line 25) | def download_requests(args): function download_urllib (line 39) | def download_urllib(args): function download_urllib3 (line 58) | def download_urllib3(args): function download_httpx (line 76) | def download_httpx(args): FILE: cli/gen-styles.py function pil_to_b64 (line 27) | def pil_to_b64(img: Image, size: int, quality: int): function post (line 36) | def post(endpoint: str, dct: dict = None): FILE: cli/generate.py function grid (line 45) | def grid(data): function exif (line 63) | def exif(info, i = None, op = 'generate'): function randomize (line 83) | def randomize(lst): function prompt (line 90) | def prompt(params): # generate dynamic prompt or use one if provided function sampler (line 110) | def sampler(params, options): # find sampler function generate (line 123) | async def generate(prompt = None, options = None, quiet = False): # pyli... function upscale (line 158) | async def upscale(data): function init (line 175) | async def init(): function args (line 219) | def args(): # parse cmd arguments function main (line 321) | async def main(): FILE: cli/git-clone.py class GitRemoteProgress (line 8) | class GitRemoteProgress(git.RemoteProgress): method __init__ (line 12) | def __init__(self, url, folder) -> None: method __del__ (line 30) | def __del__(self) -> None: method get_curr_op (line 34) | def get_curr_op(cls, op_code: int) -> str: method update (line 38) | def update(self, op_code: int, cur_count: str | float, max_count: str ... function clone (line 47) | def clone(url: str, folder: str): FILE: cli/image-encode.py function encode (line 10) | def encode(file: str): FILE: cli/image-exif.py class Exif (line 21) | class Exif: # pylint: disable=single-string-used-for-slots method __init__ (line 23) | def __init__(self, image = None): method __getattr__ (line 31) | def __getattr__(self, attr): method load (line 36) | def load(self, img: Image): method decode (line 65) | def decode(self, s: bytes): method parse (line 84) | def parse(self): method get_bytes (line 89) | def get_bytes(self): function print_json (line 102) | def print_json(data): function read_exif (line 110) | def read_exif(filename: str): FILE: cli/image-grid.py function wrap (line 19) | def wrap(text: str, font: ImageFont.ImageFont, length: int): function grid (line 30) | def grid(images, labels = None, width = 0, height = 0, border = 0, squar... FILE: cli/image-palette.py function color_to_df (line 22) | def color_to_df(param): function palette (line 34) | def palette(img, params, output): FILE: cli/image-search.py class ImageDB (line 16) | class ImageDB: method __init__ (line 19) | def __init__(self, method __str__ (line 49) | def __str__(self): method init (line 52) | def init(self): # initialize models method load (line 65) | def load(self): # load db to disk method save (line 80) | def save(self): # save db to disk method normalize (line 90) | def normalize(self, embed) -> np.ndarray: # normalize embed before usi... method embedding (line 95) | def embedding(self, query: Union[PIL.Image.Image | str]) -> np.ndarray... method add (line 118) | def add(self, embed, filename=None, metadata=None): # add embed to db method search (line 126) | def search(self, filename: str = None, metadata: str = None, embed: np... method decode (line 151) | def decode(self, s: bytes): # decode byte-encoded exif metadata method metadata (line 167) | def metadata(self, image: PIL.Image.Image): # get exif metadata from i... method image (line 176) | def image(self, filename: str, image=None): # add file/image to db method folder (line 189) | def folder(self, folder: str): # add all files from folder to db method offload (line 201) | def offload(self): # offload model to cpu FILE: cli/image-watermark.py function get_exif (line 20) | def get_exif(image): function set_exif (line 40) | def set_exif(d: dict): function get_watermark (line 51) | def get_watermark(image, params): function set_watermark (line 59) | def set_watermark(image, params): function watermark (line 71) | def watermark(params, file): FILE: cli/install-stablefast.py function install_pip (line 14) | def install_pip(arg: str): function get_nightly (line 22) | def get_nightly(): function install_stable_fast (line 45) | def install_stable_fast(): FILE: cli/load-unet.py class StateDictStats (line 7) | class StateDictStats(): method __repr__ (line 15) | def __repr__(self): function set_module_tensor (line 19) | def set_module_tensor( function load_unet (line 50) | def load_unet(config_file: str, state_dict: dict, device: torch.device =... function load_safetensors (line 73) | def load_safetensors(fn: str): FILE: cli/localize.js function localize (line 28) | async function localize() { FILE: cli/model-keys.py function has (line 7) | def has(obj, attr, *args): function remove_entries_after_depth (line 16) | def remove_entries_after_depth(d, depth, current_depth=0): function list_to_dict (line 27) | def list_to_dict(flat_list): function list_compact (line 41) | def list_compact(flat_list): function guess_dct (line 51) | def guess_dct(dct: dict): function read_keys (line 69) | def read_keys(fn): function main (line 90) | def main(): FILE: cli/model-metadata.py function read_metadata (line 8) | def read_metadata(fn): function main (line 33) | def main(): FILE: cli/nvidia-smi.py function get_nvidia_smi (line 11) | def get_nvidia_smi(output='dict'): FILE: cli/process.py class Result (line 24) | class Result(): method __init__ (line 25) | def __init__(self, typ: str, fn: str, tag: str = None, requested: list... function detect_blur (line 39) | def detect_blur(image: Image): function detect_dynamicrange (line 53) | def detect_dynamicrange(image: Image): function detect_simmilar (line 72) | def detect_simmilar(image: Image): function segmentation (line 85) | def segmentation(res: Result): function unload (line 101) | def unload(): function encode (line 113) | def encode(img): function reset (line 121) | def reset(): function upscale_restore_image (line 129) | def upscale_restore_image(res: Result, upscale: bool = False, restore: b... function interrogate_image (line 154) | def interrogate_image(res: Result, tag: str = None): function resize_image (line 183) | def resize_image(res: Result): function square_image (line 191) | def square_image(res: Result): function process_face (line 200) | def process_face(res: Result): function process_body (line 224) | def process_body(res: Result): function process_original (line 246) | def process_original(res: Result): function save_image (line 251) | def save_image(res: Result, folder: str): function file (line 265) | def file(filename: str, folder: str, tag = None, requested = []): FILE: cli/run-benchmark.py function txt2img (line 22) | async def txt2img(): function memstats (line 50) | def memstats(): function gb (line 67) | def gb(val: float): function main (line 71) | async def main(): FILE: cli/sdapi.py class AnyThreadEventLoopPolicy (line 36) | class AnyThreadEventLoopPolicy(BaseThreadPolicy): method get_event_loop (line 37) | def get_event_loop(self) -> asyncio.AbstractEventLoop: function authsync (line 48) | def authsync(): function auth (line 54) | def auth(): function result (line 60) | async def result(req): function resultsync (line 79) | def resultsync(req: requests.Response): function get (line 96) | async def get(endpoint: str, json: dict = None): function getsync (line 108) | def getsync(endpoint: str, json: dict = None): function post (line 118) | async def post(endpoint: str, json: dict = None): function postsync (line 133) | def postsync(endpoint: str, json: dict = None): function interrupt (line 139) | async def interrupt(): function interruptsync (line 151) | def interruptsync(): function progress (line 162) | async def progress(): function progresssync (line 173) | def progresssync(): function get_log (line 179) | def get_log(): function get_info (line 186) | def get_info(): function options (line 195) | def options(): function shutdown (line 201) | def shutdown(): function session (line 208) | async def session(): function close (line 228) | async def close(): FILE: cli/search-docs.py class Page (line 12) | class Page(): method __init__ (line 13) | def __init__(self, fn, full: bool = True): method read (line 24) | def read(self, full: bool = True): method search (line 40) | def search(self, text): method get (line 82) | def get(self): method __str__ (line 91) | def __str__(self): class Pages (line 95) | class Pages(): method __init__ (line 96) | def __init__(self): method build (line 102) | def build(self, full: bool = True): method search (line 112) | def search(self, text: str, topk: int = 10, full: bool = True) -> list... FILE: cli/test-schedulers.py function test_scheduler (line 32) | def test_scheduler(name, scheduler_class, config): function run_tests (line 151) | def run_tests(): FILE: cli/test-tagger.py function find_test_image (line 49) | def find_test_image(): function create_test_image (line 58) | def create_test_image(): class TaggerTest (line 68) | class TaggerTest: method __init__ (line 71) | def __init__(self): method log_pass (line 77) | def log_pass(self, msg): method log_fail (line 81) | def log_fail(self, msg): method log_skip (line 85) | def log_skip(self, msg): method log_warn (line 89) | def log_warn(self, msg): method setup (line 93) | def setup(self): method cleanup (line 129) | def cleanup(self): method print_summary (line 143) | def print_summary(self): method test_onnx_providers (line 171) | def test_onnx_providers(self): method get_memory_stats (line 220) | def get_memory_stats(self): method test_memory_management (line 245) | def test_memory_management(self): method test_settings_exist (line 457) | def test_settings_exist(self): method test_parameter (line 489) | def test_parameter(self, param_name, test_func, waifudiffusion_support... method tag (line 521) | def tag(self, tagger, **kwargs): method test_threshold (line 533) | def test_threshold(self): method test_max_tags (line 560) | def test_max_tags(self): method test_use_spaces (line 582) | def test_use_spaces(self): method test_escape_brackets (line 613) | def test_escape_brackets(self): method test_sort_alpha (line 643) | def test_sort_alpha(self): method test_exclude_tags (line 667) | def test_exclude_tags(self): method test_show_scores (line 699) | def test_show_scores(self): method test_include_rating (line 731) | def test_include_rating(self): method test_character_threshold (line 764) | def test_character_threshold(self): method test_unified_interface (line 791) | def test_unified_interface(self): method run_all_tests (line 820) | def run_all_tests(self): FILE: cli/util.py function set_logfile (line 19) | def set_logfile(logfile): function safestring (line 28) | def safestring(text: str): function get_memory (line 36) | def get_memory(): class Map (line 73) | class Map(dict): # pylint: disable=C0205 method __init__ (line 75) | def __init__(self, *args, **kwargs): method __convert (line 92) | def __convert(self, v): method __getattr__ (line 98) | def __getattr__(self, attr): method __setattr__ (line 100) | def __setattr__(self, key, value): method __setitem__ (line 102) | def __setitem__(self, key, value): method __delattr__ (line 105) | def __delattr__(self, item): method __delitem__ (line 107) | def __delitem__(self, key): FILE: cli/video-extract.py function probe (line 14) | def probe(src: str): function extract (line 31) | def extract(src: str, dst: str, rate: float = 0.015, fps: float = 0, sta... FILE: cli/zluda-python.py class Interpreter (line 6) | class Interpreter: method __init__ (line 10) | def __init__(self, env_globals, env_locals): method execute (line 14) | def execute(self, s: str): method from_file (line 20) | def from_file(self, path): FILE: installer.py class Dot (line 17) | class Dot(dict): # dot notation access to dictionary attributes function get_console (line 88) | def get_console(): function get_log (line 92) | def get_log(): function str_to_bool (line 97) | def str_to_bool(val: str | bool) -> bool: ... function str_to_bool (line 99) | def str_to_bool(val: None) -> None: ... function str_to_bool (line 100) | def str_to_bool(val: str | bool | None) -> bool | None: function install_traceback (line 108) | def install_traceback(suppress: list = []): function setup_logging (line 131) | def setup_logging(): function get_logfile (line 312) | def get_logfile(): function custom_excepthook (line 318) | def custom_excepthook(exc_type, exc_value, exc_traceback): function print_dict (line 330) | def print_dict(d): function print_profile (line 336) | def print_profile(profiler: cProfile.Profile, msg: str): function package_version (line 342) | def package_version(package): function package_spec (line 352) | def package_spec(package): function installed (line 365) | def installed(package, friendly: str = None, reload = False, quiet = Fal... function uninstall (line 411) | def uninstall(package, quiet = False): function run (line 424) | def run(cmd: str, arg: str): function pip (line 434) | def pip(arg: str, ignore: bool = False, quiet: bool = True, uv = True): function install (line 471) | def install(package, friendly: str = None, ignore: bool = False, reinsta... function git (line 490) | def git(arg: str, folder: str = None, ignore: bool = False, optional: bo... function branch (line 521) | def branch(folder=None): function restart (line 552) | def restart(): function update (line 558) | def update(folder, keep_branch = False, rebase = True): function clone (line 586) | def clone(url, folder, commithash=None): function get_platform (line 606) | def get_platform(): function check_python (line 628) | def check_python(supported_minors=[], experimental_minors=[], reason=None): function check_diffusers (line 664) | def check_diffusers(): function check_transformers (line 689) | def check_transformers(): function check_onnx (line 716) | def check_onnx(): function install_cuda (line 727) | def install_cuda(): function install_rocm_zluda (line 738) | def install_rocm_zluda(): function install_ipex (line 856) | def install_ipex(): function install_openvino (line 871) | def install_openvino(): function install_torch_addons (line 889) | def install_torch_addons(): function check_cudnn (line 923) | def check_cudnn(): function check_torch (line 938) | def check_torch(): function check_modified_files (line 1074) | def check_modified_files(): function install_packages (line 1096) | def install_packages(): function run_extension_installer (line 1116) | def run_extension_installer(folder): function list_extensions_folder (line 1147) | def list_extensions_folder(folder, quiet=False): function install_extensions (line 1159) | def install_extensions(force=False): function install_submodules (line 1218) | def install_submodules(force=True): function reload (line 1251) | def reload(package, desired=None): function ensure_base_requirements (line 1265) | def ensure_base_requirements(): function install_gradio (line 1316) | def install_gradio(): function install_pydantic (line 1328) | def install_pydantic(): function install_opencv (line 1337) | def install_opencv(): function install_insightface (line 1344) | def install_insightface(): function install_optional (line 1355) | def install_optional(): function install_requirements (line 1385) | def install_requirements(): function set_environment (line 1420) | def set_environment(): function check_extensions (line 1468) | def check_extensions(): function get_version (line 1497) | def get_version(force=False): function check_ui (line 1557) | def check_ui(ver): function check_venv (line 1580) | def check_venv(): function check_version (line 1611) | def check_version(reset=True): # pylint: disable=unused-argument function update_wiki (line 1688) | def update_wiki(): function check_timestamp (line 1700) | def check_timestamp(): function add_args (line 1737) | def add_args(parser): function parse_args (line 1815) | def parse_args(parser): function extensions_preload (line 1828) | def extensions_preload(parser): function git_reset (line 1854) | def git_reset(folder='.'): function read_options (line 1874) | def read_options(): FILE: javascript/aspectRatioOverlay.js function dimensionChange (line 5) | function dimensionChange(e, is_width, is_height) { FILE: javascript/authWrap.js function getToken (line 4) | async function getToken() { function authFetch (line 17) | async function authFetch(url, options = {}) { FILE: javascript/changelog.js function getText (line 12) | function getText(el) { function changelogNavigate (line 22) | function changelogNavigate(found) { function initChangelog (line 60) | async function initChangelog() { FILE: javascript/civitai.js function clearModelDetails (line 15) | function clearModelDetails() { function modelCardClick (line 72) | async function modelCardClick(id) { function startCivitDownload (line 116) | function startCivitDownload(url, name, type) { function startCivitAllDownload (line 125) | function startCivitAllDownload(evt) { function downloadCivitModel (line 142) | function downloadCivitModel(modelUrl, modelName, modelType, modelPath, c... FILE: javascript/contextMenus.js function showContextMenu (line 7) | function showContextMenu(event, element, menuEntries) { function appendContextMenuOption (line 34) | function appendContextMenuOption(targetElementSelector, entryName, entry... function removeContextMenuOption (line 51) | function removeContextMenuOption(id) { function addContextMenuEventListener (line 61) | async function addContextMenuEventListener() { function initContextMenu (line 150) | async function initContextMenu() { FILE: javascript/control.js function controlInputMode (line 1) | function controlInputMode(inputMode, ...args) { function setupControlUI (line 19) | async function setupControlUI() { FILE: javascript/docs.js function clickGitHubWikiPage (line 4) | async function clickGitHubWikiPage(page) { function getGitHubWikiPage (line 11) | function getGitHubWikiPage() { function clickDocsPage (line 15) | async function clickDocsPage(page) { function getDocsPage (line 22) | function getDocsPage() { FILE: javascript/dragDrop.js function isValidImageList (line 1) | function isValidImageList(files) { function dropReplaceImage (line 5) | function dropReplaceImage(imgWrap, files) { FILE: javascript/editAttention.js function keyupEditAttention (line 1) | function keyupEditAttention(event) { FILE: javascript/exifr.js function h (line 1) | function h(e,t=l){if(s)try{return"function"==typeof require?Promise.reso... function f (line 1) | function f(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enume... function g (line 1) | function g(e){return void 0===e||(e instanceof Map?0===e.size:0===Object... function m (line 1) | function m(e){let t=new Error(e);throw delete t.stack,t} function S (line 1) | function S(e){return""===(e=function(e){for(;e.endsWith("\0");)e=e.slice... function C (line 1) | function C(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024)... function P (line 1) | function P(e){return b?b.decode(e):o?Buffer.from(e).toString("utf8"):dec... class I (line 1) | class I{static from(e,t){return e instanceof this&&e.le===t?e:new I(e,vo... method from (line 1) | static from(e,t){return e instanceof this&&e.le===t?e:new I(e,void 0,v... method constructor (line 1) | constructor(e,t=0,i,n){if("boolean"==typeof n&&(this.le=n),Array.isArr... method _swapArrayBuffer (line 1) | _swapArrayBuffer(e){this._swapDataView(new DataView(e))} method _swapBuffer (line 1) | _swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e... method _swapDataView (line 1) | _swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=... method _lengthToEnd (line 1) | _lengthToEnd(e){return this.byteLength-e} method set (line 1) | set(e,t,i=I){return e instanceof DataView||e instanceof I?e=new Uint8A... method subarray (line 1) | subarray(e,t){return t=t||this._lengthToEnd(e),new I(this,e,t)} method toUint8 (line 1) | toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteL... method getUint8Array (line 1) | getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e... method getString (line 1) | getString(e=0,t=this.byteLength){return P(this.getUint8Array(e,t))} method getLatin1String (line 1) | getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);r... method getUnicodeString (line 1) | getUnicodeString(e=0,t=this.byteLength){const i=[];for(let n=0;n1e4?R(e,t,"bas... function M (line 1) | async function M(e,t,i,n){return D.has(i)?R(e,t,i):n?async function(e,t)... function R (line 1) | async function R(e,t,i){let n=new(D.get(i))(e,t);return await n.read(),n} class F (line 1) | class F extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Arr... method tagKeys (line 1) | get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys(... method tagValues (line 1) | get tagValues(){return this.allValues||(this.allValues=Array.from(this... function B (line 1) | function B(e,t,i){let n=new F;for(let[e,t]of i)n.set(e,t);if(Array.isArr... function E (line 1) | function E(e,t,i){let n,s=e.get(t);for(n of i)s.set(n[0],n[1])} class ne (line 1) | class ne{get translate(){return this.translateKeys||this.translateValues... method translate (line 1) | get translate(){return this.translateKeys||this.translateValues||this.... class se (line 1) | class se extends ne{get needed(){return this.enabled||this.deps.size>0}c... method needed (line 1) | get needed(){return this.enabled||this.deps.size>0} method constructor (line 1) | constructor(e,t,i,n){if(super(),f(this,"enabled",!1),f(this,"skip",new... method applyInheritables (line 1) | applyInheritables(e){let t,i;for(t of te)i=e[t],void 0!==i&&(this[t]=i)} method translateTagSet (line 1) | translateTagSet(e,t){if(this.dict){let i,n,{tagKeys:s,tagValues:r}=thi... method finalizeFilters (line 1) | finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,ue(... class oe (line 1) | class oe extends ne{static useCached(e){let t=ae.get(e);return void 0!==... method useCached (line 1) | static useCached(e){let t=ae.get(e);return void 0!==t||(t=new this(e),... method constructor (line 1) | constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.set... method setupFromUndefined (line 1) | setupFromUndefined(){let e;for(e of $)this[e]=re[e];for(e of ie)this[e... method setupFromTrue (line 1) | setupFromTrue(){let e;for(e of $)this[e]=re[e];for(e of ie)this[e]=re[... method setupFromArray (line 1) | setupFromArray(e){let t;for(t of $)this[t]=re[t];for(t of ie)this[t]=r... method setupFromObject (line 1) | setupFromObject(e){let t;for(t of(Q.ifd0=Q.ifd0||Q.image,Q.ifd1=Q.ifd1... method batchEnableWithBool (line 1) | batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t} method batchEnableWithUserValue (line 1) | batchEnableWithUserValue(e,t){for(let i of e){let e=t[i];this[i].enabl... method setupGlobalFilters (line 1) | setupGlobalFilters(e,t,i,n=i){if(e&&e.length){for(let e of n)this[e].e... method filterNestedSegmentTags (line 1) | filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:n,icc:s}=this;t... method traverseTiffDependencyTree (line 1) | traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:n}=this;n... method onlyTiff (line 1) | get onlyTiff(){return!J.map((e=>this[e].enabled)).some((e=>!0===e))&&t... method checkLoadedPlugins (line 1) | checkLoadedPlugins(){for(let e of q)this[e].enabled&&!A.has(e)&&k("seg... function le (line 1) | function le(e,t){let i,n,s,r,a=[];for(s of t){for(r of(i=N.get(s),n=[],i... function he (line 1) | function he(e,t){return void 0!==e?e:void 0!==t?t:void 0} function ue (line 1) | function ue(e,t){for(let i of t)e.add(i)} class ce (line 1) | class ce{constructor(e){f(this,"parsers",{}),f(this,"output",{}),f(this,... method constructor (line 1) | constructor(e){f(this,"parsers",{}),f(this,"output",{}),f(this,"errors... method read (line 1) | async read(e){this.file=await x(e,this.options)} method setup (line 1) | setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);fo... method parse (line 1) | async parse(){let{output:e,errors:t}=this;return this.setup(),this.opt... method executeParsers (line 1) | async executeParsers(){let{output:e}=this;await this.fileParser.parse(... method extractThumbnail (line 1) | async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=A.g... function fe (line 1) | async function fe(e,t){let i=new ce(t);return await i.read(e),i.parse()} class pe (line 1) | class pe{constructor(e,t,i){f(this,"errors",[]),f(this,"ensureSegmentChu... method constructor (line 1) | constructor(e,t,i){f(this,"errors",[]),f(this,"ensureSegmentChunk",(as... method injectSegment (line 1) | injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)} method createParser (line 1) | createParser(e,t){let i=new(A.get(e))(t,this.options,this.file);return... method createParsers (line 1) | createParsers(e){for(let t of e){let{type:e,chunk:i}=t,n=this.options[... method readSegments (line 1) | async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promi... class ge (line 1) | class ge{static findPosition(e,t){let i=e.getUint16(t+2)+2,n="function"=... method findPosition (line 1) | static findPosition(e,t){let i=e.getUint16(t+2)+2,n="function"==typeof... method parse (line 1) | static parse(e,t={}){return new this(e,new oe({[this.type]:t}),e).pars... method normalizeInput (line 1) | normalizeInput(e){return e instanceof I?e:new I(e)} method constructor (line 1) | constructor(e,t={},i){f(this,"errors",[]),f(this,"raw",new Map),f(this... method translate (line 1) | translate(){this.canTranslate&&(this.translated=this.translateBlock(th... method output (line 1) | get output(){return this.translated?this.translated:this.raw?Object.fr... method translateBlock (line 1) | translateBlock(e,t){let i=V.get(t),n=G.get(t),s=N.get(t),r=this.option... method translateValue (line 1) | translateValue(e,t){return t[e]||t.DEFAULT||e} method assignToOutput (line 1) | assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)} method assignObjectToOutput (line 1) | assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return O... function me (line 1) | function me(e){return 192===e||194===e||196===e||219===e||221===e||218==... function Se (line 1) | function Se(e){return e>=224&&e<=239} function Ce (line 1) | function Ce(e,t,i){for(let[n,s]of A)if(s.canHandle(e,t,i))return n} class ye (line 1) | class ye extends pe{constructor(...e){super(...e),f(this,"appSegments",[... method constructor (line 1) | constructor(...e){super(...e),f(this,"appSegments",[]),f(this,"jpegSeg... method canHandle (line 1) | static canHandle(e,t){return 65496===t} method parse (line 1) | async parse(){await this.findAppSegments(),await this.readSegments(thi... method setupSegmentFinderArgs (line 1) | setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(... method findAppSegments (line 1) | async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:i... method findAppSegmentsInRange (line 1) | findAppSegmentsInRange(e,t){t-=2;let i,n,s,r,a,o,{file:l,findAll:h,wan... method mergeMultiSegments (line 1) | mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))re... method getSegment (line 1) | getSegment(e){return this.appSegments.find((t=>t.type===e))} method getOrFindSegment (line 1) | async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&... class Pe (line 1) | class Pe extends ge{parseHeader(){var e=this.chunk.getUint16();18761===e... method parseHeader (line 1) | parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789=... method parseTags (line 1) | parseTags(e,t,i=new Map){let{pick:n,skip:s}=this.options[t];n=new Set(... method parseTag (line 1) | parseTag(e,t,i){let{chunk:n}=this,s=n.getUint16(e+2),r=n.getUint32(e+4... method parseTagValue (line 1) | parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint... class Ie (line 1) | class Ie extends Pe{static canHandle(e,t){return 225===e.getUint8(t+1)&&... method canHandle (line 1) | static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.get... method parse (line 1) | async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.ena... method safeParse (line 1) | safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.... method findIfd0Offset (line 1) | findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk... method findIfd1Offset (line 1) | findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();le... method parseBlock (line 1) | parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i} method parseIfd0Block (line 1) | async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findI... method parseExifBlock (line 1) | async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.pa... method unpack (line 1) | unpack(e,t){let i=e.get(t);i&&1===i.length&&e.set(t,i[0])} method parseGpsBlock (line 1) | async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.pars... method parseInteropBlock (line 1) | async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.par... method parseThumbnailBlock (line 1) | async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!thi... method extractThumbnail (line 1) | async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this... method image (line 1) | get image(){return this.ifd0} method thumbnail (line 1) | get thumbnail(){return this.ifd1} method createOutput (line 1) | createOutput(){let e,t,i,n={};for(t of Q)if(e=this[t],!g(e))if(i=this.... method assignToOutput (line 1) | assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,... function ke (line 1) | function ke(e,t,i,n){var s=e+t/60+i/3600;return"S"!==n&&"W"!==n||(s*=-1),s} function De (line 1) | async function De(e){let t=new ce(Ae);await t.read(e);let i=await t.pars... function xe (line 1) | async function xe(e){let t=new ce(Oe);await t.read(e);let i=await t.extr... function ve (line 1) | async function ve(e){let t=await this.thumbnail(e);if(void 0!==t){let e=... function Re (line 1) | async function Re(e){let t=new ce(Me);await t.read(e);let i=await t.pars... function Ue (line 1) | async function Ue(t){let i=await Re(t);return Object.assign({canvas:e.ro... class Fe (line 1) | class Fe extends I{constructor(...e){super(...e),f(this,"ranges",new Be)... method constructor (line 1) | constructor(...e){super(...e),f(this,"ranges",new Be),0!==this.byteLen... method _tryExtend (line 1) | _tryExtend(e,t,i){if(0===e&&0===this.byteLength&&i){let e=new DataView... method _extend (line 1) | _extend(e){let t;t=o?r.allocUnsafe(e):new Uint8Array(e);let i=new Data... method subarray (line 1) | subarray(e,t,i=!1){return t=t||this._lengthToEnd(e),i&&this._tryExtend... method set (line 1) | set(e,t,i=!1){i&&this._tryExtend(t,e.byteLength,e);let n=super.set(e,t... method ensureChunk (line 1) | async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||awai... method available (line 1) | available(e,t){return this.ranges.available(e,t)} class Be (line 1) | class Be{constructor(){f(this,"list",[])}get length(){return this.list.l... method constructor (line 1) | constructor(){f(this,"list",[])} method length (line 1) | get length(){return this.list.length} method add (line 1) | add(e,t,i=0){let n=e+t,s=this.list.filter((t=>Ee(e,t.offset,n)||Ee(e,t... method available (line 1) | available(e,t){let i=e+t;return this.list.some((t=>t.offset<=e&&i<=t.e... function Ee (line 1) | function Ee(e,t,i){return e<=t&&t<=i} class Ne (line 1) | class Ne extends Fe{constructor(e,t){super(0),f(this,"chunksRead",0),thi... method constructor (line 1) | constructor(e,t){super(0),f(this,"chunksRead",0),this.input=e,this.opt... method readWhole (line 1) | async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkO... method readChunked (line 1) | async readChunked(){this.chunked=!0,await this.readChunk(0,this.option... method readNextChunk (line 1) | async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return t... method readChunk (line 1) | async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(... method safeWrapAddress (line 1) | safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max... method nextChunkOffset (line 1) | get nextChunkOffset(){if(0!==this.ranges.list.length)return this.range... method canReadNextChunk (line 1) | get canReadNextChunk(){return this.chunksRead50)r... method parse (line 1) | async parse(){let e=this.file.getUint32(0),t=this.parseBoxHead(e);for(... method registerSegment (line 1) | async registerSegment(e,t,i){await this.file.ensureChunk(t,i);let n=th... method findIcc (line 1) | async findIcc(e){let t=this.findBox(e,"iprp");if(void 0===t)return;let... method findExif (line 1) | async findExif(e){let t=this.findBox(e,"iinf");if(void 0===t)return;le... method findExifLocIdInIinf (line 1) | findExifLocIdInIinf(e){this.parseBoxFullHead(e);let t,i,n,s,r=e.start,... method get8bits (line 1) | get8bits(e){let t=this.file.getUint8(e);return[t>>4,15&t]} method findExtentInIloc (line 1) | findExtentInIloc(e,t){this.parseBoxFullHead(e);let i=e.start,[n,s]=thi... class He (line 1) | class He extends ze{} class je (line 1) | class je extends ze{} function _e (line 1) | function _e(e){return"object"==typeof e&&void 0!==e.length?e[0]:e} function Ye (line 1) | function Ye(e){let t=Array.from(e).slice(1);return t[1]>15&&(t=t.map((e=... function $e (line 1) | function $e(e){if("string"==typeof e){var[t,i,n,s,r,a]=e.trim().split(/[... function Je (line 1) | function Je(e){if("string"==typeof e)return e;let t=[];if(0===e[1]&&0===... function qe (line 1) | function qe(e,t){return e<<8|t} class et (line 1) | class et extends ge{static canHandle(e,t){return 225===e.getUint8(t+1)&&... method canHandle (line 1) | static canHandle(e,t){return 225===e.getUint8(t+1)&&1752462448===e.get... method headerLength (line 1) | static headerLength(e,t){return e.getString(t+4,Ze.length)===Ze?79:4+"... method findPosition (line 1) | static findPosition(e,t){let i=super.findPosition(e,t);return i.multiS... method handleMultiSegments (line 1) | static handleMultiSegments(e){return e.map((e=>e.chunk.getString())).j... method normalizeInput (line 1) | normalizeInput(e){return"string"==typeof e?e:I.from(e).getString()} method parse (line 1) | parse(e=this.chunk){if(!this.localOptions.parse)return e;e=function(e)... method assignToOutput (line 1) | assignToOutput(e,t){if(this.localOptions.parse)for(let[i,n]of Object.e... class tt (line 1) | class tt{static findAll(e){return lt(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=... method findAll (line 1) | static findAll(e){return lt(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*... method unpackMatch (line 1) | static unpackMatch(e){let t=e[1],i=e[2],n=e[3].slice(1,-1);return n=ht... method constructor (line 1) | constructor(e,t,i){this.ns=e,this.name=t,this.value=i} method serialize (line 1) | serialize(){return this.value} class nt (line 1) | class nt{static findAll(e,t,i){if(void 0!==t||void 0!==i){t=t||it,i=i||i... method findAll (line 1) | static findAll(e,t,i){if(void 0!==t||void 0!==i){t=t||it,i=i||it;var n... method unpackMatch (line 1) | static unpackMatch(e){let t=e[1],i=e[2],n=e[4],s=e[8];return new nt(t,... method constructor (line 1) | constructor(e,t,i,n){this.ns=e,this.name=t,this.attrString=i,this.inne... method isPrimitive (line 1) | get isPrimitive(){return void 0!==this.value&&0===this.attrs.length&&0... method isListContainer (line 1) | get isListContainer(){return 1===this.children.length&&this.children[0... method isList (line 1) | get isList(){let{ns:e,name:t}=this;return"rdf"===e&&("Seq"===t||"Bag"=... method isListItem (line 1) | get isListItem(){return"rdf"===this.ns&&"li"===this.name} method serialize (line 1) | serialize(){if(0===this.properties.length&&void 0===this.value)return;... function st (line 1) | function st(e,t){let i=e.serialize();void 0!==i&&(t[e.name]=i)} function lt (line 1) | function lt(e,t){let i,n=[];if(!e)return n;for(;null!==(i=t.exec(e));)n.... function ht (line 1) | function ht(e){if(function(e){return null==e||"null"===e||"undefined"===... method rotateCanvas (line 1) | get rotateCanvas(){return e.rotateCanvas} method rotateCss (line 1) | get rotateCss(){return e.rotateCss} function gt (line 1) | async function gt(e,t,i){let n=i[e];return n.enabled=!0,n.parse=!0,A.get... method readWhole (line 1) | async readWhole(){this.chunked=!1,this.fs=await mt;let e=await this.fs.r... method readChunked (line 1) | async readChunked(){this.chunked=!0,this.fs=await mt,await this.open(),a... method open (line 1) | async open(){void 0===this.fh&&(this.fh=await this.fs.open(this.input,"r... method _readChunk (line 1) | async _readChunk(e,t){void 0===this.fh&&await this.open(),e+t>this.size&... method close (line 1) | async close(){if(this.fh){let e=this.fh;this.fh=void 0,await e.close()}} method constructor (line 1) | constructor(...e){super(...e),this.input=this.input.replace(/^data:([^;]... method _readChunk (line 1) | async _readChunk(e,t){let i,n,s=this.input;void 0===e?(e=0,i=0,n=0):(i=4... class St (line 1) | class St extends pe{static canHandle(e,t){return 18761===t||19789===t}ex... method canHandle (line 1) | static canHandle(e,t){return 18761===t||19789===t} method extendOptions (line 1) | extendOptions(e){let{ifd0:t,xmp:i,iptc:n,icc:s}=e;i.enabled&&t.deps.ad... method parse (line 1) | async parse(){let{tiff:e,xmp:t,iptc:i,icc:n}=this.options;if(e.enabled... method adaptTiffPropAsSegment (line 1) | adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.... class Tt (line 1) | class Tt extends pe{constructor(...e){super(...e),f(this,"catchError",(e... method constructor (line 1) | constructor(...e){super(...e),f(this,"catchError",(e=>this.errors.push... method canHandle (line 1) | static canHandle(e,t){return 35152===t&&2303741511===e.getUint32(0)&&2... method parse (line 1) | async parse(){let{file:e}=this;await this.findPngChunksInRange("‰PNG\r... method findPngChunksInRange (line 1) | async findPngChunksInRange(e,t){let{file:i}=this;for(;ee.type===It));for(l... method injectKeyValToIhdr (line 1) | injectKeyValToIhdr(e,t){let i=this.parsers.ihdr;i&&i.raw.set(e,t)} method findIhdr (line 1) | findIhdr(){let e=this.metaChunks.find((e=>e.type===bt));e&&!1!==this.o... method findExif (line 1) | async findExif(){let e=this.metaChunks.find((e=>"exif"===e.type));e&&t... method findXmp (line 1) | async findXmp(){let e=this.metaChunks.filter((e=>e.type===kt));for(let... method findIcc (line 1) | async findIcc(){let e=this.metaChunks.find((e=>e.type===Pt));if(!e)ret... class Dt (line 1) | class Dt extends ge{static canHandle(e,t){return 224===e.getUint8(t+1)&&... method canHandle (line 1) | static canHandle(e,t){return 224===e.getUint8(t+1)&&1246120262===e.get... method parse (line 1) | parse(){return this.parseTags(),this.translate(),this.output} method parseTags (line 1) | parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chun... class Ot (line 1) | class Ot extends ge{parse(){return this.parseTags(),this.translate(),thi... method parse (line 1) | parse(){return this.parseTags(),this.translate(),this.output} method parseTags (line 1) | parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chun... class vt (line 1) | class vt extends ge{static canHandle(e,t){return 226===e.getUint8(t+1)&&... method canHandle (line 1) | static canHandle(e,t){return 226===e.getUint8(t+1)&&1229144927===e.get... method findPosition (line 1) | static findPosition(e,t){let i=super.findPosition(e,t);return i.chunkN... method handleMultiSegments (line 1) | static handleMultiSegments(e){return function(e){let t=function(e){let... method parse (line 1) | parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),th... method parseHeader (line 1) | parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&m("ICC header ... method parseTags (line 1) | parseTags(){let e,t,i,n,s,{raw:r}=this,a=this.chunk.getUint32(128),o=1... method parseTag (line 1) | parseTag(e,t,i){switch(e){case"desc":return this.parseDesc(t);case"mlu... method parseDesc (line 1) | parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return S(this.chunk.get... method parseText (line 1) | parseText(e,t){return S(this.chunk.getString(e+8,t-8))} method parseSig (line 1) | parseSig(e){return S(this.chunk.getString(e+8,4))} method parseMluc (line 1) | parseMluc(e){let{chunk:t}=this,i=t.getUint32(e+8),n=t.getUint32(e+12),... method translateValue (line 1) | translateValue(e,t){return"string"==typeof e?t[e]||t[e.toLowerCase()]|... function Rt (line 1) | function Rt(e,t){return S(e.getString(t,4))} class Ft (line 1) | class Ft extends ge{static canHandle(e,t,i){return 237===e.getUint8(t+1)... method canHandle (line 1) | static canHandle(e,t,i){return 237===e.getUint8(t+1)&&"Photoshop"===e.... method headerLength (line 1) | static headerLength(e,t,i){let n,s=this.containsIptc8bim(e,t,i);if(voi... method containsIptc8bim (line 1) | static containsIptc8bim(e,t,i){for(let n=0;n dict: function get_loras (line 13) | def get_loras(): function post_refresh_loras (line 20) | def post_refresh_loras(): function register_api (line 25) | def register_api(): FILE: modules/api/middleware.py function setup_middleware (line 27) | def setup_middleware(app: FastAPI, cmd_opts): FILE: modules/api/mime.py function register (line 4) | def register(): FILE: modules/api/models.py class ModelDef (line 16) | class ModelDef(BaseModel): class DummyConfig (line 24) | class DummyConfig: class PydanticModelGenerator (line 32) | class PydanticModelGenerator: method __init__ (line 33) | def __init__( method generate_model (line 75) | def generate_model(self): class ItemSampler (line 87) | class ItemSampler(BaseModel): class ItemVae (line 91) | class ItemVae(BaseModel): class ItemUpscaler (line 95) | class ItemUpscaler(BaseModel): class ItemModel (line 102) | class ItemModel(BaseModel): class ItemHypernetwork (line 111) | class ItemHypernetwork(BaseModel): class ItemDetailer (line 115) | class ItemDetailer(BaseModel): class ItemGAN (line 119) | class ItemGAN(BaseModel): class ItemStyle (line 124) | class ItemStyle(BaseModel): class ItemExtraNetwork (line 132) | class ItemExtraNetwork(BaseModel): class ItemArtist (line 141) | class ItemArtist(BaseModel): class ItemEmbedding (line 146) | class ItemEmbedding(BaseModel): class ItemIPAdapter (line 153) | class ItemIPAdapter(BaseModel): class ItemFace (line 162) | class ItemFace(BaseModel): class ScriptArg (line 178) | class ScriptArg(BaseModel): class ItemScript (line 186) | class ItemScript(BaseModel): class ItemExtension (line 192) | class ItemExtension(BaseModel): class ItemScheduler (line 201) | class ItemScheduler(BaseModel): class ResTxt2Img (line 229) | class ResTxt2Img(BaseModel): class ResImg2Img (line 259) | class ResImg2Img(BaseModel): class FileData (line 264) | class FileData(BaseModel): class ReqProcess (line 268) | class ReqProcess(BaseModel): class ResProcess (line 282) | class ResProcess(BaseModel): class ReqPromptEnhance (line 286) | class ReqPromptEnhance(BaseModel): class ResPromptEnhance (line 295) | class ResPromptEnhance(BaseModel): class ReqProcessImage (line 299) | class ReqProcessImage(ReqProcess): class ResProcessImage (line 302) | class ResProcessImage(ResProcess): class ReqProcessBatch (line 305) | class ReqProcessBatch(ReqProcess): class ResProcessBatch (line 308) | class ResProcessBatch(ResProcess): class ReqImageInfo (line 311) | class ReqImageInfo(BaseModel): class ResImageInfo (line 314) | class ResImageInfo(BaseModel): class ReqGetLog (line 319) | class ReqGetLog(BaseModel): class ReqPostLog (line 324) | class ReqPostLog(BaseModel): class ReqHistory (line 329) | class ReqHistory(BaseModel): class ReqProgress (line 332) | class ReqProgress(BaseModel): class ResProgress (line 335) | class ResProgress(BaseModel): class ResHistory (line 343) | class ResHistory(BaseModel): class ResStatus (line 351) | class ResStatus(BaseModel): class ReqInterrogate (line 368) | class ReqInterrogate(BaseModel): class ResInterrogate (line 375) | class ResInterrogate(BaseModel): class ReqVQA (line 383) | class ReqVQA(BaseModel): class ReqLatentHistory (line 389) | class ReqLatentHistory(BaseModel): class ResVQA (line 392) | class ResVQA(BaseModel): class ResTrain (line 395) | class ResTrain(BaseModel): class ResCreate (line 398) | class ResCreate(BaseModel): class ResPreprocess (line 401) | class ResPreprocess(BaseModel): class ResEmbeddings (line 429) | class ResEmbeddings(BaseModel): class ResMemory (line 433) | class ResMemory(BaseModel): class ResScripts (line 437) | class ResScripts(BaseModel): class ResGPU (line 442) | class ResGPU(BaseModel): # definition of http response function create_model_from_signature (line 449) | def create_model_from_signature(func: Callable, model_name: str, base_mo... FILE: modules/api/nudenet.py function nudenet_censor (line 5) | def nudenet_censor( function prompt_check (line 25) | def prompt_check( function image_guard (line 40) | def image_guard( function banned_words (line 50) | def banned_words( function register_api (line 59) | def register_api(): FILE: modules/api/nvml.py function install (line 4) | def install(*args, **kwargs): # pylint: disable=unused-argument function warn_once (line 14) | def warn_once(msg): function get_reason (line 20) | def get_reason(val): function get_nvml (line 36) | def get_nvml(): FILE: modules/api/process.py class ReqPreprocess (line 15) | class ReqPreprocess(BaseModel): class ResPreprocess (line 20) | class ResPreprocess(BaseModel): class ReqMask (line 24) | class ReqMask(BaseModel): class ReqFace (line 31) | class ReqFace(BaseModel): class ResFace (line 35) | class ResFace(BaseModel): class ResMask (line 42) | class ResMask(BaseModel): class ItemPreprocess (line 45) | class ItemPreprocess(BaseModel): class ItemMask (line 49) | class ItemMask(BaseModel): class APIProcess (line 56) | class APIProcess(): method __init__ (line 57) | def __init__(self, queue_lock: Lock): method get_preprocess (line 60) | def get_preprocess(self): method post_preprocess (line 67) | def post_preprocess(self, req: ReqPreprocess): method get_mask (line 86) | def get_mask(self): method post_mask (line 90) | def post_mask(self, req: ReqMask): method post_detect (line 115) | def post_detect(self, req: ReqFace): method post_prompt_enhance (line 135) | def post_prompt_enhance(self, req: models.ReqPromptEnhance): method set_upscalers (line 179) | def set_upscalers(self, req: dict): method extras_single_image_api (line 185) | def extras_single_image_api(self, req: models.ReqProcessImage): method extras_batch_images_api (line 192) | def extras_batch_images_api(self, req: models.ReqProcessBatch): FILE: modules/api/rocm_smi.py class ThrottleStatus (line 21) | class ThrottleStatus(IntFlag): method active (line 58) | def active(self): method __iter__ (line 62) | def __iter__(self): method __str__ (line 65) | def __str__(self): function get_rocm_smi (line 69) | def get_rocm_smi(): FILE: modules/api/script.py function script_name_to_index (line 9) | def script_name_to_index(name, scripts_list): function get_selectable_script (line 22) | def get_selectable_script(script_name, script_runner): function get_scripts_list (line 32) | def get_scripts_list(): function get_script_info (line 39) | def get_script_info(script_name: Optional[str] = None): function get_script (line 48) | def get_script(script_name, script_runner): function init_default_script_args (line 57) | def init_default_script_args(script_runner): function init_script_args (line 80) | def init_script_args(p, request, default_script_args, selectable_scripts... FILE: modules/api/server.py function post_shutdown (line 11) | def post_shutdown(): function get_js (line 16) | def get_js(request: Request): function get_motd (line 42) | def get_motd(): function get_version (line 61) | def get_version(): function get_platform (line 64) | def get_platform(): function get_log (line 69) | def get_log(req: models.ReqGetLog = Depends()): function post_log (line 75) | def post_log(req: models.ReqPostLog): function get_config (line 85) | def get_config(): function set_config (line 98) | def set_config(req: dict[str, Any]): function get_cmd_flags (line 105) | def get_cmd_flags(): function get_history (line 108) | def get_history(req: models.ReqHistory = Depends()): function get_progress (line 116) | def get_progress(req: models.ReqProgress = Depends()): function get_status (line 140) | def get_status(): function post_interrupt (line 143) | def post_interrupt(): function post_skip (line 147) | def post_skip(): function get_memory (line 150) | def get_memory(): FILE: modules/api/xpu_smi.py function get_xpu_smi (line 8) | def get_xpu_smi(): FILE: modules/api/xyz_grid.py function xyz_grid_enum (line 4) | def xyz_grid_enum(option: str = "") -> List[dict]: function register_api (line 24) | def register_api(): FILE: modules/attention.py function set_dynamic_attention (line 9) | def set_dynamic_attention(): function set_triton_flash_attention (line 20) | def set_triton_flash_attention(backend: str): function set_flex_attention (line 51) | def set_flex_attention(): function set_ck_flash_attention (line 87) | def set_ck_flash_attention(backend: str, device: torch.device): function set_sage_attention (line 129) | def set_sage_attention(backend: str, device: torch.device): function set_diffusers_attention (line 183) | def set_diffusers_attention(pipe, quiet:bool=False): FILE: modules/ben2/__init__.py function remove (line 4) | def remove(image, refine: bool = True): FILE: modules/ben2/ben2_model.py class Mlp (line 17) | class Mlp(nn.Module): method __init__ (line 20) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 29) | def forward(self, x): function window_partition (line 38) | def window_partition(x, window_size): function window_reverse (line 52) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 68) | class WindowAttention(nn.Module): method __init__ (line 81) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 115) | def forward(self, x, mask=None): class SwinTransformerBlock (line 149) | class SwinTransformerBlock(nn.Module): method __init__ (line 166) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 190) | def forward(self, x, mask_matrix): class PatchMerging (line 249) | class PatchMerging(nn.Module): method __init__ (line 255) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 261) | def forward(self, x, H, W): class BasicLayer (line 290) | class BasicLayer(nn.Module): method __init__ (line 308) | def __init__(self, method forward (line 350) | def forward(self, x, H, W): class PatchEmbed (line 392) | class PatchEmbed(nn.Module): method __init__ (line 401) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 415) | def forward(self, x): class SwinTransformer (line 434) | class SwinTransformer(nn.Module): method __init__ (line 462) | def __init__(self, method _freeze_stages (line 541) | def _freeze_stages(self): method forward (line 559) | def forward(self, x): function get_activation_fn (line 597) | def get_activation_fn(activation): function make_cbr (line 605) | def make_cbr(in_dim, out_dim): function make_cbg (line 609) | def make_cbg(in_dim, out_dim): function rescale_to (line 613) | def rescale_to(x, scale_factor: float = 2, interpolation='nearest'): function resize_as (line 617) | def resize_as(x, y, interpolation='bilinear'): function image2patches (line 621) | def image2patches(x): function patches2image (line 627) | def patches2image(x): class PositionEmbeddingSine (line 634) | class PositionEmbeddingSine: method __init__ (line 635) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method __call__ (line 647) | def __call__(self, b, h, w): class MCLM (line 670) | class MCLM(nn.Module): method __init__ (line 671) | def __init__(self, d_model, num_heads, pool_ratios=[1, 4, 8]): method forward (line 696) | def forward(self, l, g): class MCRM (line 762) | class MCRM(nn.Module): method __init__ (line 763) | def __init__(self, d_model, num_heads, pool_ratios=[4, 8, 16], h=None)... method forward (line 783) | def forward(self, x): class BEN_Base (line 821) | class BEN_Base(nn.Module): method __init__ (line 822) | def __init__(self): method forward (line 871) | def forward(self, x): method loadcheckpoints (line 940) | def loadcheckpoints(self,model_path): method inference (line 945) | def inference(self,image,refine_foreground=False): method segment_video (line 1009) | def segment_video(self, video_path, output_path="./", fps=0, refine_fo... function rgb_loader_refiner (line 1118) | def rgb_loader_refiner( original_image): function pil_images_to_mp4 (line 1143) | def pil_images_to_mp4(images, output_path, fps=24, rgb_value=(0, 255, 0)): function pil_images_to_webm_alpha (line 1177) | def pil_images_to_webm_alpha(images, output_path, fps=30): function add_audio_to_video (line 1216) | def add_audio_to_video(video_without_audio_path, original_video_path, ou... function refine_foreground_process (line 1250) | def refine_foreground_process(image, mask, r=90): function FB_blur_fusion_foreground_estimator_2 (line 1260) | def FB_blur_fusion_foreground_estimator_2(image, alpha, r=90): function FB_blur_fusion_foreground_estimator (line 1267) | def FB_blur_fusion_foreground_estimator(image, F, B, alpha, r=90): function postprocess_image (line 1283) | def postprocess_image(result: torch.Tensor, im_size: list) -> np.ndarray: FILE: modules/cachedit.py function apply_cache_dit (line 6) | def apply_cache_dit(pipe): function unapply_cache_dir (line 54) | def unapply_cache_dir(pipe): FILE: modules/call_queue.py function get_lock (line 14) | def get_lock(): function wrap_queued_call (line 21) | def wrap_queued_call(func): function wrap_gradio_gpu_call (line 29) | def wrap_gradio_gpu_call(func, extra_outputs=None, name=None): function wrap_gradio_call (line 55) | def wrap_gradio_call(func, extra_outputs=None, add_stats=False, name=None): FILE: modules/cfgzero/__init__.py function apply (line 17) | def apply(p: processing.StableDiffusionProcessing): function unapply (line 58) | def unapply(): FILE: modules/cfgzero/cogview4_pipeline.py function optimized_scale (line 34) | def optimized_scale(positive_flat, negative_flat): function calculate_shift (line 73) | def calculate_shift( function retrieve_timesteps (line 84) | def retrieve_timesteps( class CogView4CFGZeroPipeline (line 151) | class CogView4CFGZeroPipeline(DiffusionPipeline, CogView4LoraLoaderMixin): method __init__ (line 176) | def __init__( method _get_glm_embeds (line 192) | def _get_glm_embeds( method encode_prompt (line 237) | def encode_prompt( method prepare_latents (line 316) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method check_inputs (line 334) | def check_inputs( method guidance_scale (line 392) | def guidance_scale(self): method do_classifier_free_guidance (line 399) | def do_classifier_free_guidance(self): method num_timesteps (line 403) | def num_timesteps(self): method attention_kwargs (line 407) | def attention_kwargs(self): method current_timestep (line 411) | def current_timestep(self): method interrupt (line 415) | def interrupt(self): method __call__ (line 420) | def __call__( FILE: modules/cfgzero/flux_pipeline.py function optimized_scale (line 60) | def optimized_scale(positive_flat, negative_flat): function calculate_shift (line 74) | def calculate_shift( function retrieve_timesteps (line 88) | def retrieve_timesteps( class FluxCFGZeroPipeline (line 147) | class FluxCFGZeroPipeline( method __init__ (line 184) | def __init__( method _get_t5_prompt_embeds (line 218) | def _get_t5_prompt_embeds( method _get_clip_prompt_embeds (line 267) | def _get_clip_prompt_embeds( method encode_prompt (line 311) | def encode_prompt( method encode_image (line 390) | def encode_image(self, image, device, num_images_per_prompt): method prepare_ip_adapter_image_embeds (line 401) | def prepare_ip_adapter_image_embeds( method check_inputs (line 437) | def check_inputs( method _prepare_latent_image_ids (line 515) | def _prepare_latent_image_ids(batch_size, height, width, device, dtype): method _pack_latents (line 529) | def _pack_latents(latents, batch_size, num_channels_latents, height, w... method _unpack_latents (line 537) | def _unpack_latents(latents, height, width, vae_scale_factor): method enable_vae_slicing (line 552) | def enable_vae_slicing(self): method disable_vae_slicing (line 559) | def disable_vae_slicing(self): method enable_vae_tiling (line 566) | def enable_vae_tiling(self): method disable_vae_tiling (line 574) | def disable_vae_tiling(self): method prepare_latents (line 581) | def prepare_latents( method guidance_scale (line 617) | def guidance_scale(self): method joint_attention_kwargs (line 621) | def joint_attention_kwargs(self): method num_timesteps (line 625) | def num_timesteps(self): method current_timestep (line 629) | def current_timestep(self): method interrupt (line 633) | def interrupt(self): method __call__ (line 638) | def __call__( FILE: modules/cfgzero/hidream_pipeline.py function optimized_scale (line 82) | def optimized_scale(positive_flat, negative_flat): function calculate_shift (line 96) | def calculate_shift( function retrieve_timesteps (line 110) | def retrieve_timesteps( class HiDreamImageCFGZeroPipeline (line 169) | class HiDreamImageCFGZeroPipeline(DiffusionPipeline, HiDreamImageLoraLoa... method __init__ (line 173) | def __init__( method _get_t5_prompt_embeds (line 212) | def _get_t5_prompt_embeds( method _get_clip_prompt_embeds (line 249) | def _get_clip_prompt_embeds( method _get_llama3_prompt_embeds (line 286) | def _get_llama3_prompt_embeds( method encode_prompt (line 330) | def encode_prompt( method _encode_prompt (line 414) | def _encode_prompt( method enable_vae_slicing (line 470) | def enable_vae_slicing(self): method disable_vae_slicing (line 477) | def disable_vae_slicing(self): method enable_vae_tiling (line 484) | def enable_vae_tiling(self): method disable_vae_tiling (line 492) | def disable_vae_tiling(self): method prepare_latents (line 499) | def prepare_latents( method guidance_scale (line 526) | def guidance_scale(self): method do_classifier_free_guidance (line 530) | def do_classifier_free_guidance(self): method attention_kwargs (line 534) | def attention_kwargs(self): method num_timesteps (line 538) | def num_timesteps(self): method interrupt (line 542) | def interrupt(self): method __call__ (line 546) | def __call__( FILE: modules/cfgzero/hunyuan_t2v_pipeline.py function optimized_scale (line 70) | def optimized_scale(positive_flat, negative_flat): function retrieve_timesteps (line 98) | def retrieve_timesteps( class HunyuanVideoCFGZeroPipeline (line 157) | class HunyuanVideoCFGZeroPipeline(DiffusionPipeline, HunyuanVideoLoraLoa... method __init__ (line 186) | def __init__( method _get_llama_prompt_embeds (line 212) | def _get_llama_prompt_embeds( method _get_clip_prompt_embeds (line 278) | def _get_clip_prompt_embeds( method encode_prompt (line 317) | def encode_prompt( method check_inputs (line 353) | def check_inputs( method prepare_latents (line 400) | def prepare_latents( method enable_vae_slicing (line 431) | def enable_vae_slicing(self): method disable_vae_slicing (line 438) | def disable_vae_slicing(self): method enable_vae_tiling (line 445) | def enable_vae_tiling(self): method disable_vae_tiling (line 453) | def disable_vae_tiling(self): method guidance_scale (line 461) | def guidance_scale(self): method num_timesteps (line 465) | def num_timesteps(self): method attention_kwargs (line 469) | def attention_kwargs(self): method current_timestep (line 473) | def current_timestep(self): method interrupt (line 477) | def interrupt(self): method __call__ (line 482) | def __call__( FILE: modules/cfgzero/sd3_pipeline.py function optimized_scale (line 73) | def optimized_scale(positive_flat, negative_flat): function calculate_shift (line 87) | def calculate_shift( function retrieve_timesteps (line 101) | def retrieve_timesteps( class StableDiffusion3CFGZeroPipeline (line 160) | class StableDiffusion3CFGZeroPipeline(DiffusionPipeline, SD3LoraLoaderMi... method __init__ (line 202) | def __init__( method _get_t5_prompt_embeds (line 247) | def _get_t5_prompt_embeds( method _get_clip_prompt_embeds (line 303) | def _get_clip_prompt_embeds( method encode_prompt (line 358) | def encode_prompt( method check_inputs (line 550) | def check_inputs( method prepare_latents (line 646) | def prepare_latents( method guidance_scale (line 678) | def guidance_scale(self): method skip_guidance_layers (line 682) | def skip_guidance_layers(self): method clip_skip (line 686) | def clip_skip(self): method do_classifier_free_guidance (line 693) | def do_classifier_free_guidance(self): method joint_attention_kwargs (line 697) | def joint_attention_kwargs(self): method num_timesteps (line 701) | def num_timesteps(self): method interrupt (line 705) | def interrupt(self): method encode_image (line 709) | def encode_image(self, image: PipelineImageInput, device: torch.device... method prepare_ip_adapter_image_embeds (line 729) | def prepare_ip_adapter_image_embeds( method enable_sequential_cpu_offload (line 775) | def enable_sequential_cpu_offload(self, *args, **kwargs): method __call__ (line 787) | def __call__( FILE: modules/cfgzero/wan_t2v_pipeline.py function optimized_scale (line 75) | def optimized_scale(positive_flat, negative_flat): function basic_clean (line 88) | def basic_clean(text): function whitespace_clean (line 94) | def whitespace_clean(text): function prompt_clean (line 100) | def prompt_clean(text): class WanCFGZeroPipeline (line 105) | class WanCFGZeroPipeline(DiffusionPipeline, WanLoraLoaderMixin): method __init__ (line 130) | def __init__( method _get_t5_prompt_embeds (line 152) | def _get_t5_prompt_embeds( method encode_prompt (line 193) | def encode_prompt( method check_inputs (line 274) | def check_inputs( method prepare_latents (line 315) | def prepare_latents( method guidance_scale (line 348) | def guidance_scale(self): method do_classifier_free_guidance (line 352) | def do_classifier_free_guidance(self): method num_timesteps (line 356) | def num_timesteps(self): method current_timestep (line 360) | def current_timestep(self): method interrupt (line 364) | def interrupt(self): method attention_kwargs (line 368) | def attention_kwargs(self): method __call__ (line 373) | def __call__( FILE: modules/civitai/api_civitai.py function models_to_json (line 4) | def models_to_json(all_models:list, model_id:int=None): function get_civitai (line 22) | def get_civitai( function post_civitai (line 57) | def post_civitai(page:str=None): function register_api (line 65) | def register_api(): FILE: modules/civitai/download_civitai.py function save_video_frame (line 11) | def save_video_frame(filepath: str): function download_civit_meta (line 28) | def download_civit_meta(model_path: str, model_id): function download_civit_preview (line 45) | def download_civit_preview(model_path: str, preview_url: str): function download_civit_model_thread (line 95) | def download_civit_model_thread(model_name: str, model_url: str, model_p... function download_civit_model (line 183) | def download_civit_model(model_url: str, model_name: str = '', model_pat... FILE: modules/civitai/metadata_civitai.py class CivitModel (line 12) | class CivitModel: method __init__ (line 13) | def __init__(self, name, fn, sha = None, meta = {}): function civit_update_metadata (line 29) | def civit_update_metadata(raw:bool=False): function civit_search_model (line 109) | def civit_search_model(name, tag, model_type): function atomic_civit_search_metadata (line 161) | def atomic_civit_search_metadata(item, results): function civit_search_metadata (line 227) | def civit_search_metadata(title: str = None, raw: bool = False): FILE: modules/civitai/search_civitai.py class ModelImage (line 13) | class ModelImage(): method __init__ (line 14) | def __init__(self, dct: dict): method __str__ (line 24) | def __str__(self): class ModelFile (line 29) | class ModelFile(): method __init__ (line 30) | def __init__(self, dct: dict): method __str__ (line 41) | def __str__(self): class ModelVersion (line 46) | class ModelVersion(): method __init__ (line 47) | def __init__(self, dct: dict): method __str__ (line 63) | def __str__(self): class Model (line 68) | class Model(): method __init__ (line 69) | def __init__(self, dct: dict): method __str__ (line 88) | def __str__(self): function search_civitai (line 95) | def search_civitai( function create_model_cards (line 177) | def create_model_cards(all_models: list[Model]) -> str: function print_models (line 208) | def print_models(all_models: list[Model]): FILE: modules/cmd_args.py function parse_args (line 12) | def parse_args(): function main_args (line 19) | def main_args(): function compatibility_args (line 30) | def compatibility_args(): function settings_args (line 55) | def settings_args(opts, args): FILE: modules/control/proc/canny.py class CannyDetector (line 7) | class CannyDetector: method __call__ (line 8) | def __call__(self, input_image=None, low_threshold=100, high_threshold... FILE: modules/control/proc/depth_anything/__init__.py class DepthAnythingDetector (line 10) | class DepthAnythingDetector: method __init__ (line 12) | def __init__(self, model): method from_pretrained (line 30) | def from_pretrained(cls, pretrained_model_or_path: str, cache_dir: str... method __call__ (line 48) | def __call__(self, image, color_map: str = "none", output_type: str = ... FILE: modules/control/proc/depth_anything/blocks.py function _make_scratch (line 4) | def _make_scratch(in_shape, out_shape, groups=1, expand=False): class ResidualConvUnit (line 37) | class ResidualConvUnit(nn.Module): method __init__ (line 41) | def __init__(self, features, activation, bn): method forward (line 69) | def forward(self, x): class FeatureFusionBlock (line 95) | class FeatureFusionBlock(nn.Module): method __init__ (line 99) | def __init__(self, features, activation, deconv=False, bn=False, expan... method forward (line 126) | def forward(self, *xs, size=None): FILE: modules/control/proc/depth_anything/dpt.py function _make_fusion_block (line 8) | def _make_fusion_block(features, use_bn, size = None): class DPTHead (line 20) | class DPTHead(nn.Module): method __init__ (line 21) | def __init__(self, nclass, in_channels, features=256, use_bn=False, ou... method forward (line 103) | def forward(self, out_features, patch_h, patch_w): class DPT_DINOv2 (line 139) | class DPT_DINOv2(nn.Module): method __init__ (line 140) | def __init__(self, encoder='vitl', features=256, out_channels=None, us... method forward (line 157) | def forward(self, x): class DepthAnything (line 171) | class DepthAnything(DPT_DINOv2, PyTorchModelHubMixin): method __init__ (line 172) | def __init__(self, config): FILE: modules/control/proc/depth_anything/util/transform.py function apply_min_size (line 12) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 54) | class Resize(object): method __init__ (line 58) | def __init__( method constrain_to_multiple_of (line 100) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 111) | def get_size(self, width, height): method __call__ (line 168) | def __call__(self, sample): class NormalizeImage (line 211) | class NormalizeImage(object): method __init__ (line 215) | def __init__(self, mean, std): method __call__ (line 219) | def __call__(self, sample): class PrepareForNet (line 225) | class PrepareForNet(object): method __init__ (line 229) | def __init__(self): method __call__ (line 232) | def __call__(self, sample): FILE: modules/control/proc/depth_pro/__init__.py class DepthProDetector (line 11) | class DepthProDetector: method __init__ (line 14) | def __init__(self, model, processor): method from_pretrained (line 19) | def from_pretrained(cls, pretrained_model_or_path: str = "apple/DepthP... method __call__ (line 30) | def __call__(self, image, color_map: str = "none", output_type: str = ... FILE: modules/control/proc/dpt.py class DPTDetector (line 12) | class DPTDetector: method __init__ (line 13) | def __init__(self, model=None, processor=None, model_path=None): method __call__ (line 18) | def __call__(self, input_image=None, model_path=None): FILE: modules/control/proc/dwpose/__init__.py function _register_module (line 20) | def _register_module(self, module: Type, module_name: Optional[Union[str... function check_dependencies (line 33) | def check_dependencies(): function draw_pose (line 78) | def draw_pose(pose, H, W): class DWposeDetector (line 92) | class DWposeDetector: method __init__ (line 93) | def __init__(self, det_config=None, det_ckpt=None, pose_config=None, p... method to (line 106) | def to(self, device): method __call__ (line 110) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/dwpose/draw.py function smart_resize (line 9) | def smart_resize(x, s): function smart_resize_k (line 23) | def smart_resize_k(x, fx, fy): function padRightDownCorner (line 37) | def padRightDownCorner(img, stride, padValue): function transfer (line 60) | def transfer(model, model_weights): function draw_bodypose (line 67) | def draw_bodypose(canvas, candidate, subset): function draw_handpose (line 111) | def draw_handpose(canvas, all_hand_peaks): function draw_facepose (line 146) | def draw_facepose(canvas, all_lmks): function handDetect (line 161) | def handDetect(candidate, subset, oriImg): function faceDetect (line 231) | def faceDetect(candidate, subset, oriImg): function npmax (line 302) | def npmax(array): FILE: modules/control/proc/dwpose/wholebody.py function inference_detector (line 29) | def inference_detector(*args, **kwargs): class Wholebody (line 36) | class Wholebody: method __init__ (line 37) | def __init__(self, det_config=None, det_ckpt=None, pose_config=None, p... method to (line 63) | def to(self, device): method __call__ (line 68) | def __call__(self, oriImg): FILE: modules/control/proc/edge.py class EdgeDetector (line 24) | class EdgeDetector: method __call__ (line 25) | def __call__(self, input_image=None, pf=True, mode='edge', detect_reso... FILE: modules/control/proc/glpn.py class GLPNDetector (line 9) | class GLPNDetector: method __init__ (line 10) | def __init__(self, model=None, processor=None): method __call__ (line 14) | def __call__(self, input_image=None): FILE: modules/control/proc/hed.py class DoubleConvBlock (line 20) | class DoubleConvBlock(torch.nn.Module): # pylint: disable=abstract-method method __init__ (line 21) | def __init__(self, input_channel, output_channel, layer_number): method __call__ (line 29) | def __call__(self, x, down_sampling=False): class ControlNetHED_Apache2 (line 39) | class ControlNetHED_Apache2(torch.nn.Module): # pylint: disable=abstract... method __init__ (line 40) | def __init__(self): method __call__ (line 49) | def __call__(self, x): class HEDdetector (line 58) | class HEDdetector: method __init__ (line 59) | def __init__(self, model): method from_pretrained (line 63) | def from_pretrained(cls, pretrained_model_or_path, filename=None, cach... method to (line 74) | def to(self, device): method __call__ (line 78) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/leres/__init__.py class LeresDetector (line 17) | class LeresDetector: method __init__ (line 18) | def __init__(self, model, pix2pixmodel): method from_pretrained (line 23) | def from_pretrained(cls, pretrained_model_or_path, filename=None, pix2... method to (line 47) | def to(self, device): method __call__ (line 51) | def __call__(self, input_image, thr_a=0, thr_b=0, boost=False, detect_... FILE: modules/control/proc/leres/leres/Resnet.py function conv3x3 (line 17) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 23) | class BasicBlock(nn.Module): method __init__ (line 26) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 36) | def forward(self, x): class Bottleneck (line 55) | class Bottleneck(nn.Module): method __init__ (line 58) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 71) | def forward(self, x): class ResNet (line 94) | class ResNet(nn.Module): method __init__ (line 96) | def __init__(self, block, layers, num_classes=1000): method _make_layer (line 118) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 135) | def forward(self, x): function resnet18 (line 155) | def resnet18(pretrained=True, **kwargs): function resnet34 (line 164) | def resnet34(pretrained=True, **kwargs): function resnet50 (line 173) | def resnet50(pretrained=True, **kwargs): function resnet101 (line 183) | def resnet101(pretrained=True, **kwargs): function resnet152 (line 193) | def resnet152(pretrained=True, **kwargs): FILE: modules/control/proc/leres/leres/Resnext_torch.py function conv3x3 (line 19) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 25) | def conv1x1(in_planes, out_planes, stride=1): class BasicBlock (line 30) | class BasicBlock(nn.Module): method __init__ (line 33) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 51) | def forward(self, x): class Bottleneck (line 70) | class Bottleneck(nn.Module): method __init__ (line 79) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 96) | def forward(self, x): class ResNet (line 119) | class ResNet(nn.Module): method __init__ (line 121) | def __init__(self, block, layers, num_classes=1000, zero_init_residual... method _make_layer (line 172) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method _forward_impl (line 196) | def _forward_impl(self, x): method forward (line 222) | def forward(self, x): function resnext101_32x8d (line 227) | def resnext101_32x8d(pretrained=True, **kwargs): FILE: modules/control/proc/leres/leres/depthmap.py function scale_torch (line 18) | def scale_torch(img): function estimateleres (line 35) | def estimateleres(img, model, w, h): function generatemask (line 51) | def generatemask(size): function resizewithpool (line 62) | def resizewithpool(img, size): function rgb2gray (line 69) | def rgb2gray(rgb): function calculateprocessingres (line 73) | def calculateprocessingres(img, basesize, confidence=0.1, scale_threshol... function doubleestimate (line 131) | def doubleestimate(img, size1, size2, pix2pixsize, model, net_type, pix2... function singleestimate (line 155) | def singleestimate(img, msize, model, net_type): function applyGridpatch (line 161) | def applyGridpatch(blsize, stride, img, box): function generatepatchs (line 177) | def generatepatchs(img, base_size): function getGF_fromintegral (line 208) | def getGF_fromintegral(integralimage, rect): function adaptiveselection (line 218) | def adaptiveselection(integral_grad, patch_bound_list, gf): function impatch (line 268) | def impatch(image, rect): class ImageandPatchs (line 277) | class ImageandPatchs: method __init__ (line 278) | def __init__(self, root_dir, name, patchsinfo, rgb_image, scale=1): method __len__ (line 292) | def __len__(self): method set_base_estimate (line 295) | def set_base_estimate(self, est): method set_updated_estimate (line 300) | def set_updated_estimate(self, est): method __getitem__ (line 305) | def __getitem__(self, index): method print_options (line 325) | def print_options(self, opt): method parse (line 352) | def parse(self): function estimateboost (line 378) | def estimateboost(img, model, model_type, pix2pixmodel, max_res=512, dep... FILE: modules/control/proc/leres/leres/multi_depth_model_woauxi.py class RelDepthModel (line 8) | class RelDepthModel(nn.Module): method __init__ (line 9) | def __init__(self, backbone='resnet50'): method inference (line 17) | def inference(self, rgb): class DepthModel (line 24) | class DepthModel(nn.Module): method __init__ (line 25) | def __init__(self, encoder): method forward (line 31) | def forward(self, x): FILE: modules/control/proc/leres/leres/net_tools.py function get_func (line 7) | def get_func(func_name): function load_ckpt (line 27) | def load_ckpt(args, depth_model, shift_model, focal_model): function strip_prefix_if_present (line 47) | def strip_prefix_if_present(state_dict, prefix): FILE: modules/control/proc/leres/leres/network_auxi.py function resnet50_stride32 (line 8) | def resnet50_stride32(): function resnext101_stride32x8d (line 11) | def resnext101_stride32x8d(): class Decoder (line 15) | class Decoder(nn.Module): method __init__ (line 16) | def __init__(self): method _init_params (line 34) | def _init_params(self): method forward (line 52) | def forward(self, features): class DepthNet (line 64) | class DepthNet(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 97) | def forward(self, x): class FTB (line 102) | class FTB(nn.Module): method __init__ (line 103) | def __init__(self, inchannels, midchannels=512): method forward (line 121) | def forward(self, x): method init_params (line 128) | def init_params(self): class ATA (line 149) | class ATA(nn.Module): method __init__ (line 150) | def __init__(self, inchannels, reduction=8): method forward (line 160) | def forward(self, low_x, high_x): method init_params (line 170) | def init_params(self): class FFM (line 193) | class FFM(nn.Module): method __init__ (line 194) | def __init__(self, inchannels, midchannels, outchannels, upfactor=2): method forward (line 209) | def forward(self, low_x, high_x): method init_params (line 217) | def init_params(self): class AO (line 240) | class AO(nn.Module): method __init__ (line 242) | def __init__(self, inchannels, outchannels, upfactor=2): method forward (line 259) | def forward(self, x): method init_params (line 263) | def init_params(self): class ResidualConv (line 290) | class ResidualConv(nn.Module): method __init__ (line 291) | def __init__(self, inchannels): method forward (line 308) | def forward(self, x): method init_params (line 312) | def init_params(self): class FeatureFusion (line 335) | class FeatureFusion(nn.Module): method __init__ (line 336) | def __init__(self, inchannels, outchannels): method forward (line 346) | def forward(self, lowfeat, highfeat): method init_params (line 349) | def init_params(self): class SenceUnderstand (line 372) | class SenceUnderstand(nn.Module): method __init__ (line 373) | def __init__(self, channels): method forward (line 386) | def forward(self, x): method initial_params (line 397) | def initial_params(self, dev=0.01): FILE: modules/control/proc/leres/pix2pix/models/__init__.py function find_model_using_name (line 25) | def find_model_using_name(model_name): function get_option_setter (line 48) | def get_option_setter(model_name): function create_model (line 54) | def create_model(opt): FILE: modules/control/proc/leres/pix2pix/models/base_model.py class BaseModel (line 12) | class BaseModel(ABC): method __init__ (line 22) | def __init__(self, opt): method modify_commandline_options (line 51) | def modify_commandline_options(parser, is_train): method set_input (line 64) | def set_input(self, input): method forward (line 73) | def forward(self): method optimize_parameters (line 78) | def optimize_parameters(self): method setup (line 82) | def setup(self, opt): method eval (line 95) | def eval(self): method test (line 102) | def test(self): method compute_visuals (line 110) | def compute_visuals(self): # noqa method get_image_paths (line 114) | def get_image_paths(self): method update_learning_rate (line 118) | def update_learning_rate(self): method get_current_visuals (line 130) | def get_current_visuals(self): method get_current_losses (line 138) | def get_current_losses(self): method save_networks (line 146) | def save_networks(self, epoch): method unload_network (line 164) | def unload_network(self, name): method __patch_instance_norm_state_dict (line 174) | def __patch_instance_norm_state_dict(self, state_dict, module, keys, i... method load_networks (line 188) | def load_networks(self, epoch): method print_networks (line 213) | def print_networks(self, verbose): method set_requires_grad (line 231) | def set_requires_grad(self, nets, requires_grad=False): FILE: modules/control/proc/leres/pix2pix/models/base_model_hg.py class BaseModelHG (line 4) | class BaseModelHG(): method name (line 5) | def name(self): method initialize (line 8) | def initialize(self, opt): method set_input (line 15) | def set_input(self, input): method forward (line 18) | def forward(self): method test (line 22) | def test(self): method get_image_paths (line 25) | def get_image_paths(self): method optimize_parameters (line 28) | def optimize_parameters(self): method get_current_visuals (line 31) | def get_current_visuals(self): method get_current_errors (line 34) | def get_current_errors(self): method save (line 37) | def save(self, label): method save_network (line 41) | def save_network(self, network, network_label, epoch_label, gpu_ids): method load_network (line 49) | def load_network(self, network, network_label, epoch_label): method update_learning_rate (line 57) | def update_learning_rate(): FILE: modules/control/proc/leres/pix2pix/models/networks.py class Identity (line 13) | class Identity(nn.Module): method forward (line 14) | def forward(self, x): function get_norm_layer (line 18) | def get_norm_layer(norm_type='instance'): function get_scheduler (line 38) | def get_scheduler(optimizer, opt): function init_weights (line 67) | def init_weights(net, init_type='normal', init_gain=0.02): function init_net (line 101) | def init_net(net, init_type='normal', init_gain=0.02, gpu_ids=None): function define_G (line 121) | def define_G(input_nc, output_nc, ngf, netG, norm='batch', use_dropout=F... function define_D (line 174) | def define_D(input_nc, ndf, netD, n_layers_D=3, norm='batch', init_type=... class GANLoss (line 223) | class GANLoss(nn.Module): method __init__ (line 230) | def __init__(self, gan_mode, target_real_label=1.0, target_fake_label=... method get_target_tensor (line 254) | def get_target_tensor(self, prediction, target_is_real): method __call__ (line 271) | def __call__(self, prediction, target_is_real): function cal_gradient_penalty (line 292) | def cal_gradient_penalty(netD, real_data, fake_data, device, type='mixed... class ResnetGenerator (line 329) | class ResnetGenerator(nn.Module): method __init__ (line 335) | def __init__(self, input_nc, output_nc, ngf=64, norm_layer=nn.BatchNor... method forward (line 384) | def forward(self, input): class ResnetBlock (line 389) | class ResnetBlock(nn.Module): method __init__ (line 392) | def __init__(self, dim, padding_type, norm_layer, use_dropout, use_bias): method build_conv_block (line 403) | def build_conv_block(self, dim, padding_type, norm_layer, use_dropout,... method forward (line 443) | def forward(self, x): class UnetGenerator (line 449) | class UnetGenerator(nn.Module): method __init__ (line 452) | def __init__(self, input_nc, output_nc, num_downs, ngf=64, norm_layer=... method forward (line 476) | def forward(self, input): class UnetSkipConnectionBlock (line 481) | class UnetSkipConnectionBlock(nn.Module): method __init__ (line 487) | def __init__(self, outer_nc, inner_nc, input_nc=None, method forward (line 544) | def forward(self, x): class NLayerDiscriminator (line 551) | class NLayerDiscriminator(nn.Module): method __init__ (line 554) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method forward (line 594) | def forward(self, input): class PixelDiscriminator (line 599) | class PixelDiscriminator(nn.Module): method __init__ (line 602) | def __init__(self, input_nc, ndf=64, norm_layer=nn.BatchNorm2d): method forward (line 626) | def forward(self, input): FILE: modules/control/proc/leres/pix2pix/models/pix2pix4depth_model.py class Pix2Pix4DepthModel (line 6) | class Pix2Pix4DepthModel(BaseModel): method modify_commandline_options (line 17) | def modify_commandline_options(parser, is_train=True): method __init__ (line 38) | def __init__(self, opt): method set_input_train (line 80) | def set_input_train(self, input): method set_input (line 96) | def set_input(self, outer, inner): method normalize (line 109) | def normalize(self, input): method forward (line 114) | def forward(self): method backward_D (line 118) | def backward_D(self): method backward_G (line 132) | def backward_G(self): method optimize_parameters (line 144) | def optimize_parameters(self): FILE: modules/control/proc/leres/pix2pix/options/base_options.py class BaseOptions (line 9) | class BaseOptions(): method __init__ (line 16) | def __init__(self): method initialize (line 20) | def initialize(self, parser): method gather_options (line 79) | def gather_options(self): method print_options (line 108) | def print_options(self, opt): method parse (line 133) | def parse(self): FILE: modules/control/proc/leres/pix2pix/options/test_options.py class TestOptions (line 4) | class TestOptions(BaseOptions): method initialize (line 10) | def initialize(self, parser): FILE: modules/control/proc/leres/pix2pix/util/util.py function tensor2im (line 9) | def tensor2im(input_image, imtype=np.uint16): function diagnose_network (line 28) | def diagnose_network(net, name='network'): function save_image (line 47) | def save_image(image_numpy, image_path, aspect_ratio=1.0): function print_numpy (line 69) | def print_numpy(x, val=True, shp=False): function mkdirs (line 85) | def mkdirs(paths): function mkdir (line 98) | def mkdir(path): FILE: modules/control/proc/lineart.py class ResidualBlock (line 15) | class ResidualBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_features): method forward (line 30) | def forward(self, x): class Generator (line 34) | class Generator(nn.Module): method __init__ (line 35) | def __init__(self, input_nc, output_nc, n_residual_blocks=9, sigmoid=T... method forward (line 82) | def forward(self, x, cond=None): # pylint: disable=unused-argument class LineartDetector (line 92) | class LineartDetector: method __init__ (line 93) | def __init__(self, model, coarse_model): method from_pretrained (line 98) | def from_pretrained(cls, pretrained_model_or_path, filename=None, coar... method to (line 119) | def to(self, device): method __call__ (line 124) | def __call__(self, input_image, coarse=False, detect_resolution=512, i... FILE: modules/control/proc/lineart_anime.py class UnetGenerator (line 15) | class UnetGenerator(nn.Module): method __init__ (line 18) | def __init__(self, input_nc, output_nc, num_downs, ngf=64, norm_layer=... method forward (line 41) | def forward(self, input): # pylint: disable=redefined-builtin class UnetSkipConnectionBlock (line 46) | class UnetSkipConnectionBlock(nn.Module): method __init__ (line 52) | def __init__(self, outer_nc, inner_nc, input_nc=None, method forward (line 108) | def forward(self, x): class LineartAnimeDetector (line 115) | class LineartAnimeDetector: method __init__ (line 116) | def __init__(self, model): method from_pretrained (line 120) | def from_pretrained(cls, pretrained_model_or_path, filename=None, cach... method to (line 137) | def to(self, device): method __call__ (line 141) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/marigold/__init__.py class MarigoldDetector (line 9) | class MarigoldDetector: method __init__ (line 10) | def __init__(self, model): method from_pretrained (line 14) | def from_pretrained(cls, pretrained_model_or_path, cache_dir=None, **l... method to (line 18) | def to(self, device): method __call__ (line 22) | def __call__( FILE: modules/control/proc/marigold/marigold_pipeline.py class MarigoldDepthOutput (line 43) | class MarigoldDepthOutput(BaseOutput): class MarigoldPipeline (line 61) | class MarigoldPipeline(DiffusionPipeline): method __init__ (line 85) | def __init__( method __call__ (line 106) | def __call__( method __encode_empty_text (line 255) | def __encode_empty_text(self): method single_infer (line 271) | def single_infer( method encode_rgb (line 341) | def encode_rgb(self, rgb_in: torch.Tensor) -> torch.Tensor: method decode_depth (line 360) | def decode_depth(self, depth_latent: torch.Tensor) -> torch.Tensor: FILE: modules/control/proc/marigold/util/batchsize.py function find_batch_size (line 51) | def find_batch_size(ensemble_size: int, input_res: int, dtype: torch.dty... FILE: modules/control/proc/marigold/util/ensemble.py function inter_distances (line 27) | def inter_distances(tensors: torch.Tensor): function ensemble_depths (line 40) | def ensemble_depths( FILE: modules/control/proc/marigold/util/image_util.py function colorize_depth_maps (line 27) | def colorize_depth_maps( function chw2hwc (line 68) | def chw2hwc(chw): function resize_max_res (line 77) | def resize_max_res(img: Image.Image, max_edge_resolution: int) -> Image.... FILE: modules/control/proc/marigold/util/seed_all.py function seed_all (line 26) | def seed_all(seed: int = 0): FILE: modules/control/proc/mediapipe_face.py function check_dependencies (line 10) | def check_dependencies(): class MediapipeFaceDetector (line 26) | class MediapipeFaceDetector: method __call__ (line 27) | def __call__(self, FILE: modules/control/proc/mediapipe_face_util.py function draw_pupils (line 56) | def draw_pupils(image, landmark_list, drawing_spec, halfwidth: int = 2): function reverse_channels (line 85) | def reverse_channels(image): function generate_annotation (line 92) | def generate_annotation( FILE: modules/control/proc/midas/__init__.py class MidasDetector (line 15) | class MidasDetector: method __init__ (line 16) | def __init__(self, model): method from_pretrained (line 20) | def from_pretrained(cls, pretrained_model_or_path, model_type="dpt_hyb... method to (line 33) | def to(self, device): method __call__ (line 37) | def __call__(self, input_image, a=np.pi * 2.0, bg_th=0.1, depth_and_no... FILE: modules/control/proc/midas/api.py function disabled_train (line 26) | def disabled_train(self, mode=True): function load_midas_transform (line 32) | def load_midas_transform(model_type): function load_model (line 77) | def load_model(model_type, model_path=None): class MiDaSInference (line 145) | class MiDaSInference(nn.Module): method __init__ (line 158) | def __init__(self, model_type, model_path): method forward (line 165) | def forward(self, x): FILE: modules/control/proc/midas/midas/base_model.py class BaseModel (line 4) | class BaseModel(torch.nn.Module): method load (line 5) | def load(self, path): FILE: modules/control/proc/midas/midas/blocks.py function _make_encoder (line 11) | def _make_encoder(backbone, features, use_pretrained, groups=1, expand=F... function _make_scratch (line 49) | def _make_scratch(in_shape, out_shape, groups=1, expand=False): function _make_pretrained_efficientnet_lite3 (line 78) | def _make_pretrained_efficientnet_lite3(use_pretrained, exportable=False): function _make_efficientnet_backbone (line 88) | def _make_efficientnet_backbone(effnet): function _make_resnet_backbone (line 101) | def _make_resnet_backbone(resnet): function _make_pretrained_resnext101_wsl (line 114) | def _make_pretrained_resnext101_wsl(use_pretrained): class Interpolate (line 120) | class Interpolate(nn.Module): method __init__ (line 124) | def __init__(self, scale_factor, mode, align_corners=False): method forward (line 138) | def forward(self, x): class ResidualConvUnit (line 155) | class ResidualConvUnit(nn.Module): method __init__ (line 159) | def __init__(self, features): method forward (line 177) | def forward(self, x): class FeatureFusionBlock (line 194) | class FeatureFusionBlock(nn.Module): method __init__ (line 198) | def __init__(self, features): method forward (line 209) | def forward(self, *xs): class ResidualConvUnit_custom (line 231) | class ResidualConvUnit_custom(nn.Module): method __init__ (line 235) | def __init__(self, features, activation, bn): method forward (line 263) | def forward(self, x): class FeatureFusionBlock_custom (line 291) | class FeatureFusionBlock_custom(nn.Module): method __init__ (line 295) | def __init__(self, features, activation, deconv=False, bn=False, expan... method forward (line 320) | def forward(self, *xs): FILE: modules/control/proc/midas/midas/dpt_depth.py function _make_fusion_block (line 15) | def _make_fusion_block(features, use_bn): class DPT (line 26) | class DPT(BaseModel): method __init__ (line 27) | def __init__( method forward (line 67) | def forward(self, x): class DPTDepthModel (line 88) | class DPTDepthModel(DPT): method __init__ (line 89) | def __init__(self, path=None, non_negative=True, **kwargs): method forward (line 107) | def forward(self, x): FILE: modules/control/proc/midas/midas/midas_net.py class MidasNet (line 12) | class MidasNet(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=256, non_negative=True): method forward (line 49) | def forward(self, x): FILE: modules/control/proc/midas/midas/midas_net_custom.py class MidasNet_small (line 12) | class MidasNet_small(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=64, backbone="efficientnet_lite... method forward (line 75) | def forward(self, x): function fuse_model (line 111) | def fuse_model(m): FILE: modules/control/proc/midas/midas/transforms.py function apply_min_size (line 6) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 48) | class Resize(object): method __init__ (line 52) | def __init__( method constrain_to_multiple_of (line 94) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 105) | def get_size(self, width, height): method __call__ (line 162) | def __call__(self, sample): class NormalizeImage (line 197) | class NormalizeImage(object): method __init__ (line 201) | def __init__(self, mean, std): method __call__ (line 205) | def __call__(self, sample): class PrepareForNet (line 211) | class PrepareForNet(object): method __init__ (line 215) | def __init__(self): method __call__ (line 218) | def __call__(self, sample): FILE: modules/control/proc/midas/midas/vit.py class Slice (line 9) | class Slice(nn.Module): method __init__ (line 10) | def __init__(self, start_index=1): method forward (line 14) | def forward(self, x): class AddReadout (line 18) | class AddReadout(nn.Module): method __init__ (line 19) | def __init__(self, start_index=1): method forward (line 23) | def forward(self, x): class ProjectReadout (line 31) | class ProjectReadout(nn.Module): method __init__ (line 32) | def __init__(self, in_features, start_index=1): method forward (line 38) | def forward(self, x): class Transpose (line 45) | class Transpose(nn.Module): method __init__ (line 46) | def __init__(self, dim0, dim1): method forward (line 51) | def forward(self, x): function forward_vit (line 56) | def forward_vit(pretrained, x): function _resize_pos_embed (line 100) | def _resize_pos_embed(self, posemb, gs_h, gs_w): function forward_flex (line 117) | def forward_flex(self, x): function get_activation (line 159) | def get_activation(name): function get_readout_oper (line 166) | def get_readout_oper(vit_features, features, use_readout, start_index=1): function _make_vit_b16_backbone (line 181) | def _make_vit_b16_backbone( function _make_pretrained_vitl16_384 (line 301) | def _make_pretrained_vitl16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_vitb16_384 (line 314) | def _make_pretrained_vitb16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_deitb16_384 (line 323) | def _make_pretrained_deitb16_384(pretrained, use_readout="ignore", hooks... function _make_pretrained_deitb16_distil_384 (line 332) | def _make_pretrained_deitb16_distil_384(pretrained, use_readout="ignore"... function _make_vit_b_rn50_backbone (line 347) | def _make_vit_b_rn50_backbone( function _make_pretrained_vitb_rn50_384 (line 488) | def _make_pretrained_vitb_rn50_384( FILE: modules/control/proc/midas/utils.py function read_pfm (line 9) | def read_pfm(path): function write_pfm (line 58) | def write_pfm(path, image, scale=1): function read_image (line 97) | def read_image(path): function resize_image (line 116) | def resize_image(img): function resize_depth (line 146) | def resize_depth(depth, width, height): function write_depth (line 165) | def write_depth(path, depth, bits=1): FILE: modules/control/proc/mlsd/__init__.py class MLSDdetector (line 14) | class MLSDdetector: method __init__ (line 15) | def __init__(self, model): method from_pretrained (line 19) | def from_pretrained(cls, pretrained_model_or_path, filename=None, cach... method to (line 33) | def to(self, device): method __call__ (line 37) | def __call__(self, input_image, thr_v=0.1, thr_d=0.1, detect_resolutio... FILE: modules/control/proc/mlsd/models/mbv2_mlsd_large.py class BlockTypeA (line 9) | class BlockTypeA(nn.Module): method __init__ (line 10) | def __init__(self, in_c1, in_c2, out_c1, out_c2, upscale = True): method forward (line 24) | def forward(self, a, b): class BlockTypeB (line 32) | class BlockTypeB(nn.Module): method __init__ (line 33) | def __init__(self, in_c, out_c): method forward (line 46) | def forward(self, x): class BlockTypeC (line 51) | class BlockTypeC(nn.Module): method __init__ (line 52) | def __init__(self, in_c, out_c): method forward (line 66) | def forward(self, x): function _make_divisible (line 72) | def _make_divisible(v, divisor, min_value=None): class ConvBNReLU (line 92) | class ConvBNReLU(nn.Sequential): method __init__ (line 93) | def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, gro... method forward (line 112) | def forward(self, x): class InvertedResidual (line 124) | class InvertedResidual(nn.Module): method __init__ (line 125) | def __init__(self, inp, oup, stride, expand_ratio): method forward (line 146) | def forward(self, x): class MobileNetV2 (line 153) | class MobileNetV2(nn.Module): method __init__ (line 154) | def __init__(self, pretrained=True): method _forward_impl (line 218) | def _forward_impl(self, x): method forward (line 233) | def forward(self, x): method _load_pretrained_model (line 236) | def _load_pretrained_model(self): class MobileV2_MLSD_Large (line 247) | class MobileV2_MLSD_Large(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 275) | def forward(self, x): FILE: modules/control/proc/mlsd/models/mbv2_mlsd_tiny.py class BlockTypeA (line 9) | class BlockTypeA(nn.Module): method __init__ (line 10) | def __init__(self, in_c1, in_c2, out_c1, out_c2, upscale = True): method forward (line 24) | def forward(self, a, b): class BlockTypeB (line 31) | class BlockTypeB(nn.Module): method __init__ (line 32) | def __init__(self, in_c, out_c): method forward (line 45) | def forward(self, x): class BlockTypeC (line 50) | class BlockTypeC(nn.Module): method __init__ (line 51) | def __init__(self, in_c, out_c): method forward (line 65) | def forward(self, x): function _make_divisible (line 71) | def _make_divisible(v, divisor, min_value=None): class ConvBNReLU (line 91) | class ConvBNReLU(nn.Sequential): method __init__ (line 92) | def __init__(self, in_planes, out_planes, kernel_size=3, stride=1, gro... method forward (line 111) | def forward(self, x): class InvertedResidual (line 123) | class InvertedResidual(nn.Module): method __init__ (line 124) | def __init__(self, inp, oup, stride, expand_ratio): method forward (line 145) | def forward(self, x): class MobileNetV2 (line 152) | class MobileNetV2(nn.Module): method __init__ (line 153) | def __init__(self, pretrained=True): method _forward_impl (line 218) | def _forward_impl(self, x): method forward (line 233) | def forward(self, x): method _load_pretrained_model (line 236) | def _load_pretrained_model(self): class MobileV2_MLSD_Tiny (line 247) | class MobileV2_MLSD_Tiny(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 263) | def forward(self, x): FILE: modules/control/proc/mlsd/utils.py function deccode_output_score_and_ptss (line 19) | def deccode_output_score_and_ptss(tpMap, topk_n = 200, ksize = 5): function pred_lines (line 47) | def pred_lines(image, model, function pred_squares (line 94) | def pred_squares(image, FILE: modules/control/proc/normalbae/__init__.py function load_checkpoint (line 17) | def load_checkpoint(fpath, model): class NormalBaeDetector (line 30) | class NormalBaeDetector: method __init__ (line 31) | def __init__(self, model): method from_pretrained (line 36) | def from_pretrained(cls, pretrained_model_or_path, filename=None, cach... method to (line 53) | def to(self, device): method __call__ (line 58) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/normalbae/nets/NNET.py class NNET (line 6) | class NNET(nn.Module): method __init__ (line 7) | def __init__(self, args): method get_1x_lr_params (line 12) | def get_1x_lr_params(self): # lr/10 learning rate method get_10x_lr_params (line 15) | def get_10x_lr_params(self): # lr learning rate method forward (line 18) | def forward(self, img, **kwargs): FILE: modules/control/proc/normalbae/nets/baseline.py class NNET (line 9) | class NNET(nn.Module): method __init__ (line 10) | def __init__(self, args=None): method forward (line 15) | def forward(self, x, **kwargs): method get_1x_lr_params (line 25) | def get_1x_lr_params(self): # lr/10 learning rate method get_10x_lr_params (line 28) | def get_10x_lr_params(self): # lr learning rate class Encoder (line 35) | class Encoder(nn.Module): method __init__ (line 36) | def __init__(self): method forward (line 48) | def forward(self, x): class Decoder (line 60) | class Decoder(nn.Module): method __init__ (line 61) | def __init__(self, num_classes=4): method forward (line 70) | def forward(self, features): FILE: modules/control/proc/normalbae/nets/submodules/decoder.py class Decoder (line 7) | class Decoder(nn.Module): method __init__ (line 8) | def __init__(self, args): method forward (line 59) | def forward(self, features, gt_norm_mask=None, mode='test'): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/activations/__init__.py function add_override_act_fn (line 65) | def add_override_act_fn(name, fn): function update_override_act_fn (line 70) | def update_override_act_fn(overrides): function clear_override_act_fn (line 76) | def clear_override_act_fn(): function add_override_act_layer (line 81) | def add_override_act_layer(name, fn): function update_override_act_layer (line 85) | def update_override_act_layer(overrides): function clear_override_act_layer (line 91) | def clear_override_act_layer(): function get_act_fn (line 96) | def get_act_fn(name='relu'): function get_act_layer (line 118) | def get_act_layer(name='relu'): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/activations/activations.py function swish (line 12) | def swish(x, inplace: bool = False): class Swish (line 19) | class Swish(nn.Module): method __init__ (line 20) | def __init__(self, inplace: bool = False): method forward (line 24) | def forward(self, x): function mish (line 28) | def mish(x, inplace: bool = False): class Mish (line 34) | class Mish(nn.Module): method __init__ (line 35) | def __init__(self, inplace: bool = False): method forward (line 39) | def forward(self, x): function sigmoid (line 43) | def sigmoid(x, inplace: bool = False): class Sigmoid (line 48) | class Sigmoid(nn.Module): method __init__ (line 49) | def __init__(self, inplace: bool = False): method forward (line 53) | def forward(self, x): function tanh (line 57) | def tanh(x, inplace: bool = False): class Tanh (line 62) | class Tanh(nn.Module): method __init__ (line 63) | def __init__(self, inplace: bool = False): method forward (line 67) | def forward(self, x): function hard_swish (line 71) | def hard_swish(x, inplace: bool = False): class HardSwish (line 76) | class HardSwish(nn.Module): method __init__ (line 77) | def __init__(self, inplace: bool = False): method forward (line 81) | def forward(self, x): function hard_sigmoid (line 85) | def hard_sigmoid(x, inplace: bool = False): class HardSigmoid (line 92) | class HardSigmoid(nn.Module): method __init__ (line 93) | def __init__(self, inplace: bool = False): method forward (line 97) | def forward(self, x): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/activations/activations_jit.py function swish_jit (line 22) | def swish_jit(x, inplace: bool = False): function mish_jit (line 30) | def mish_jit(x, _inplace: bool = False): class SwishJit (line 36) | class SwishJit(nn.Module): method __init__ (line 37) | def __init__(self, inplace: bool = False): method forward (line 40) | def forward(self, x): class MishJit (line 44) | class MishJit(nn.Module): method __init__ (line 45) | def __init__(self, inplace: bool = False): method forward (line 48) | def forward(self, x): function hard_sigmoid_jit (line 53) | def hard_sigmoid_jit(x, inplace: bool = False): class HardSigmoidJit (line 58) | class HardSigmoidJit(nn.Module): method __init__ (line 59) | def __init__(self, inplace: bool = False): method forward (line 62) | def forward(self, x): function hard_swish_jit (line 67) | def hard_swish_jit(x, inplace: bool = False): class HardSwishJit (line 72) | class HardSwishJit(nn.Module): method __init__ (line 73) | def __init__(self, inplace: bool = False): method forward (line 76) | def forward(self, x): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/activations/activations_me.py function swish_jit_fwd (line 22) | def swish_jit_fwd(x): function swish_jit_bwd (line 27) | def swish_jit_bwd(x, grad_output): class SwishJitAutoFn (line 32) | class SwishJitAutoFn(torch.autograd.Function): method forward (line 42) | def forward(ctx, x): method backward (line 47) | def backward(ctx, grad_output): function swish_me (line 52) | def swish_me(x, inplace=False): class SwishMe (line 56) | class SwishMe(nn.Module): method __init__ (line 57) | def __init__(self, inplace: bool = False): method forward (line 60) | def forward(self, x): function mish_jit_fwd (line 65) | def mish_jit_fwd(x): function mish_jit_bwd (line 70) | def mish_jit_bwd(x, grad_output): class MishJitAutoFn (line 76) | class MishJitAutoFn(torch.autograd.Function): method forward (line 81) | def forward(ctx, x): method backward (line 86) | def backward(ctx, grad_output): function mish_me (line 91) | def mish_me(x, inplace=False): class MishMe (line 95) | class MishMe(nn.Module): method __init__ (line 96) | def __init__(self, inplace: bool = False): method forward (line 99) | def forward(self, x): function hard_sigmoid_jit_fwd (line 104) | def hard_sigmoid_jit_fwd(x, inplace: bool = False): function hard_sigmoid_jit_bwd (line 109) | def hard_sigmoid_jit_bwd(x, grad_output): class HardSigmoidJitAutoFn (line 114) | class HardSigmoidJitAutoFn(torch.autograd.Function): method forward (line 116) | def forward(ctx, x): method backward (line 121) | def backward(ctx, grad_output): function hard_sigmoid_me (line 126) | def hard_sigmoid_me(x, inplace: bool = False): class HardSigmoidMe (line 130) | class HardSigmoidMe(nn.Module): method __init__ (line 131) | def __init__(self, inplace: bool = False): method forward (line 134) | def forward(self, x): function hard_swish_jit_fwd (line 139) | def hard_swish_jit_fwd(x): function hard_swish_jit_bwd (line 144) | def hard_swish_jit_bwd(x, grad_output): class HardSwishJitAutoFn (line 150) | class HardSwishJitAutoFn(torch.autograd.Function): method forward (line 153) | def forward(ctx, x): method backward (line 158) | def backward(ctx, grad_output): function hard_swish_me (line 163) | def hard_swish_me(x, inplace=False): class HardSwishMe (line 167) | class HardSwishMe(nn.Module): method __init__ (line 168) | def __init__(self, inplace: bool = False): method forward (line 171) | def forward(self, x): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/config.py function is_no_jit (line 25) | def is_no_jit(): class set_no_jit (line 29) | class set_no_jit: method __init__ (line 30) | def __init__(self, mode: bool) -> None: method __enter__ (line 35) | def __enter__(self) -> None: method __exit__ (line 38) | def __exit__(self, *args: Any) -> bool: function is_exportable (line 44) | def is_exportable(): class set_exportable (line 48) | class set_exportable: method __init__ (line 49) | def __init__(self, mode: bool) -> None: method __enter__ (line 54) | def __enter__(self) -> None: method __exit__ (line 57) | def __exit__(self, *args: Any) -> bool: function is_scriptable (line 63) | def is_scriptable(): class set_scriptable (line 67) | class set_scriptable: method __init__ (line 68) | def __init__(self, mode: bool) -> None: method __enter__ (line 73) | def __enter__(self) -> None: method __exit__ (line 76) | def __exit__(self, *args: Any) -> bool: class set_layer_config (line 82) | class set_layer_config: method __init__ (line 86) | def __init__( method __enter__ (line 106) | def __enter__(self) -> None: method __exit__ (line 109) | def __exit__(self, *args: Any) -> bool: function layer_config_kwargs (line 118) | def layer_config_kwargs(kwargs): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/conv2d_layers.py function _ntuple (line 23) | def _ntuple(n): function _is_static_pad (line 37) | def _is_static_pad(kernel_size, stride=1, dilation=1, **_): function _get_padding (line 41) | def _get_padding(kernel_size, stride=1, dilation=1, **_): function _calc_same_pad (line 46) | def _calc_same_pad(i: int, k: int, s: int, d: int): function _same_pad_arg (line 50) | def _same_pad_arg(input_size, kernel_size, stride, dilation): function _split_channels (line 58) | def _split_channels(num_chan, num_groups): function conv2d_same (line 64) | def conv2d_same( class Conv2dSame (line 75) | class Conv2dSame(nn.Conv2d): method __init__ (line 80) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 85) | def forward(self, x): class Conv2dSameExport (line 89) | class Conv2dSameExport(nn.Conv2d): method __init__ (line 96) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 103) | def forward(self, x): function get_padding_value (line 116) | def get_padding_value(padding, kernel_size, **kwargs): function create_conv2d_pad (line 139) | def create_conv2d_pad(in_chs, out_chs, kernel_size, **kwargs): class MixedConv2d (line 153) | class MixedConv2d(nn.ModuleDict): method __init__ (line 159) | def __init__(self, in_channels, out_channels, kernel_size=3, method forward (line 179) | def forward(self, x): function get_condconv_initializer (line 186) | def get_condconv_initializer(initializer, num_experts, expert_shape): class CondConv2d (line 199) | class CondConv2d(nn.Module): method __init__ (line 208) | def __init__(self, in_channels, out_channels, kernel_size=3, method reset_parameters (line 238) | def reset_parameters(self): method forward (line 249) | def forward(self, x, routing_weights): function select_conv2d (line 290) | def select_conv2d(in_chs, out_chs, kernel_size, **kwargs): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/efficientnet_builder.py function get_bn_args_tf (line 30) | def get_bn_args_tf(): function resolve_bn_args (line 34) | def resolve_bn_args(kwargs): function resolve_se_args (line 52) | def resolve_se_args(kwargs, in_chs, act_layer=None): function resolve_act_layer (line 67) | def resolve_act_layer(kwargs, default='relu'): function make_divisible (line 74) | def make_divisible(v: int, divisor: int = 8, min_value: int = None): function round_channels (line 82) | def round_channels(channels, multiplier=1.0, divisor=8, channel_min=None): function drop_connect (line 90) | def drop_connect(inputs, training: bool = False, drop_connect_rate: floa... class SqueezeExcite (line 103) | class SqueezeExcite(nn.Module): method __init__ (line 105) | def __init__(self, in_chs, se_ratio=0.25, reduced_base_chs=None, act_l... method forward (line 113) | def forward(self, x): class ConvBnAct (line 122) | class ConvBnAct(nn.Module): method __init__ (line 123) | def __init__(self, in_chs, out_chs, kernel_size, method forward (line 132) | def forward(self, x): class DepthwiseSeparableConv (line 139) | class DepthwiseSeparableConv(nn.Module): method __init__ (line 144) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 170) | def forward(self, x): class InvertedResidual (line 190) | class InvertedResidual(nn.Module): method __init__ (line 193) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 227) | def forward(self, x): class CondConvResidual (line 254) | class CondConvResidual(InvertedResidual): method __init__ (line 257) | def __init__(self, in_chs, out_chs, dw_kernel_size=3, method forward (line 275) | def forward(self, x): class EdgeResidual (line 306) | class EdgeResidual(nn.Module): method __init__ (line 309) | def __init__(self, in_chs, out_chs, exp_kernel_size=3, exp_ratio=1.0, ... method forward (line 334) | def forward(self, x): class EfficientNetBuilder (line 357) | class EfficientNetBuilder: method __init__ (line 367) | def __init__(self, channel_multiplier=1.0, channel_divisor=8, channel_... method _round_channels (line 385) | def _round_channels(self, chs): method _make_block (line 388) | def _make_block(self, ba): method _make_stack (line 423) | def _make_stack(self, stack_args): method __call__ (line 435) | def __call__(self, in_chs, block_args): function _parse_ksize (line 456) | def _parse_ksize(ss): function _decode_block_str (line 463) | def _decode_block_str(block_str): function _scale_stage_depth (line 582) | def _scale_stage_depth(stack_args, repeats, depth_multiplier=1.0, depth_... function decode_arch_def (line 620) | def decode_arch_def(arch_def, depth_multiplier=1.0, depth_trunc='ceil', ... function initialize_weight_goog (line 640) | def initialize_weight_goog(m, n='', fix_group_fanout=True): function initialize_weight_default (line 672) | def initialize_weight_default(m, n=''): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/gen_efficientnet.py class GenEfficientNet (line 215) | class GenEfficientNet(nn.Module): method __init__ (line 226) | def __init__(self, block_args, num_classes=1000, in_chans=3, num_featu... method features (line 259) | def features(self, x): method as_sequential (line 269) | def as_sequential(self): method forward (line 277) | def forward(self, x): function _create_model (line 286) | def _create_model(model_kwargs, variant, pretrained=False): function _gen_mnasnet_a1 (line 296) | def _gen_mnasnet_a1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_b1 (line 334) | def _gen_mnasnet_b1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_small (line 372) | def _gen_mnasnet_small(variant, channel_multiplier=1.0, pretrained=False... function _gen_mobilenet_v2 (line 403) | def _gen_mobilenet_v2( function _gen_fbnetc (line 433) | def _gen_fbnetc(variant, channel_multiplier=1.0, pretrained=False, **kwa... function _gen_spnasnet (line 465) | def _gen_spnasnet(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_efficientnet (line 502) | def _gen_efficientnet(variant, channel_multiplier=1.0, depth_multiplier=... function _gen_efficientnet_edge (line 548) | def _gen_efficientnet_edge(variant, channel_multiplier=1.0, depth_multip... function _gen_efficientnet_condconv (line 573) | def _gen_efficientnet_condconv( function _gen_efficientnet_lite (line 599) | def _gen_efficientnet_lite(variant, channel_multiplier=1.0, depth_multip... function _gen_mixnet_s (line 641) | def _gen_mixnet_s(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_mixnet_m (line 676) | def _gen_mixnet_m(variant, channel_multiplier=1.0, depth_multiplier=1.0,... function mnasnet_050 (line 711) | def mnasnet_050(pretrained=False, **kwargs): function mnasnet_075 (line 717) | def mnasnet_075(pretrained=False, **kwargs): function mnasnet_100 (line 723) | def mnasnet_100(pretrained=False, **kwargs): function mnasnet_b1 (line 729) | def mnasnet_b1(pretrained=False, **kwargs): function mnasnet_140 (line 734) | def mnasnet_140(pretrained=False, **kwargs): function semnasnet_050 (line 740) | def semnasnet_050(pretrained=False, **kwargs): function semnasnet_075 (line 746) | def semnasnet_075(pretrained=False, **kwargs): function semnasnet_100 (line 752) | def semnasnet_100(pretrained=False, **kwargs): function mnasnet_a1 (line 758) | def mnasnet_a1(pretrained=False, **kwargs): function semnasnet_140 (line 763) | def semnasnet_140(pretrained=False, **kwargs): function mnasnet_small (line 769) | def mnasnet_small(pretrained=False, **kwargs): function mobilenetv2_100 (line 775) | def mobilenetv2_100(pretrained=False, **kwargs): function mobilenetv2_140 (line 781) | def mobilenetv2_140(pretrained=False, **kwargs): function mobilenetv2_110d (line 787) | def mobilenetv2_110d(pretrained=False, **kwargs): function mobilenetv2_120d (line 794) | def mobilenetv2_120d(pretrained=False, **kwargs): function fbnetc_100 (line 801) | def fbnetc_100(pretrained=False, **kwargs): function spnasnet_100 (line 810) | def spnasnet_100(pretrained=False, **kwargs): function efficientnet_b0 (line 816) | def efficientnet_b0(pretrained=False, **kwargs): function efficientnet_b1 (line 824) | def efficientnet_b1(pretrained=False, **kwargs): function efficientnet_b2 (line 832) | def efficientnet_b2(pretrained=False, **kwargs): function efficientnet_b3 (line 840) | def efficientnet_b3(pretrained=False, **kwargs): function efficientnet_b4 (line 848) | def efficientnet_b4(pretrained=False, **kwargs): function efficientnet_b5 (line 856) | def efficientnet_b5(pretrained=False, **kwargs): function efficientnet_b6 (line 864) | def efficientnet_b6(pretrained=False, **kwargs): function efficientnet_b7 (line 872) | def efficientnet_b7(pretrained=False, **kwargs): function efficientnet_b8 (line 880) | def efficientnet_b8(pretrained=False, **kwargs): function efficientnet_l2 (line 888) | def efficientnet_l2(pretrained=False, **kwargs): function efficientnet_es (line 896) | def efficientnet_es(pretrained=False, **kwargs): function efficientnet_em (line 903) | def efficientnet_em(pretrained=False, **kwargs): function efficientnet_el (line 910) | def efficientnet_el(pretrained=False, **kwargs): function efficientnet_cc_b0_4e (line 917) | def efficientnet_cc_b0_4e(pretrained=False, **kwargs): function efficientnet_cc_b0_8e (line 925) | def efficientnet_cc_b0_8e(pretrained=False, **kwargs): function efficientnet_cc_b1_8e (line 934) | def efficientnet_cc_b1_8e(pretrained=False, **kwargs): function efficientnet_lite0 (line 943) | def efficientnet_lite0(pretrained=False, **kwargs): function efficientnet_lite1 (line 950) | def efficientnet_lite1(pretrained=False, **kwargs): function efficientnet_lite2 (line 957) | def efficientnet_lite2(pretrained=False, **kwargs): function efficientnet_lite3 (line 964) | def efficientnet_lite3(pretrained=False, **kwargs): function efficientnet_lite4 (line 971) | def efficientnet_lite4(pretrained=False, **kwargs): function tf_efficientnet_b0 (line 978) | def tf_efficientnet_b0(pretrained=False, **kwargs): function tf_efficientnet_b1 (line 987) | def tf_efficientnet_b1(pretrained=False, **kwargs): function tf_efficientnet_b2 (line 996) | def tf_efficientnet_b2(pretrained=False, **kwargs): function tf_efficientnet_b3 (line 1005) | def tf_efficientnet_b3(pretrained=False, **kwargs): function tf_efficientnet_b4 (line 1014) | def tf_efficientnet_b4(pretrained=False, **kwargs): function tf_efficientnet_b5 (line 1023) | def tf_efficientnet_b5(pretrained=False, **kwargs): function tf_efficientnet_b6 (line 1032) | def tf_efficientnet_b6(pretrained=False, **kwargs): function tf_efficientnet_b7 (line 1041) | def tf_efficientnet_b7(pretrained=False, **kwargs): function tf_efficientnet_b8 (line 1050) | def tf_efficientnet_b8(pretrained=False, **kwargs): function tf_efficientnet_b0_ap (line 1059) | def tf_efficientnet_b0_ap(pretrained=False, **kwargs): function tf_efficientnet_b1_ap (line 1070) | def tf_efficientnet_b1_ap(pretrained=False, **kwargs): function tf_efficientnet_b2_ap (line 1081) | def tf_efficientnet_b2_ap(pretrained=False, **kwargs): function tf_efficientnet_b3_ap (line 1092) | def tf_efficientnet_b3_ap(pretrained=False, **kwargs): function tf_efficientnet_b4_ap (line 1103) | def tf_efficientnet_b4_ap(pretrained=False, **kwargs): function tf_efficientnet_b5_ap (line 1114) | def tf_efficientnet_b5_ap(pretrained=False, **kwargs): function tf_efficientnet_b6_ap (line 1125) | def tf_efficientnet_b6_ap(pretrained=False, **kwargs): function tf_efficientnet_b7_ap (line 1137) | def tf_efficientnet_b7_ap(pretrained=False, **kwargs): function tf_efficientnet_b8_ap (line 1149) | def tf_efficientnet_b8_ap(pretrained=False, **kwargs): function tf_efficientnet_b0_ns (line 1161) | def tf_efficientnet_b0_ns(pretrained=False, **kwargs): function tf_efficientnet_b1_ns (line 1172) | def tf_efficientnet_b1_ns(pretrained=False, **kwargs): function tf_efficientnet_b2_ns (line 1183) | def tf_efficientnet_b2_ns(pretrained=False, **kwargs): function tf_efficientnet_b3_ns (line 1194) | def tf_efficientnet_b3_ns(pretrained=False, **kwargs): function tf_efficientnet_b4_ns (line 1205) | def tf_efficientnet_b4_ns(pretrained=False, **kwargs): function tf_efficientnet_b5_ns (line 1216) | def tf_efficientnet_b5_ns(pretrained=False, **kwargs): function tf_efficientnet_b6_ns (line 1227) | def tf_efficientnet_b6_ns(pretrained=False, **kwargs): function tf_efficientnet_b7_ns (line 1239) | def tf_efficientnet_b7_ns(pretrained=False, **kwargs): function tf_efficientnet_l2_ns_475 (line 1251) | def tf_efficientnet_l2_ns_475(pretrained=False, **kwargs): function tf_efficientnet_l2_ns (line 1263) | def tf_efficientnet_l2_ns(pretrained=False, **kwargs): function tf_efficientnet_es (line 1275) | def tf_efficientnet_es(pretrained=False, **kwargs): function tf_efficientnet_em (line 1284) | def tf_efficientnet_em(pretrained=False, **kwargs): function tf_efficientnet_el (line 1293) | def tf_efficientnet_el(pretrained=False, **kwargs): function tf_efficientnet_cc_b0_4e (line 1302) | def tf_efficientnet_cc_b0_4e(pretrained=False, **kwargs): function tf_efficientnet_cc_b0_8e (line 1311) | def tf_efficientnet_cc_b0_8e(pretrained=False, **kwargs): function tf_efficientnet_cc_b1_8e (line 1321) | def tf_efficientnet_cc_b1_8e(pretrained=False, **kwargs): function tf_efficientnet_lite0 (line 1331) | def tf_efficientnet_lite0(pretrained=False, **kwargs): function tf_efficientnet_lite1 (line 1340) | def tf_efficientnet_lite1(pretrained=False, **kwargs): function tf_efficientnet_lite2 (line 1349) | def tf_efficientnet_lite2(pretrained=False, **kwargs): function tf_efficientnet_lite3 (line 1358) | def tf_efficientnet_lite3(pretrained=False, **kwargs): function tf_efficientnet_lite4 (line 1367) | def tf_efficientnet_lite4(pretrained=False, **kwargs): function mixnet_s (line 1376) | def mixnet_s(pretrained=False, **kwargs): function mixnet_m (line 1385) | def mixnet_m(pretrained=False, **kwargs): function mixnet_l (line 1394) | def mixnet_l(pretrained=False, **kwargs): function mixnet_xl (line 1403) | def mixnet_xl(pretrained=False, **kwargs): function mixnet_xxl (line 1413) | def mixnet_xxl(pretrained=False, **kwargs): function tf_mixnet_s (line 1423) | def tf_mixnet_s(pretrained=False, **kwargs): function tf_mixnet_m (line 1433) | def tf_mixnet_m(pretrained=False, **kwargs): function tf_mixnet_l (line 1443) | def tf_mixnet_l(pretrained=False, **kwargs): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/helpers.py function load_checkpoint (line 13) | def load_checkpoint(model, checkpoint_path): function load_pretrained (line 34) | def load_pretrained(model, url, filter_fn=None, strict=True): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/mobilenetv3.py class MobileNetV3 (line 48) | class MobileNetV3(nn.Module): method __init__ (line 57) | def __init__(self, block_args, num_classes=1000, in_chans=3, stem_size... method as_sequential (line 86) | def as_sequential(self): method features (line 94) | def features(self, x): method forward (line 104) | def forward(self, x): function _create_model (line 112) | def _create_model(model_kwargs, variant, pretrained=False): function _gen_mobilenet_v3_rw (line 122) | def _gen_mobilenet_v3_rw(variant, channel_multiplier=1.0, pretrained=Fal... function _gen_mobilenet_v3 (line 171) | def _gen_mobilenet_v3(variant, channel_multiplier=1.0, pretrained=False,... function mobilenetv3_rw (line 268) | def mobilenetv3_rw(pretrained=False, **kwargs): function mobilenetv3_large_075 (line 280) | def mobilenetv3_large_075(pretrained=False, **kwargs): function mobilenetv3_large_100 (line 287) | def mobilenetv3_large_100(pretrained=False, **kwargs): function mobilenetv3_large_minimal_100 (line 294) | def mobilenetv3_large_minimal_100(pretrained=False, **kwargs): function mobilenetv3_small_075 (line 301) | def mobilenetv3_small_075(pretrained=False, **kwargs): function mobilenetv3_small_100 (line 307) | def mobilenetv3_small_100(pretrained=False, **kwargs): function mobilenetv3_small_minimal_100 (line 313) | def mobilenetv3_small_minimal_100(pretrained=False, **kwargs): function tf_mobilenetv3_large_075 (line 319) | def tf_mobilenetv3_large_075(pretrained=False, **kwargs): function tf_mobilenetv3_large_100 (line 327) | def tf_mobilenetv3_large_100(pretrained=False, **kwargs): function tf_mobilenetv3_large_minimal_100 (line 335) | def tf_mobilenetv3_large_minimal_100(pretrained=False, **kwargs): function tf_mobilenetv3_small_075 (line 343) | def tf_mobilenetv3_small_075(pretrained=False, **kwargs): function tf_mobilenetv3_small_100 (line 351) | def tf_mobilenetv3_small_100(pretrained=False, **kwargs): function tf_mobilenetv3_small_minimal_100 (line 359) | def tf_mobilenetv3_small_minimal_100(pretrained=False, **kwargs): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/geffnet/model_factory.py function create_model (line 8) | def create_model( FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/utils.py class AverageMeter (line 4) | class AverageMeter: method __init__ (line 6) | def __init__(self): method reset (line 9) | def reset(self): method update (line 15) | def update(self, val, n=1): function accuracy (line 22) | def accuracy(output, target, topk=(1,)): function get_outdir (line 38) | def get_outdir(path, *paths, inc=False): FILE: modules/control/proc/normalbae/nets/submodules/efficientnet_repo/validate.py function main (line 66) | def main(): FILE: modules/control/proc/normalbae/nets/submodules/encoder.py class Encoder (line 6) | class Encoder(nn.Module): method __init__ (line 7) | def __init__(self): method forward (line 20) | def forward(self, x): FILE: modules/control/proc/normalbae/nets/submodules/submodules.py class UpSampleBN (line 10) | class UpSampleBN(nn.Module): method __init__ (line 11) | def __init__(self, skip_input, output_features): method forward (line 21) | def forward(self, x, concat_with): class UpSampleGN (line 28) | class UpSampleGN(nn.Module): method __init__ (line 29) | def __init__(self, skip_input, output_features): method forward (line 39) | def forward(self, x, concat_with): class Conv2d (line 46) | class Conv2d(nn.Conv2d): method __init__ (line 47) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 52) | def forward(self, x): function norm_normalize (line 64) | def norm_normalize(norm_out): function sample_points (line 74) | def sample_points(init_normal, gt_norm_mask, sampling_ratio, beta): FILE: modules/control/proc/openpose/__init__.py class PoseResult (line 29) | class PoseResult(NamedTuple): function draw_poses (line 35) | def draw_poses(poses: List[PoseResult], H, W, draw_body=True, draw_hand=... class OpenposeDetector (line 66) | class OpenposeDetector: method __init__ (line 73) | def __init__(self, body_estimation, hand_estimation=None, face_estimat... method from_pretrained (line 79) | def from_pretrained(cls, pretrained_model_or_path, filename=None, hand... method to (line 109) | def to(self, device): method detect_hands (line 115) | def detect_hands(self, body: BodyResult, oriImg) -> Tuple[Union[HandRe... method detect_face (line 137) | def detect_face(self, body: BodyResult, oriImg) -> Union[FaceResult, N... method detect_poses (line 156) | def detect_poses(self, oriImg, include_hand=False, include_face=False)... method __call__ (line 194) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/openpose/body.py class Keypoint (line 10) | class Keypoint(NamedTuple): class BodyResult (line 17) | class BodyResult(NamedTuple): class Body (line 28) | class Body(object): method __init__ (line 29) | def __init__(self, model_path): method to (line 35) | def to(self, device): method __call__ (line 39) | def __call__(self, oriImg): method format_body_result (line 224) | def format_body_result(candidate: np.ndarray, subset: np.ndarray) -> L... FILE: modules/control/proc/openpose/face.py class FaceNet (line 10) | class FaceNet(Module): method __init__ (line 12) | def __init__(self): method forward (line 189) | def forward(self, x): class Face (line 303) | class Face(object): method __init__ (line 314) | def __init__(self, face_model_path, method to (line 325) | def to(self, device): method __call__ (line 329) | def __call__(self, face_img): method compute_peaks_from_heatmaps (line 345) | def compute_peaks_from_heatmaps(self, heatmaps): FILE: modules/control/proc/openpose/hand.py class Hand (line 11) | class Hand(object): method __init__ (line 12) | def __init__(self, model_path): method to (line 18) | def to(self, device): method __call__ (line 22) | def __call__(self, oriImgRaw): FILE: modules/control/proc/openpose/model.py function make_layers (line 5) | def make_layers(block, no_relu_layers): class bodypose_model (line 22) | class bodypose_model(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 112) | def forward(self, x): class handpose_model (line 141) | class handpose_model(nn.Module): method __init__ (line 142) | def __init__(self): method forward (line 202) | def forward(self, x): FILE: modules/control/proc/openpose/util.py function smart_resize (line 10) | def smart_resize(x, s): function smart_resize_k (line 24) | def smart_resize_k(x, fx, fy): function padRightDownCorner (line 38) | def padRightDownCorner(img, stride, padValue): function transfer (line 61) | def transfer(model, model_weights): function draw_bodypose (line 68) | def draw_bodypose(canvas: np.ndarray, keypoints: List[Keypoint]) -> np.n... function draw_handpose (line 125) | def draw_handpose(canvas: np.ndarray, keypoints: Union[List[Keypoint], N... function draw_facepose (line 171) | def draw_facepose(canvas: np.ndarray, keypoints: Union[List[Keypoint], N... function handDetect (line 201) | def handDetect(body: BodyResult, oriImg) -> List[Tuple[int, int, int, bo... function faceDetect (line 299) | def faceDetect(body: BodyResult, oriImg) -> Union[Tuple[int, int, int], ... function npmax (line 381) | def npmax(array): FILE: modules/control/proc/pidi.py class PidiNetDetector (line 14) | class PidiNetDetector: method __init__ (line 15) | def __init__(self, model): method from_pretrained (line 19) | def from_pretrained(cls, pretrained_model_or_path, filename=None, cach... method to (line 30) | def to(self, device): method __call__ (line 34) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/pidi_model.py function img2tensor (line 15) | def img2tensor(imgs, bgr2rgb=True, float32=True): function createConvFunc (line 298) | def createConvFunc(op_type): class Conv2d (line 349) | class Conv2d(nn.Module): method __init__ (line 350) | def __init__(self, pdc, in_channels, out_channels, kernel_size, stride... method reset_parameters (line 371) | def reset_parameters(self): method forward (line 378) | def forward(self, input): class CSAM (line 382) | class CSAM(nn.Module): method __init__ (line 386) | def __init__(self, channels): method forward (line 396) | def forward(self, x): class CDCM (line 404) | class CDCM(nn.Module): method __init__ (line 408) | def __init__(self, in_channels, out_channels): method forward (line 419) | def forward(self, x): class MapReduce (line 429) | class MapReduce(nn.Module): method __init__ (line 433) | def __init__(self, channels): method forward (line 438) | def forward(self, x): class PDCBlock (line 442) | class PDCBlock(nn.Module): method __init__ (line 443) | def __init__(self, pdc, inplane, ouplane, stride=1): method forward (line 455) | def forward(self, x): class PDCBlock_converted (line 466) | class PDCBlock_converted(nn.Module): method __init__ (line 471) | def __init__(self, pdc, inplane, ouplane, stride=1): method forward (line 485) | def forward(self, x): class PiDiNet (line 496) | class PiDiNet(nn.Module): method __init__ (line 497) | def __init__(self, inplane, pdcs, dil=None, sa=False, convert=False): method get_weights (line 576) | def get_weights(self): method forward (line 590) | def forward(self, x): function config_model (line 649) | def config_model(model): function pidinet (line 664) | def pidinet(): FILE: modules/control/proc/segment_anything/__init__.py class SamDetector (line 21) | class SamDetector: method __init__ (line 22) | def __init__(self, mask_generator: SamAutomaticMaskGenerator = None): method from_pretrained (line 26) | def from_pretrained(cls, model_path, filename, model_type, cache_dir=N... method show_anns (line 38) | def show_anns(self, anns): method __call__ (line 54) | def __call__(self, input_image: Union[np.ndarray, Image.Image]=None, d... FILE: modules/control/proc/segment_anything/automatic_mask_generator.py class SamAutomaticMaskGenerator (line 33) | class SamAutomaticMaskGenerator: method __init__ (line 34) | def __init__( method generate (line 128) | def generate(self, image: np.ndarray) -> List[Dict[str, Any]]: method _generate_masks (line 188) | def _generate_masks(self, image: np.ndarray) -> MaskData: method _process_crop (line 216) | def _process_crop( method _process_batch (line 257) | def _process_batch( method postprocess_small_regions (line 315) | def postprocess_small_regions( FILE: modules/control/proc/segment_anything/build_sam.py function build_sam_vit_h (line 14) | def build_sam_vit_h(checkpoint=None): function build_sam_vit_l (line 27) | def build_sam_vit_l(checkpoint=None): function build_sam_vit_b (line 37) | def build_sam_vit_b(checkpoint=None): function build_sam_vit_t (line 47) | def build_sam_vit_t(checkpoint=None): function _build_sam (line 105) | def _build_sam( FILE: modules/control/proc/segment_anything/modeling/common.py class MLPBlock (line 13) | class MLPBlock(nn.Module): method __init__ (line 14) | def __init__( method forward (line 25) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNorm2d (line 31) | class LayerNorm2d(nn.Module): method __init__ (line 32) | def __init__(self, num_channels: int, eps: float = 1e-6) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: modules/control/proc/segment_anything/modeling/image_encoder.py class ImageEncoderViT (line 17) | class ImageEncoderViT(nn.Module): method __init__ (line 18) | def __init__( method forward (line 106) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 119) | class Block(nn.Module): method __init__ (line 122) | def __init__( method forward (line 166) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Attention (line 185) | class Attention(nn.Module): method __init__ (line 188) | def __init__( method forward (line 224) | def forward(self, x: torch.Tensor) -> torch.Tensor: function window_partition (line 243) | def window_partition(x: torch.Tensor, window_size: int) -> Tuple[torch.T... function window_unpartition (line 267) | def window_unpartition( function get_rel_pos (line 292) | def get_rel_pos(q_size: int, k_size: int, rel_pos: torch.Tensor) -> torc... function add_decomposed_rel_pos (line 325) | def add_decomposed_rel_pos( class PatchEmbed (line 364) | class PatchEmbed(nn.Module): method __init__ (line 369) | def __init__( method forward (line 391) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: modules/control/proc/segment_anything/modeling/mask_decoder.py class MaskDecoder (line 16) | class MaskDecoder(nn.Module): method __init__ (line 17) | def __init__( method forward (line 71) | def forward( method predict_masks (line 112) | def predict_masks( class MLP (line 154) | class MLP(nn.Module): method __init__ (line 155) | def __init__( method forward (line 171) | def forward(self, x): FILE: modules/control/proc/segment_anything/modeling/prompt_encoder.py class PromptEncoder (line 16) | class PromptEncoder(nn.Module): method __init__ (line 17) | def __init__( method get_dense_pe (line 62) | def get_dense_pe(self) -> torch.Tensor: method _embed_points (line 73) | def _embed_points( method _embed_boxes (line 93) | def _embed_boxes(self, boxes: torch.Tensor) -> torch.Tensor: method _embed_masks (line 102) | def _embed_masks(self, masks: torch.Tensor) -> torch.Tensor: method _get_batch_size (line 107) | def _get_batch_size( method _get_device (line 125) | def _get_device(self) -> torch.device: method forward (line 128) | def forward( class PositionEmbeddingRandom (line 171) | class PositionEmbeddingRandom(nn.Module): method __init__ (line 176) | def __init__(self, num_pos_feats: int = 64, scale: Optional[float] = N... method _pe_encoding (line 185) | def _pe_encoding(self, coords: torch.Tensor) -> torch.Tensor: method forward (line 194) | def forward(self, size: Tuple[int, int]) -> torch.Tensor: method forward_with_coords (line 207) | def forward_with_coords( FILE: modules/control/proc/segment_anything/modeling/sam.py class Sam (line 19) | class Sam(nn.Module): method __init__ (line 23) | def __init__( method device (line 55) | def device(self) -> Any: method forward (line 58) | def forward( method postprocess_masks (line 137) | def postprocess_masks( method preprocess (line 168) | def preprocess(self, x: torch.Tensor) -> torch.Tensor: FILE: modules/control/proc/segment_anything/modeling/tiny_vit_sam.py class Conv2d_BN (line 21) | class Conv2d_BN(torch.nn.Sequential): method __init__ (line 22) | def __init__(self, a, b, ks=1, stride=1, pad=0, dilation=1, method fuse (line 32) | def fuse(self): class DropPath (line 45) | class DropPath(TimmDropPath): method __init__ (line 46) | def __init__(self, drop_prob=None): method __repr__ (line 50) | def __repr__(self): class PatchEmbed (line 56) | class PatchEmbed(nn.Module): method __init__ (line 57) | def __init__(self, in_chans, embed_dim, resolution, activation): method forward (line 72) | def forward(self, x): class MBConv (line 76) | class MBConv(nn.Module): method __init__ (line 77) | def __init__(self, in_chans, out_chans, expand_ratio, method forward (line 98) | def forward(self, x): class PatchMerging (line 117) | class PatchMerging(nn.Module): method __init__ (line 118) | def __init__(self, input_resolution, dim, out_dim, activation): method forward (line 132) | def forward(self, x): class ConvLayer (line 149) | class ConvLayer(nn.Module): method __init__ (line 150) | def __init__(self, dim, input_resolution, depth, method forward (line 177) | def forward(self, x): class Mlp (line 188) | class Mlp(nn.Module): method __init__ (line 189) | def __init__(self, in_features, hidden_features=None, method forward (line 200) | def forward(self, x): class Attention (line 211) | class Attention(torch.nn.Module): method __init__ (line 212) | def __init__(self, dim, key_dim, num_heads=8, method train (line 249) | def train(self, mode=True): method forward (line 256) | def forward(self, x): # x (B,N,C) class TinyViTBlock (line 283) | class TinyViTBlock(nn.Module): method __init__ (line 299) | def __init__(self, dim, input_resolution, num_heads, window_size=7, method forward (line 331) | def forward(self, x): method extra_repr (line 374) | def extra_repr(self) -> str: class BasicLayer (line 378) | class BasicLayer(nn.Module): method __init__ (line 397) | def __init__(self, dim, input_resolution, depth, num_heads, window_size, method forward (line 431) | def forward(self, x): method extra_repr (line 441) | def extra_repr(self) -> str: class LayerNorm2d (line 444) | class LayerNorm2d(nn.Module): method __init__ (line 445) | def __init__(self, num_channels: int, eps: float = 1e-6) -> None: method forward (line 451) | def forward(self, x: torch.Tensor) -> torch.Tensor: class TinyViT (line 457) | class TinyViT(nn.Module): method __init__ (line 458) | def __init__(self, img_size=224, in_chans=3, num_classes=1000, method set_layer_lr_decay (line 556) | def set_layer_lr_decay(self, layer_lr_decay): method _init_weights (line 590) | def _init_weights(self, m): method no_weight_decay_keywords (line 600) | def no_weight_decay_keywords(self): method forward_features (line 603) | def forward_features(self, x): method forward (line 619) | def forward(self, x): function register_tiny_vit_model (line 637) | def register_tiny_vit_model(fn): function tiny_vit_5m_224 (line 663) | def tiny_vit_5m_224(pretrained=False, num_classes=1000, drop_path_rate=0... function tiny_vit_11m_224 (line 675) | def tiny_vit_11m_224(pretrained=False, num_classes=1000, drop_path_rate=... function tiny_vit_21m_224 (line 687) | def tiny_vit_21m_224(pretrained=False, num_classes=1000, drop_path_rate=... function tiny_vit_21m_384 (line 699) | def tiny_vit_21m_384(pretrained=False, num_classes=1000, drop_path_rate=... function tiny_vit_21m_512 (line 712) | def tiny_vit_21m_512(pretrained=False, num_classes=1000, drop_path_rate=... FILE: modules/control/proc/segment_anything/modeling/transformer.py class TwoWayTransformer (line 16) | class TwoWayTransformer(nn.Module): method __init__ (line 17) | def __init__( method forward (line 62) | def forward( class TwoWayAttentionBlock (line 109) | class TwoWayAttentionBlock(nn.Module): method __init__ (line 110) | def __init__( method forward (line 151) | def forward( class Attention (line 185) | class Attention(nn.Module): method __init__ (line 191) | def __init__( method _separate_heads (line 208) | def _separate_heads(self, x: Tensor, num_heads: int) -> Tensor: method _recombine_heads (line 213) | def _recombine_heads(self, x: Tensor) -> Tensor: method forward (line 218) | def forward(self, q: Tensor, k: Tensor, v: Tensor) -> Tensor: FILE: modules/control/proc/segment_anything/predictor.py class SamPredictor (line 14) | class SamPredictor: method __init__ (line 15) | def __init__( method set_image (line 31) | def set_image( method set_torch_image (line 59) | def set_torch_image( method predict (line 88) | def predict( method predict_torch (line 164) | def predict_torch( method get_image_embedding (line 240) | def get_image_embedding(self) -> torch.Tensor: method device (line 254) | def device(self) -> torch.device: method reset_image (line 257) | def reset_image(self) -> None: FILE: modules/control/proc/segment_anything/utils/amg.py class MaskData (line 16) | class MaskData: method __init__ (line 22) | def __init__(self, **kwargs) -> None: method __setitem__ (line 29) | def __setitem__(self, key: str, item: Any) -> None: method __delitem__ (line 35) | def __delitem__(self, key: str) -> None: method __getitem__ (line 38) | def __getitem__(self, key: str) -> Any: method items (line 41) | def items(self) -> ItemsView[str, Any]: method filter (line 44) | def filter(self, keep: torch.Tensor) -> None: method cat (line 59) | def cat(self, new_stats: "MaskData") -> None: method to_numpy (line 72) | def to_numpy(self) -> None: function is_box_near_crop_edge (line 78) | def is_box_near_crop_edge( function box_xyxy_to_xywh (line 91) | def box_xyxy_to_xywh(box_xyxy: torch.Tensor) -> torch.Tensor: function batch_iterator (line 98) | def batch_iterator(batch_size: int, *args) -> Generator[List[Any], None,... function mask_to_rle_pytorch (line 107) | def mask_to_rle_pytorch(tensor: torch.Tensor) -> List[Dict[str, Any]]: function rle_to_mask (line 138) | def rle_to_mask(rle: Dict[str, Any]) -> np.ndarray: function area_from_rle (line 152) | def area_from_rle(rle: Dict[str, Any]) -> int: function calculate_stability_score (line 156) | def calculate_stability_score( function build_point_grid (line 179) | def build_point_grid(n_per_side: int) -> np.ndarray: function build_all_layer_point_grids (line 189) | def build_all_layer_point_grids( function generate_crop_boxes (line 200) | def generate_crop_boxes( function uncrop_boxes_xyxy (line 237) | def uncrop_boxes_xyxy(boxes: torch.Tensor, crop_box: List[int]) -> torch... function uncrop_points (line 246) | def uncrop_points(points: torch.Tensor, crop_box: List[int]) -> torch.Te... function uncrop_masks (line 255) | def uncrop_masks( function remove_small_regions (line 267) | def remove_small_regions( function coco_encode_rle (line 294) | def coco_encode_rle(uncompressed_rle: Dict[str, Any]) -> Dict[str, Any]: function batched_mask_to_box (line 303) | def batched_mask_to_box(masks: torch.Tensor) -> torch.Tensor: FILE: modules/control/proc/segment_anything/utils/onnx.py class SamOnnxModel (line 17) | class SamOnnxModel(nn.Module): method __init__ (line 25) | def __init__( method resize_longest_image_size (line 42) | def resize_longest_image_size( method _embed_points (line 51) | def _embed_points(self, point_coords: torch.Tensor, point_labels: torc... method _embed_masks (line 69) | def _embed_masks(self, input_mask: torch.Tensor, has_mask_input: torch... method mask_postprocessing (line 76) | def mask_postprocessing(self, masks: torch.Tensor, orig_im_size: torch... method select_masks (line 92) | def select_masks( method forward (line 107) | def forward( FILE: modules/control/proc/segment_anything/utils/transforms.py class ResizeLongestSide (line 16) | class ResizeLongestSide: method __init__ (line 23) | def __init__(self, target_length: int) -> None: method apply_image (line 26) | def apply_image(self, image: np.ndarray) -> np.ndarray: method apply_coords (line 33) | def apply_coords(self, coords: np.ndarray, original_size: Tuple[int, .... method apply_boxes (line 47) | def apply_boxes(self, boxes: np.ndarray, original_size: Tuple[int, ...... method apply_image_torch (line 55) | def apply_image_torch(self, image: torch.Tensor) -> torch.Tensor: method apply_coords_torch (line 67) | def apply_coords_torch( method apply_boxes_torch (line 83) | def apply_boxes_torch( method get_preprocess_shape (line 94) | def get_preprocess_shape(oldh: int, oldw: int, long_side_length: int) ... FILE: modules/control/proc/shuffle.py class ContentShuffleDetector (line 10) | class ContentShuffleDetector: method __call__ (line 11) | def __call__(self, input_image, h=None, w=None, f=None, detect_resolut... class ColorShuffleDetector (line 49) | class ColorShuffleDetector: method __call__ (line 50) | def __call__(self, img): class GrayDetector (line 66) | class GrayDetector: method __call__ (line 67) | def __call__(self, img): class DownSampleDetector (line 81) | class DownSampleDetector: method __call__ (line 82) | def __call__(self, img, level=3, k=16.0): class Image2MaskShuffleDetector (line 93) | class Image2MaskShuffleDetector: method __init__ (line 94) | def __init__(self, resolution=(640, 512)): method __call__ (line 97) | def __call__(self, img): FILE: modules/control/proc/zoe/__init__.py class ZoeDetector (line 18) | class ZoeDetector: method __init__ (line 19) | def __init__(self, model): method from_pretrained (line 23) | def from_pretrained(cls, pretrained_model_or_path, model_type="zoedept... method to (line 51) | def to(self, device): method __call__ (line 55) | def __call__(self, input_image, detect_resolution=512, image_resolutio... FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas.py function denormalize (line 32) | def denormalize(x): function get_activation (line 45) | def get_activation(name, bank): class Resize (line 51) | class Resize(object): method __init__ (line 55) | def __init__( method constrain_to_multiple_of (line 101) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 114) | def get_size(self, width, height): method __call__ (line 172) | def __call__(self, x): class PrepForMidas (line 176) | class PrepForMidas(object): method __init__ (line 177) | def __init__(self, resize_mode="minimal", keep_aspect_ratio=True, img_... method __call__ (line 186) | def __call__(self, x): class MidasCore (line 190) | class MidasCore(nn.Module): method __init__ (line 191) | def __init__(self, midas, trainable=False, fetch_features=True, layer_... method set_trainable (line 224) | def set_trainable(self, trainable): method set_fetch_features (line 232) | def set_fetch_features(self, fetch_features): method freeze (line 241) | def freeze(self): method unfreeze (line 247) | def unfreeze(self): method freeze_bn (line 253) | def freeze_bn(self): method forward (line 259) | def forward(self, x, denorm=False, return_rel_depth=False): method get_rel_pos_params (line 278) | def get_rel_pos_params(self): method get_enc_params_except_rel_pos (line 283) | def get_enc_params_except_rel_pos(self): method freeze_encoder (line 288) | def freeze_encoder(self, freeze_rel_pos=False): method attach_hooks (line 297) | def attach_hooks(self, midas): method remove_hooks (line 321) | def remove_hooks(self): method __del__ (line 326) | def __del__(self): method set_output_channels (line 329) | def set_output_channels(self, model_type): method build (line 333) | def build(midas_model_type="DPT_BEiT_L_384", train_midas=False, use_pr... method build_from_config (line 351) | def build_from_config(config): method parse_img_size (line 355) | def parse_img_size(config): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/hubconf.py function DPT_BEiT_L_512 (line 9) | def DPT_BEiT_L_512(pretrained=True, **kwargs): function DPT_BEiT_L_384 (line 32) | def DPT_BEiT_L_384(pretrained=True, **kwargs): function DPT_BEiT_B_384 (line 55) | def DPT_BEiT_B_384(pretrained=True, **kwargs): function DPT_SwinV2_L_384 (line 78) | def DPT_SwinV2_L_384(pretrained=True, **kwargs): function DPT_SwinV2_B_384 (line 101) | def DPT_SwinV2_B_384(pretrained=True, **kwargs): function DPT_SwinV2_T_256 (line 124) | def DPT_SwinV2_T_256(pretrained=True, **kwargs): function DPT_Swin_L_384 (line 147) | def DPT_Swin_L_384(pretrained=True, **kwargs): function DPT_Next_ViT_L_384 (line 170) | def DPT_Next_ViT_L_384(pretrained=True, **kwargs): function DPT_LeViT_224 (line 193) | def DPT_LeViT_224(pretrained=True, **kwargs): function DPT_Large (line 218) | def DPT_Large(pretrained=True, **kwargs): function DPT_Hybrid (line 241) | def DPT_Hybrid(pretrained=True, **kwargs): function MiDaS (line 264) | def MiDaS(pretrained=True, **kwargs): function MiDaS_small (line 283) | def MiDaS_small(pretrained=True, **kwargs): function transforms (line 303) | def transforms(): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/beit.py function forward_beit (line 14) | def forward_beit(pretrained, x): function patch_embed_forward (line 18) | def patch_embed_forward(self, x): function _get_rel_pos_bias (line 29) | def _get_rel_pos_bias(self, window_size): function attention_forward (line 65) | def attention_forward(self, x, resolution, shared_rel_pos_bias: Optional... function block_forward (line 94) | def block_forward(self, x, resolution, shared_rel_pos_bias: Optional[tor... function beit_forward_features (line 108) | def beit_forward_features(self, x): function _make_beit_backbone (line 130) | def _make_beit_backbone( function _make_pretrained_beitl16_512 (line 163) | def _make_pretrained_beitl16_512(pretrained, use_readout="ignore", hooks... function _make_pretrained_beitl16_384 (line 180) | def _make_pretrained_beitl16_384(pretrained, use_readout="ignore", hooks... function _make_pretrained_beitb16_384 (line 193) | def _make_pretrained_beitb16_384(pretrained, use_readout="ignore", hooks... FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/levit.py function forward_levit (line 9) | def forward_levit(pretrained, x): function _make_levit_backbone (line 23) | def _make_levit_backbone( class ConvTransposeNorm (line 59) | class ConvTransposeNorm(nn.Sequential): method __init__ (line 66) | def __init__( method fuse (line 76) | def fuse(self): function stem_b4_transpose (line 89) | def stem_b4_transpose(in_chs, out_chs, activation): function _make_pretrained_levit_384 (line 102) | def _make_pretrained_levit_384(pretrained, hooks=None): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/next_vit.py function forward_next_vit (line 7) | def forward_next_vit(pretrained, x): function _make_next_vit_backbone (line 11) | def _make_next_vit_backbone( function _make_pretrained_next_vit_large_6m (line 30) | def _make_pretrained_next_vit_large_6m(hooks=None): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin.py function _make_pretrained_swinl12_384 (line 6) | def _make_pretrained_swinl12_384(pretrained, hooks=None): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin2.py function _make_pretrained_swin2l24_384 (line 6) | def _make_pretrained_swin2l24_384(pretrained, hooks=None): function _make_pretrained_swin2b24_384 (line 16) | def _make_pretrained_swin2b24_384(pretrained, hooks=None): function _make_pretrained_swin2t16_256 (line 26) | def _make_pretrained_swin2t16_256(pretrained, hooks=None): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/swin_common.py function forward_swin (line 9) | def forward_swin(pretrained, x): function _make_swin_backbone (line 13) | def _make_swin_backbone( FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/utils.py class Slice (line 6) | class Slice(nn.Module): method __init__ (line 7) | def __init__(self, start_index=1): method forward (line 11) | def forward(self, x): class AddReadout (line 15) | class AddReadout(nn.Module): method __init__ (line 16) | def __init__(self, start_index=1): method forward (line 20) | def forward(self, x): class ProjectReadout (line 28) | class ProjectReadout(nn.Module): method __init__ (line 29) | def __init__(self, in_features, start_index=1): method forward (line 35) | def forward(self, x): class Transpose (line 42) | class Transpose(nn.Module): method __init__ (line 43) | def __init__(self, dim0, dim1): method forward (line 48) | def forward(self, x): function get_activation (line 56) | def get_activation(name): function forward_default (line 63) | def forward_default(pretrained, x, function_name="forward_features"): function forward_adapted_unflatten (line 83) | def forward_adapted_unflatten(pretrained, x, function_name="forward_feat... function get_readout_oper (line 127) | def get_readout_oper(vit_features, features, use_readout, start_index=1): function make_backbone_default (line 142) | def make_backbone_default( FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/backbones/vit.py function forward_vit (line 12) | def forward_vit(pretrained, x): function _resize_pos_embed (line 16) | def _resize_pos_embed(self, posemb, gs_h, gs_w): function forward_flex (line 33) | def forward_flex(self, x): function _make_vit_b16_backbone (line 75) | def _make_vit_b16_backbone( function _make_pretrained_vitl16_384 (line 104) | def _make_pretrained_vitl16_384(pretrained, use_readout="ignore", hooks=... function _make_pretrained_vitb16_384 (line 117) | def _make_pretrained_vitb16_384(pretrained, use_readout="ignore", hooks=... function _make_vit_b_rn50_backbone (line 126) | def _make_vit_b_rn50_backbone( function _make_pretrained_vitb_rn50_384 (line 222) | def _make_pretrained_vitb_rn50_384( FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/base_model.py class BaseModel (line 4) | class BaseModel(torch.nn.Module): method load (line 5) | def load(self, path): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/blocks.py function _make_encoder (line 32) | def _make_encoder(backbone, features, use_pretrained, groups=1, expand=F... function _make_scratch (line 135) | def _make_scratch(in_shape, out_shape, groups=1, expand=False): function _make_pretrained_efficientnet_lite3 (line 168) | def _make_pretrained_efficientnet_lite3(use_pretrained, exportable=False): function _make_efficientnet_backbone (line 178) | def _make_efficientnet_backbone(effnet): function _make_resnet_backbone (line 191) | def _make_resnet_backbone(resnet): function _make_pretrained_resnext101_wsl (line 204) | def _make_pretrained_resnext101_wsl(use_pretrained): class Interpolate (line 210) | class Interpolate(nn.Module): method __init__ (line 214) | def __init__(self, scale_factor, mode, align_corners=False): method forward (line 228) | def forward(self, x): class ResidualConvUnit (line 245) | class ResidualConvUnit(nn.Module): method __init__ (line 249) | def __init__(self, features): method forward (line 267) | def forward(self, x): class FeatureFusionBlock (line 284) | class FeatureFusionBlock(nn.Module): method __init__ (line 288) | def __init__(self, features): method forward (line 299) | def forward(self, *xs): class ResidualConvUnit_custom (line 321) | class ResidualConvUnit_custom(nn.Module): method __init__ (line 325) | def __init__(self, features, activation, bn): method forward (line 353) | def forward(self, x): class FeatureFusionBlock_custom (line 381) | class FeatureFusionBlock_custom(nn.Module): method __init__ (line 385) | def __init__(self, features, activation, deconv=False, bn=False, expan... method forward (line 412) | def forward(self, *xs, size=None): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/dpt_depth.py function _make_fusion_block (line 18) | def _make_fusion_block(features, use_bn, size = None): class DPT (line 30) | class DPT(BaseModel): method __init__ (line 31) | def __init__( method forward (line 110) | def forward(self, x): class DPTDepthModel (line 142) | class DPTDepthModel(DPT): method __init__ (line 143) | def __init__(self, path=None, non_negative=True, **kwargs): method forward (line 165) | def forward(self, x): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/midas_net.py class MidasNet (line 12) | class MidasNet(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=256, non_negative=True): method forward (line 49) | def forward(self, x): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/midas_net_custom.py class MidasNet_small (line 12) | class MidasNet_small(BaseModel): method __init__ (line 16) | def __init__(self, path=None, features=64, backbone="efficientnet_lite... method forward (line 75) | def forward(self, x): function fuse_model (line 111) | def fuse_model(m): FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/model_loader.py function load_model (line 29) | def load_model(device, model_path, model_type="dpt_large_384", optimize=... FILE: modules/control/proc/zoe/zoedepth/models/base_models/midas_repo/midas/transforms.py function apply_min_size (line 6) | def apply_min_size(sample, size, image_interpolation_method=cv2.INTER_AR... class Resize (line 48) | class Resize(object): method __init__ (line 52) | def __init__( method constrain_to_multiple_of (line 94) | def constrain_to_multiple_of(self, x, min_val=0, max_val=None): method get_size (line 105) | def get_size(self, width, height): method __call__ (line 162) | def __call__(self, sample): class NormalizeImage (line 197) | class NormalizeImage(object): method __init__ (line 201) | def __init__(self, mean, std): method __call__ (line 205) | def __call__(self, sample): class PrepareForNet (line 211) | class PrepareForNet(object): method __init__ (line 215) | def __init__(self): method __call__ (line 218) | def __call__(self, sample): FILE: modules/control/proc/zoe/zoedepth/models/builder.py function build_model (line 28) | def build_model(config) -> DepthModel: FILE: modules/control/proc/zoe/zoedepth/models/depth_model.py class DepthModel (line 35) | class DepthModel(nn.Module): method __init__ (line 36) | def __init__(self, device='cpu'): method to (line 40) | def to(self, device) -> nn.Module: method forward (line 44) | def forward(self, x, *args, **kwargs): method _infer (line 47) | def _infer(self, x: torch.Tensor): method _infer_with_pad_aug (line 57) | def _infer_with_pad_aug(self, x: torch.Tensor, pad_input: bool=True, f... method infer_with_flip_aug (line 99) | def infer_with_flip_aug(self, x, pad_input: bool=True, **kwargs) -> to... method infer (line 115) | def infer(self, x, pad_input: bool=True, with_flip_aug: bool=True, **k... method infer_pil (line 130) | def infer_pil(self, pil_img, pad_input: bool=True, with_flip_aug: bool... FILE: modules/control/proc/zoe/zoedepth/models/layers/attractor.py function exp_attractor (line 30) | def exp_attractor(dx, alpha: float = 300, gamma: int = 2): function inv_attractor (line 45) | def inv_attractor(dx, alpha: float = 300, gamma: int = 2): class AttractorLayer (line 60) | class AttractorLayer(nn.Module): method __init__ (line 61) | def __init__(self, in_features, n_bins, n_attractors=16, mlp_dim=128, ... method forward (line 85) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... class AttractorLayerUnnormed (line 139) | class AttractorLayerUnnormed(nn.Module): method __init__ (line 140) | def __init__(self, in_features, n_bins, n_attractors=16, mlp_dim=128, ... method forward (line 164) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... FILE: modules/control/proc/zoe/zoedepth/models/layers/dist_layers.py function log_binom (line 29) | def log_binom(n, k, eps=1e-7): class LogBinomial (line 36) | class LogBinomial(nn.Module): method __init__ (line 37) | def __init__(self, n_classes=256, act=torch.softmax): method forward (line 51) | def forward(self, x, t=1., eps=1e-4): class ConditionalLogBinomial (line 72) | class ConditionalLogBinomial(nn.Module): method __init__ (line 73) | def __init__(self, in_features, condition_dim, n_classes=256, bottlene... method forward (line 100) | def forward(self, x, cond): FILE: modules/control/proc/zoe/zoedepth/models/layers/localbins_layers.py class SeedBinRegressor (line 29) | class SeedBinRegressor(nn.Module): method __init__ (line 30) | def __init__(self, in_features, n_bins=16, mlp_dim=256, min_depth=1e-3... method forward (line 52) | def forward(self, x): class SeedBinRegressorUnnormed (line 71) | class SeedBinRegressorUnnormed(nn.Module): method __init__ (line 72) | def __init__(self, in_features, n_bins=16, mlp_dim=256, min_depth=1e-3... method forward (line 91) | def forward(self, x): class Projector (line 99) | class Projector(nn.Module): method __init__ (line 100) | def __init__(self, in_features, out_features, mlp_dim=128): method forward (line 116) | def forward(self, x): class LinearSplitter (line 121) | class LinearSplitter(nn.Module): method __init__ (line 122) | def __init__(self, in_features, prev_nbins, split_factor=2, mlp_dim=12... method forward (line 137) | def forward(self, x, b_prev, prev_b_embedding=None, interpolate=True, ... FILE: modules/control/proc/zoe/zoedepth/models/layers/patch_transformer.py class PatchTransformerEncoder (line 29) | class PatchTransformerEncoder(nn.Module): method __init__ (line 30) | def __init__(self, in_channels, patch_size=10, embedding_dim=128, num_... method positional_encoding_1d (line 50) | def positional_encoding_1d(self, sequence_length, batch_size, embeddin... method forward (line 71) | def forward(self, x): FILE: modules/control/proc/zoe/zoedepth/models/model_io.py function load_state_dict (line 27) | def load_state_dict(model, state_dict): function load_wts (line 54) | def load_wts(model, checkpoint_path): function load_state_dict_from_url (line 59) | def load_state_dict_from_url(model, url, **kwargs): function load_state_from_resource (line 64) | def load_state_from_resource(model, resource: str): FILE: modules/control/proc/zoe/zoedepth/models/zoedepth/zoedepth_v1.py class ZoeDepth (line 38) | class ZoeDepth(DepthModel): method __init__ (line 39) | def __init__(self, core, n_bins=64, bin_centers_type="softplus", bin_... method forward (line 126) | def forward(self, x, return_final_centers=False, denorm=False, return_... method get_lr_params (line 206) | def get_lr_params(self, lr): method build (line 241) | def build(midas_model_type="DPT_BEiT_L_384", pretrained_resource=None,... method build_from_config (line 251) | def build_from_config(config): FILE: modules/control/proc/zoe/zoedepth/models/zoedepth_nk/zoedepth_nk_v1.py class ZoeDepthNK (line 39) | class ZoeDepthNK(DepthModel): method __init__ (line 40) | def __init__(self, core, bin_conf, bin_centers_type="softplus", bin_e... method forward (line 160) | def forward(self, x, return_final_centers=False, denorm=False, return_... method get_lr_params (line 245) | def get_lr_params(self, lr): method get_conf_parameters (line 285) | def get_conf_parameters(self, conf_name): method freeze_conf (line 297) | def freeze_conf(self, conf_name): method unfreeze_conf (line 304) | def unfreeze_conf(self, conf_name): method freeze_all_confs (line 311) | def freeze_all_confs(self): method build (line 322) | def build(midas_model_type="DPT_BEiT_L_384", pretrained_resource=None,... method build_from_config (line 332) | def build_from_config(config): FILE: modules/control/proc/zoe/zoedepth/utils/arg_utils.py function infer_type (line 3) | def infer_type(x): # hacky way to infer type from string args function parse_unknown (line 22) | def parse_unknown(unknown_args): FILE: modules/control/proc/zoe/zoedepth/utils/config.py function flatten (line 257) | def flatten(config, except_keys=('bin_conf')): function split_combined_args (line 271) | def split_combined_args(kwargs): function parse_list (line 295) | def parse_list(config, key, dtype=int): function get_model_config (line 306) | def get_model_config(model_name, model_version=None): function update_model_config (line 334) | def update_model_config(config, mode, model_name, model_version=None, st... function check_choices (line 344) | def check_choices(name, value, choices): function get_config (line 354) | def get_config(model_name, mode='train', dataset=None, **overwrite_kwargs): function change_dataset (line 435) | def change_dataset(config, new_dataset): FILE: modules/control/proc/zoe/zoedepth/utils/easydict/__init__.py class EasyDict (line 7) | class EasyDict(dict): method __init__ (line 120) | def __init__(self, d=None, **kwargs): method __setattr__ (line 134) | def __setattr__(self, name, value): method update (line 145) | def update(self, e=None, **f): method pop (line 151) | def pop(self, k, d=None): FILE: modules/control/processor.py function preprocess_image (line 41) | def preprocess_image( FILE: modules/control/processors.py function delay_load_config (line 49) | def delay_load_config(): function list_models (line 107) | def list_models(refresh=False): function update_settings (line 116) | def update_settings(*settings): class Processor (line 164) | class Processor(): method __init__ (line 165) | def __init__(self, processor_id: str = None, resize = True): method __str__ (line 175) | def __str__(self): method reset (line 178) | def reset(self, processor_id: str = None): method config (line 194) | def config(self, processor_id = None): method load (line 207) | def load(self, processor_id: str = None, force: bool = True) -> str: method __call__ (line 271) | def __call__(self, image_input: Image, mode: str = 'RGB', width: int =... method preview (line 333) | def preview(self): FILE: modules/control/run.py function restore_pipeline (line 33) | def restore_pipeline(): function terminate (line 47) | def terminate(msg): function is_unified_model (line 53) | def is_unified_model(): function has_inputs (line 57) | def has_inputs(inputs): function set_pipe (line 66) | def set_pipe(p, has_models, unit_type, selected_models, active_model, ac... function check_active (line 143) | def check_active(p, unit_type, units): function check_enabled (line 219) | def check_enabled(p, unit_type, units, active_model, active_strength, ac... function control_set (line 248) | def control_set(kwargs): function init_units (line 257) | def init_units(units: List[unit.Unit]): function control_run (line 273) | def control_run(state: str = '', # pylint: disable=keyword-arg-before-va... FILE: modules/control/test.py function test_processors (line 9) | def test_processors(image): function test_controlnets (line 58) | def test_controlnets(prompt, negative, image): function test_adapters (line 109) | def test_adapters(prompt, negative, image): function test_xs (line 161) | def test_xs(prompt, negative, image): function test_lite (line 212) | def test_lite(prompt, negative, image): FILE: modules/control/tile.py function get_tile (line 6) | def get_tile(image: Image.Image, x: int, y: int, sx: int, sy: int) -> Im... function set_tile (line 15) | def set_tile(image: Image.Image, x: int, y: int, tiled: Image.Image): function run_tiling (line 20) | def run_tiling(p: processing.StableDiffusionProcessing, input_image: Ima... FILE: modules/control/unit.py class Unit (line 19) | class Unit(): # mashup of gradio controls and mapping to actual implemen... method update_choices (line 20) | def update_choices(self, model_id=None): method __str__ (line 33) | def __str__(self): method __init__ (line 36) | def __init__(self, method reset (line 256) | def reset(self): FILE: modules/control/units/controlnet.py function find_models (line 150) | def find_models(): function api_list_models (line 168) | def api_list_models(model_type: str = None): function list_models (line 190) | def list_models(refresh=False): class ControlNet (line 219) | class ControlNet(): method __init__ (line 220) | def __init__(self, model_id: str = None, device = None, dtype = None, ... method __str__ (line 237) | def __str__(self): method reset (line 240) | def reset(self): method get_class (line 247) | def get_class(self, model_id:str=''): method load_safetensors (line 289) | def load_safetensors(self, model_id, model_path, cls, config): # pylin... method load (line 316) | def load(self, model_id: str = None, force: bool = False) -> str: class ControlNetPipeline (line 422) | class ControlNetPipeline(): method __init__ (line 423) | def __init__(self, method restore (line 571) | def restore(self): FILE: modules/control/units/detect.py function is_compatible (line 1) | def is_compatible(model, pattern='None'): function is_sd15 (line 9) | def is_sd15(model): function is_sdxl (line 13) | def is_sdxl(model): function is_f1 (line 17) | def is_f1(model): function is_sd3 (line 21) | def is_sd3(model): function is_qwen (line 25) | def is_qwen(model): function is_hunyuandit (line 29) | def is_hunyuandit(model): function is_zimage (line 32) | def is_zimage(model): FILE: modules/control/units/lite.py function find_models (line 34) | def find_models(): function list_models (line 46) | def list_models(refresh=False): class ControlLLLite (line 65) | class ControlLLLite(): method __init__ (line 66) | def __init__(self, model_id: str = None, device = None, dtype = None, ... method __str__ (line 77) | def __str__(self): method reset (line 80) | def reset(self): method load (line 86) | def load(self, model_id: str = None, force: bool = True) -> str: class ControlLLitePipeline (line 135) | class ControlLLitePipeline(): method __init__ (line 136) | def __init__(self, pipeline: Union[StableDiffusionXLPipeline, StableDi... method apply (line 141) | def apply(self, controlnet: Union[ControlNetLLLite, list[ControlNetLLL... method restore (line 152) | def restore(self): FILE: modules/control/units/lite_model.py class LLLiteModule (line 12) | class LLLiteModule(torch.nn.Module): method __init__ (line 13) | def __init__( method set_cond_image (line 69) | def set_cond_image(self, cond_image): method forward (line 73) | def forward(self, x): function clear_all_lllite (line 99) | def clear_all_lllite(): class ControlNetLLLite (line 108) | class ControlNetLLLite(torch.nn.Module): # pylint: disable=abstract-method method __init__ (line 109) | def __init__(self, path: str): method apply (line 150) | def apply(self, pipe, cond, weight): # pylint: disable=arguments-differ method get_hacked_forward (line 189) | def get_hacked_forward(self, original_forward, model, blk): FILE: modules/control/units/reference.py function list_models (line 13) | def list_models(): class ReferencePipeline (line 17) | class ReferencePipeline(): method __init__ (line 18) | def __init__(self, pipeline: Union[StableDiffusionXLPipeline, StableDi... method restore (line 64) | def restore(self): FILE: modules/control/units/t2iadapter.py function list_models (line 50) | def list_models(refresh=False): class AdapterModel (line 69) | class AdapterModel(T2IAdapter): class Adapter (line 73) | class Adapter(): method __init__ (line 74) | def __init__(self, model_id: str = None, device = None, dtype = None, ... method __str__ (line 85) | def __str__(self): method reset (line 88) | def reset(self): method load (line 94) | def load(self, model_id: str = None, force: bool = True) -> str: class AdapterPipeline (line 144) | class AdapterPipeline(): method __init__ (line 145) | def __init__(self, adapter: Union[T2IAdapter, list[T2IAdapter]], pipel... method restore (line 205) | def restore(self): FILE: modules/control/units/xs.py function find_models (line 30) | def find_models(): function list_models (line 42) | def list_models(refresh=False): class ControlNetXS (line 61) | class ControlNetXS(): method __init__ (line 62) | def __init__(self, model_id: str = None, device = None, dtype = None, ... method __str__ (line 73) | def __str__(self): method reset (line 76) | def reset(self): method load (line 82) | def load(self, model_id: str = None, time_embedding_mix: float = 0.0, ... class ControlNetXSPipeline (line 128) | class ControlNetXSPipeline(): method __init__ (line 129) | def __init__(self, controlnet: Union[ControlNetXSModel, list[ControlNe... method restore (line 175) | def restore(self): FILE: modules/control/units/xs_model.py class ControlNetXSOutput (line 50) | class ControlNetXSOutput(BaseOutput): class ControlNetConditioningEmbedding (line 64) | class ControlNetConditioningEmbedding(nn.Module): method __init__ (line 74) | def __init__( method forward (line 96) | def forward(self, conditioning): class ControlNetXSModel (line 109) | class ControlNetXSModel(ModelMixin, ConfigMixin): method init_original (line 141) | def init_original(cls, base_model: UNet2DConditionModel, is_sdxl=True): method _gather_subblock_sizes (line 182) | def _gather_subblock_sizes(cls, unet: UNet2DConditionModel, base_or_co... method __init__ (line 229) | def __init__( method from_unet (line 366) | def from_unet( method attn_processors (line 483) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 491) | def set_attn_processor( method set_default_attn_processor (line 508) | def set_default_attn_processor(self): method set_attention_slice (line 514) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 530) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 537) | def forward( method _make_zero_conv (line 746) | def _make_zero_conv(self, in_channels, out_channels=None): method _check_if_vae_compatible (line 754) | def _check_if_vae_compatible(self, vae: AutoencoderKL): class SubBlock (line 761) | class SubBlock(nn.ModuleList): method __init__ (line 766) | def __init__(self, ms, *args, **kwargs): method forward (line 771) | def forward( function adjust_time_dims (line 797) | def adjust_time_dims(unet: UNet2DConditionModel, in_dim: int, out_dim: i... function increase_block_input_in_encoder_resnet (line 801) | def increase_block_input_in_encoder_resnet(unet: UNet2DConditionModel, b... function increase_block_input_in_encoder_downsampler (line 855) | def increase_block_input_in_encoder_downsampler(unet: UNet2DConditionMod... function increase_block_input_in_mid_resnet (line 885) | def increase_block_input_in_mid_resnet(unet: UNet2DConditionModel, by): function adjust_group_norms (line 935) | def adjust_group_norms(unet: UNet2DConditionModel, max_num_group: int = ... function is_iterable (line 961) | def is_iterable(o): function to_sub_blocks (line 971) | def to_sub_blocks(blocks): function zero_module (line 1007) | def zero_module(module): FILE: modules/control/units/xs_pipe.py class StableDiffusionXLControlNetXSPipeline (line 55) | class StableDiffusionXLControlNetXSPipeline( method __init__ (line 102) | def __init__( method enable_vae_slicing (line 158) | def enable_vae_slicing(self): method disable_vae_slicing (line 166) | def disable_vae_slicing(self): method enable_vae_tiling (line 174) | def enable_vae_tiling(self): method disable_vae_tiling (line 183) | def disable_vae_tiling(self): method encode_prompt (line 191) | def encode_prompt( method prepare_extra_step_kwargs (line 426) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 443) | def check_inputs( method check_image (line 550) | def check_image(self, image, prompt, prompt_embeds): method prepare_image (line 587) | def prepare_image( method prepare_latents (line 617) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 635) | def _get_add_time_ids( method upcast_vae (line 654) | def upcast_vae(self): method enable_freeu (line 673) | def enable_freeu(self, s1: float, s2: float, b1: float, b2: float): method disable_freeu (line 696) | def disable_freeu(self): method __call__ (line 701) | def __call__( class StableDiffusionControlNetXSPipeline (line 1089) | class StableDiffusionControlNetXSPipeline( method __init__ (line 1130) | def __init__( method enable_vae_slicing (line 1186) | def enable_vae_slicing(self): method disable_vae_slicing (line 1194) | def disable_vae_slicing(self): method enable_vae_tiling (line 1202) | def enable_vae_tiling(self): method disable_vae_tiling (line 1211) | def disable_vae_tiling(self): method _encode_prompt (line 1219) | def _encode_prompt( method encode_prompt (line 1249) | def encode_prompt( method run_safety_checker (line 1431) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 1446) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 1455) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 1472) | def check_inputs( method check_image (line 1552) | def check_image(self, image, prompt, prompt_embeds): method prepare_image (line 1589) | def prepare_image( method prepare_latents (line 1619) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method enable_freeu (line 1637) | def enable_freeu(self, s1: float, s2: float, b1: float, b2: float): method disable_freeu (line 1660) | def disable_freeu(self): method __call__ (line 1665) | def __call__( FILE: modules/control/util.py function dict2str (line 12) | def dict2str(d: dict): function HWC3 (line 17) | def HWC3(x): function make_noise_disk (line 37) | def make_noise_disk(H, W, C, F): function nms (line 48) | def nms(x, t, s): function min_max_norm (line 61) | def min_max_norm(x): function safe_step (line 67) | def safe_step(x, step=2): function img2mask (line 73) | def img2mask(img, H, W, low=10, high=90): function resize_image (line 86) | def resize_image(input_image, resolution): function torch_gc (line 99) | def torch_gc(): function ade_palette (line 105) | def ade_palette(): function blend (line 147) | def blend(images): function decode_fourcc (line 163) | def decode_fourcc(cc): FILE: modules/detailer.py class Detailer (line 5) | class Detailer: # abstract class used for postprocessing method name (line 6) | def name(self): method restore (line 10) | def restore(self, np_image): function detail (line 14) | def detail(np_image, p=None): # postprocesses the image FILE: modules/devices.py function has_mps (line 37) | def has_mps() -> bool: function has_xpu (line 45) | def has_xpu() -> bool: function has_rocm (line 49) | def has_rocm() -> bool: function has_zluda (line 53) | def has_zluda() -> bool: function has_triton (line 64) | def has_triton(early:bool=False) -> bool: function get_hip_agent (line 70) | def get_hip_agent() -> rocm.Agent: function get_backend (line 74) | def get_backend(shared_cmd_opts): function get_gpu_info (line 96) | def get_gpu_info(): function get_cuda_device_string (line 167) | def get_cuda_device_string(): function get_optimal_device_name (line 183) | def get_optimal_device_name(): function get_optimal_device (line 193) | def get_optimal_device(): function torch_gc (line 197) | def torch_gc(force:bool=False, fast:bool=False, reason:str=None): function set_cuda_sync_mode (line 264) | def set_cuda_sync_mode(mode): function set_cuda_memory_limit (line 283) | def set_cuda_memory_limit(): function set_cuda_tunable (line 296) | def set_cuda_tunable(): function test_fp16 (line 320) | def test_fp16(): function test_bf16 (line 351) | def test_bf16(): function test_triton (line 384) | def test_triton(early: bool = False): function set_cudnn_params (line 416) | def set_cudnn_params(): function override_ipex_math (line 444) | def override_ipex_math(): function set_sdpa_params (line 454) | def set_sdpa_params(): function set_dtype (line 512) | def set_dtype(): function set_cuda_params (line 563) | def set_cuda_params(): function randn (line 584) | def randn(seed, shape=None): function randn_without_seed (line 598) | def randn_without_seed(shape): function autocast (line 604) | def autocast(disable=False): function without_autocast (line 615) | def without_autocast(disable=False): class NansException (line 626) | class NansException(Exception): function test_for_nans (line 630) | def test_for_nans(x, where): function normalize_device (line 649) | def normalize_device(dev): function same_device (line 657) | def same_device(d1, d2): FILE: modules/devices_mac.py function check_for_mps (line 10) | def check_for_mps() -> bool: function cumsum_fix (line 22) | def cumsum_fix(input, cumsum_func, *args, **kwargs): # pylint: disable=r... FILE: modules/dml/Generator.py class Generator (line 5) | class Generator(torch.Generator): method __init__ (line 6) | def __init__(self, device: Optional[torch.device] = None): FILE: modules/dml/__init__.py function _set_memory_provider (line 17) | def _set_memory_provider(): function directml_init (line 41) | def directml_init(): function directml_do_hijack (line 70) | def directml_do_hijack(): class OverrideItem (line 87) | class OverrideItem(NamedTuple): function directml_override_opts (line 98) | def directml_override_opts(): FILE: modules/dml/amp/autocast_mode.py function forward (line 13) | def forward(op, args: tuple, kwargs: dict): function cast (line 22) | def cast(tensor: torch.Tensor): function cond (line 31) | def cond(op: str): class autocast (line 50) | class autocast: method __init__ (line 55) | def __init__(self, dtype: Optional[torch.dtype] = torch.float16): method __enter__ (line 58) | def __enter__(self): method __exit__ (line 64) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any): FILE: modules/dml/backend.py function amd_mem_get_info (line 12) | def amd_mem_get_info(device: Optional[rDevice]=None) -> tuple[int, int]: function pdh_mem_get_info (line 17) | def pdh_mem_get_info(device: Optional[rDevice]=None) -> tuple[int, int]: function mem_get_info (line 22) | def mem_get_info(device: Optional[rDevice]=None) -> tuple[int, int]: # p... class DirectML (line 26) | class DirectML: method is_available (line 38) | def is_available() -> bool: method is_directml_device (line 41) | def is_directml_device(device: torch.device) -> bool: method has_float64_support (line 44) | def has_float64_support(device: Optional[rDevice]=None) -> bool: method device_count (line 47) | def device_count() -> int: method current_device (line 50) | def current_device() -> torch.device: method default_device (line 53) | def default_device() -> torch.device: method get_device_string (line 56) | def get_device_string(device: Optional[rDevice]=None) -> str: method get_device_name (line 59) | def get_device_name(device: Optional[rDevice]=None) -> str: method get_device_properties (line 62) | def get_device_properties(device: Optional[rDevice]=None) -> DevicePro... method memory_stats (line 65) | def memory_stats(device: Optional[rDevice]=None): method memory_allocated (line 73) | def memory_allocated(device: Optional[rDevice]=None) -> int: method max_memory_allocated (line 76) | def max_memory_allocated(device: Optional[rDevice]=None): method reset_peak_memory_stats (line 79) | def reset_peak_memory_stats(device: Optional[rDevice]=None): FILE: modules/dml/device.py class Device (line 6) | class Device: method __enter__ (line 9) | def __enter__(self, device: Optional[rDevice]=None): method __init__ (line 13) | def __init__(self, device: Optional[rDevice]=None) -> torch.device: # ... method __exit__ (line 16) | def __exit__(self, t, v, tb): FILE: modules/dml/device_properties.py class DeviceProperties (line 4) | class DeviceProperties: method __init__ (line 12) | def __init__(self, device: torch.device): method __str__ (line 16) | def __str__(self): method __repr__ (line 19) | def __repr__(self): FILE: modules/dml/hijack/realesrgan_model.py function tile_process (line 8) | def tile_process(self): FILE: modules/dml/hijack/tomesd.py function make_tome_block (line 6) | def make_tome_block(block_class: Type[torch.nn.Module]) -> Type[torch.nn... FILE: modules/dml/hijack/torch.py function cuda (line 10) | def cuda(self: torch.Tensor): function pow_ (line 17) | def pow_(self: torch.Tensor, *args, **kwargs): function load (line 25) | def load(f, map_location = "cpu", *args, **kwargs): FILE: modules/dml/hijack/transformers.py function _make_causal_mask (line 6) | def _make_causal_mask( function CLIPTextEmbeddings_forward (line 23) | def CLIPTextEmbeddings_forward( FILE: modules/dml/hijack/utils.py function catch_nan (line 6) | def catch_nan(func: Callable[[], torch.Tensor]): FILE: modules/dml/memory.py class MemoryProvider (line 6) | class MemoryProvider: method __init__ (line 10) | def __init__(self): method get_memory (line 14) | def get_memory(self, device_id: int) -> dict[str, int]: method __del__ (line 30) | def __del__(self): FILE: modules/dml/memory_amd/__init__.py class AMDMemoryProvider (line 4) | class AMDMemoryProvider: method mem_get_info (line 8) | def mem_get_info(index): FILE: modules/dml/memory_amd/driver/atiadlxx.py class ATIADLxx (line 7) | class ATIADLxx: method __init__ (line 10) | def __init__(self): method get_memory_info2 (line 25) | def get_memory_info2(self, adapterIndex: int) -> ADLMemoryInfo2: method get_dedicated_vram_usage (line 33) | def get_dedicated_vram_usage(self, index: int) -> int: method get_vram_usage (line 41) | def get_vram_usage(self, index: int) -> int: FILE: modules/dml/memory_amd/driver/atiadlxx_apis.py function ADL_Main_Memory_Alloc (line 17) | def ADL_Main_Memory_Alloc(iSize): function ADL_Main_Memory_Free (line 22) | def ADL_Main_Memory_Free(lpBuffer): FILE: modules/dml/memory_amd/driver/atiadlxx_structures.py class _ADLPMActivity (line 4) | class _ADLPMActivity(C.Structure): class _ADLMemoryInfo2 (line 32) | class _ADLMemoryInfo2(C.Structure): class _AdapterInfo (line 52) | class _AdapterInfo(C.Structure): FILE: modules/dml/pdh/__init__.py class __InternalAbstraction (line 11) | class __InternalAbstraction(NamedTuple): function expand_wildcard_path (line 22) | def expand_wildcard_path(path: str) -> list[str]: class HCounter (line 44) | class HCounter(PDH_HCOUNTER): method get_formatted_value (line 45) | def get_formatted_value(self, typ: T) -> T: method get_formatted_dict (line 54) | def get_formatted_dict(self, typ: T) -> dict[str, T]: class HQuery (line 72) | class HQuery(PDH_HQUERY): method __init__ (line 73) | def __init__(self): method add_counter (line 78) | def add_counter(self, path: str) -> HCounter: method collect_data (line 84) | def collect_data(self): method close (line 88) | def close(self): FILE: modules/dml/pdh/errors.py class PDHError (line 1) | class PDHError(Exception): method __init__ (line 2) | def __init__(self, message: str): FILE: modules/dml/pdh/structures.py class PDH_FMT_COUNTERVALUE_U (line 9) | class PDH_FMT_COUNTERVALUE_U(Union): class PDH_FMT_COUNTERVALUE (line 25) | class PDH_FMT_COUNTERVALUE(Structure): class PDH_FMT_COUNTERVALUE_ITEM_W (line 37) | class PDH_FMT_COUNTERVALUE_ITEM_W(Structure): FILE: modules/dml/utils.py function get_device (line 6) | def get_device(device: Optional[rDevice]=None) -> torch.device: FILE: modules/errorlimiter.py class ErrorLimiterTrigger (line 9) | class ErrorLimiterTrigger(BaseException): # Use BaseException to avoid ... method __init__ (line 10) | def __init__(self, name: str, *args): class ErrorLimiterAbort (line 15) | class ErrorLimiterAbort(RuntimeError): method __init__ (line 16) | def __init__(self, msg: str): class ErrorLimiter (line 20) | class ErrorLimiter: method start (line 24) | def start(cls, name: str, limit: int = 5): method notify (line 28) | def notify(cls, name: str | Iterable[str]): # Can be manually trigger... method end (line 38) | def end(cls, name: str): function limit_errors (line 43) | def limit_errors(name: str, limit: int = 5): FILE: modules/errors.py function install (line 13) | def install(suppress=[]): function display (line 19) | def display(e: Exception, task: str, suppress=[]): function display_once (line 34) | def display_once(e: Exception, task): function run (line 41) | def run(code, task: str): function exception (line 48) | def exception(suppress=[]): function profile (line 53) | def profile(profiler, msg: str, n: int = 16): function profile_torch (line 82) | def profile_torch(profiler, msg: str): FILE: modules/extensions.py function parse_isotime (line 14) | def parse_isotime(time_string: str) -> datetime: function format_dt (line 28) | def format_dt(d: datetime, seconds = False) -> str: function ts2utc (line 36) | def ts2utc(timestamp: int) -> datetime: function active (line 42) | def active(): function temp_disable_extensions (line 51) | def temp_disable_extensions(): class Extension (line 121) | class Extension: method __init__ (line 122) | def __init__(self, name, path, enabled=True, is_builtin=False): method read_info (line 140) | def read_info(self, force=False): method list_files (line 178) | def list_files(self, subdir, extension): method check_updates (line 197) | def check_updates(self): method git_fetch (line 221) | def git_fetch(self, commit='origin'): function list_extensions (line 231) | def list_extensions(): FILE: modules/extra_networks.py function initialize (line 10) | def initialize(): function register_extra_network (line 14) | def register_extra_network(extra_network): function register_default_extra_networks (line 18) | def register_default_extra_networks(): class ExtraNetworkParams (line 27) | class ExtraNetworkParams: method __init__ (line 28) | def __init__(self, items=None): class ExtraNetwork (line 40) | class ExtraNetwork: method __init__ (line 41) | def __init__(self, name): method activate (line 44) | def activate(self, p, params_list): method deactivate (line 61) | def deactivate(self, p, force=False): function is_stepwise (line 68) | def is_stepwise(en_obj): function activate (line 76) | def activate(p, extra_network_data=None, step=0, include=[], exclude=[]): function deactivate (line 125) | def deactivate(p, extra_network_data=None, force=shared.opts.lora_force_... function parse_prompt (line 154) | def parse_prompt(prompt: str | None) -> tuple[str, defaultdict[str, list... function parse_prompts (line 171) | def parse_prompts(prompts: list[str]): FILE: modules/extras.py function run_pnginfo (line 14) | def run_pnginfo(image): function to_half (line 26) | def to_half(tensor, enable): function run_modelmerger (line 32) | def run_modelmerger(id_task, **kwargs): # pylint: disable=unused-argument function run_model_modules (line 184) | def run_model_modules(model_type:str, model_name:str, custom_name:str, FILE: modules/face/__init__.py class Script (line 10) | class Script(scripts_manager.Script): method title (line 14) | def title(self): method show (line 17) | def show(self, is_img2img): method load_images (line 20) | def load_images(self, files): method mode_change (line 40) | def mode_change(self, mode): method ui (line 50) | def ui(self, _is_img2img): method run (line 108) | def run(self, p: processing.StableDiffusionProcessing, mode, input_ima... method after (line 175) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: modules/face/faceid.py function hijack_load_ip_adapter (line 28) | def hijack_load_ip_adapter(self): function face_id (line 34) | def face_id( FILE: modules/face/faceswap.py function face_swap (line 15) | def face_swap(p: processing.StableDiffusionProcessing, app, input_images... FILE: modules/face/insightface.py function get_app (line 10) | def get_app(mp_name, threshold=0.5, resolution=640): FILE: modules/face/instantid.py function instant_id (line 14) | def instant_id(p: processing.StableDiffusionProcessing, app, source_imag... FILE: modules/face/instantid_model.py function FeedForward (line 50) | def FeedForward(dim, mult=4): function reshape_tensor (line 60) | def reshape_tensor(x, heads): class PerceiverAttention (line 71) | class PerceiverAttention(nn.Module): method __init__ (line 72) | def __init__(self, *, dim, dim_head=64, heads=8): method forward (line 86) | def forward(self, x, latents): class Resampler (line 118) | class Resampler(nn.Module): method __init__ (line 119) | def __init__( method forward (line 150) | def forward(self, x): class AttnProcessor (line 162) | class AttnProcessor(nn.Module): method __init__ (line 167) | def __init__( method __call__ (line 174) | def __call__( class IPAttnProcessor (line 235) | class IPAttnProcessor(nn.Module): method __init__ (line 249) | def __init__(self, hidden_size, cross_attention_dim=None, scale=1.0, n... method __call__ (line 260) | def __call__( method _memory_efficient_attention_xformers (line 346) | def _memory_efficient_attention_xformers(self, query, key, value, atte... function draw_kps (line 409) | def draw_kps(image_pil, kps, color_list=None): class StableDiffusionXLInstantIDPipeline (line 442) | class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipe... method cuda (line 443) | def cuda(self, dtype=torch.float16, use_xformers=False): method load_ip_adapter_instantid (line 463) | def load_ip_adapter_instantid(self, model_ckpt, image_emb_dim=512, num... method set_image_proj_model (line 467) | def set_image_proj_model(self, model_ckpt, image_emb_dim=512, num_toke... method set_ip_adapter (line 489) | def set_ip_adapter(self, model_ckpt, num_tokens, scale): method set_ip_adapter_scale (line 519) | def set_ip_adapter_scale(self, scale): method _encode_prompt_image_emb (line 525) | def _encode_prompt_image_emb(self, prompt_image_emb, device, dtype, do... method __call__ (line 545) | def __call__( FILE: modules/face/photomaker.py function restore_pipeline (line 11) | def restore_pipeline(): function photo_maker (line 18) | def photo_maker(p: processing.StableDiffusionProcessing, app, model: str... FILE: modules/face/photomaker_model_v1.py class MLP (line 17) | class MLP(nn.Module): method __init__ (line 18) | def __init__(self, in_dim, out_dim, hidden_dim, use_residual=True): method forward (line 28) | def forward(self, x): class FuseModule (line 39) | class FuseModule(nn.Module): method __init__ (line 40) | def __init__(self, embed_dim): method fuse_fn (line 46) | def fuse_fn(self, prompt_embeds, id_embeds): method forward (line 54) | def forward( class PhotoMakerIDEncoder (line 87) | class PhotoMakerIDEncoder(CLIPVisionModelWithProjection): method __init__ (line 88) | def __init__(self): method forward (line 93) | def forward(self, id_pixel_values, prompt_embeds, class_tokens_mask): ... FILE: modules/face/photomaker_model_v2.py class FacePerceiverResampler (line 12) | class FacePerceiverResampler(torch.nn.Module): method __init__ (line 13) | def __init__( method forward (line 39) | def forward(self, latents, x): function FeedForward (line 48) | def FeedForward(dim, mult=4): function reshape_tensor (line 58) | def reshape_tensor(x, heads): class PerceiverAttention (line 69) | class PerceiverAttention(nn.Module): method __init__ (line 70) | def __init__(self, *, dim, dim_head=64, heads=8): method forward (line 84) | def forward(self, x, latents): class Resampler (line 116) | class Resampler(nn.Module): method __init__ (line 117) | def __init__( method forward (line 162) | def forward(self, x): function masked_mean (line 185) | def masked_mean(t, *, dim, mask=None): class MLP (line 206) | class MLP(nn.Module): method __init__ (line 207) | def __init__(self, in_dim, out_dim, hidden_dim, use_residual=True): method forward (line 217) | def forward(self, x): class QFormerPerceiver (line 228) | class QFormerPerceiver(nn.Module): method __init__ (line 229) | def __init__(self, id_embeddings_dim, cross_attention_dim, num_tokens,... method forward (line 251) | def forward(self, x, last_hidden_state): class FuseModule (line 261) | class FuseModule(nn.Module): method __init__ (line 262) | def __init__(self, embed_dim): method fuse_fn (line 268) | def fuse_fn(self, prompt_embeds, id_embeds): method forward (line 275) | def forward( class PhotoMakerIDEncoder_CLIPInsightfaceExtendtoken (line 310) | class PhotoMakerIDEncoder_CLIPInsightfaceExtendtoken(CLIPVisionModelWith... method __init__ (line 311) | def __init__(self, id_embeddings_dim=512): method forward (line 326) | def forward(self, id_pixel_values, prompt_embeds, class_tokens_mask, i... FILE: modules/face/photomaker_pipeline.py function rescale_noise_cfg (line 35) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 50) | def retrieve_timesteps( class PhotoMakerStableDiffusionXLPipeline (line 109) | class PhotoMakerStableDiffusionXLPipeline(StableDiffusionXLPipeline): method load_photomaker_adapter (line 111) | def load_photomaker_adapter( method encode_prompt_with_trigger_word (line 214) | def encode_prompt_with_trigger_word( method __call__ (line 445) | def __call__( FILE: modules/face/reswapper.py function get_model (line 22) | def get_model(model_name: str): function reswapper (line 43) | def reswapper( FILE: modules/face/reswapper_model.py class ReSwapperModel (line 7) | class ReSwapperModel(nn.Module): method __init__ (line 8) | def __init__(self): method forward (line 53) | def forward(self, target, source): class StyleBlock (line 88) | class StyleBlock(nn.Module): method __init__ (line 89) | def __init__(self, in_channels, out_channels, blockIndex): method normalizeConvRMS (line 99) | def normalizeConvRMS(self, conv): method forward (line 106) | def forward(self, residual, style): FILE: modules/face/reswapper_utils.py function get_emap (line 10) | def get_emap(): function postprocess_face (line 15) | def postprocess_face(face_tensor): function getBlob (line 21) | def getBlob(aimg, input_size = (128, 128)): function getLatent (line 26) | def getLatent(source_face): function blend_swapped_image (line 34) | def blend_swapped_image(swapped_face, target_image, M): function drawKeypoints (line 60) | def drawKeypoints(image, keypoints, colorBGR, keypointsRadius=2): function estimate_norm (line 74) | def estimate_norm(lmk, image_size=112,mode='arcface'): # pylint: disable... function norm_crop (line 100) | def norm_crop(img, landmark, image_size=112, mode='arcface'): function norm_crop2 (line 106) | def norm_crop2(img, landmark, image_size=112, mode='arcface'): function square_crop (line 112) | def square_crop(im, S): function transform (line 127) | def transform(data, center, output_size, scale, rotation): function trans_points2d (line 143) | def trans_points2d(pts, M): function trans_points3d (line 153) | def trans_points3d(pts, M): function trans_points (line 167) | def trans_points(pts, M): FILE: modules/face_restoration.py class FaceRestoration (line 4) | class FaceRestoration: method name (line 5) | def name(self): method restore (line 8) | def restore(self, np_image): function restore_faces (line 12) | def restore_faces(np_image, p=None): FILE: modules/facelib/detection/__init__.py function init_detection_model (line 16) | def init_detection_model(model_name, half=False, device='cuda'): function init_retinaface_model (line 27) | def init_retinaface_model(model_name, half=False, device='cuda'): function init_yolov5face_model (line 51) | def init_yolov5face_model(model_name, device='cuda'): FILE: modules/facelib/detection/align_trans.py class FaceWarpException (line 13) | class FaceWarpException(Exception): method __str__ (line 15) | def __str__(self): function get_reference_facial_points (line 19) | def get_reference_facial_points(output_size=None, inner_padding_factor=0... function get_affine_transform_matrix (line 112) | def get_affine_transform_matrix(src_pts, dst_pts): function warp_and_crop_face (line 145) | def warp_and_crop_face(src_img, facial_pts, reference_pts=None, crop_siz... FILE: modules/facelib/detection/matlab_cp2tform.py class MatlabCp2tormException (line 7) | class MatlabCp2tormException(Exception): method __str__ (line 9) | def __str__(self): function tformfwd (line 13) | def tformfwd(trans, uv): function tforminv (line 37) | def tforminv(trans, uv): function findNonreflectiveSimilarity (line 60) | def findNonreflectiveSimilarity(uv, xy, options=None): function findSimilarity (line 94) | def findSimilarity(uv, xy, options=None): function get_similarity_transform (line 130) | def get_similarity_transform(src_pts, dst_pts, reflective=True): function cvt_tform_mat_for_cv2 (line 170) | def cvt_tform_mat_for_cv2(trans): function get_similarity_transform_for_cv2 (line 198) | def get_similarity_transform_for_cv2(src_pts, dst_pts, reflective=True): FILE: modules/facelib/detection/retinaface/retinaface.py function generate_config (line 17) | def generate_config(network_name): class RetinaFace (line 73) | class RetinaFace(nn.Module): method __init__ (line 75) | def __init__(self, network_name='resnet50', half=False, phase='test'): method forward (line 120) | def forward(self, inputs): method __detect_faces (line 145) | def __detect_faces(self, inputs): method transform (line 165) | def transform(self, image, use_origin_size): method detect_faces (line 192) | def detect_faces( method __align_multi (line 239) | def __align_multi(self, image, boxes, landmarks, limit=None): method align_multi (line 257) | def align_multi(self, img, conf_threshold=0.8, limit=None): method batched_transform (line 265) | def batched_transform(self, frames, use_origin_size): method batched_detect_faces (line 308) | def batched_detect_faces(self, frames, conf_threshold=0.8, nms_thresho... FILE: modules/facelib/detection/retinaface/retinaface_net.py function conv_bn (line 6) | def conv_bn(inp, oup, stride=1, leaky=0): function conv_bn_no_relu (line 12) | def conv_bn_no_relu(inp, oup, stride): function conv_bn1X1 (line 19) | def conv_bn1X1(inp, oup, stride, leaky=0): function conv_dw (line 25) | def conv_dw(inp, oup, stride, leaky=0.1): class SSH (line 36) | class SSH(nn.Module): method __init__ (line 38) | def __init__(self, in_channel, out_channel): method forward (line 52) | def forward(self, input): class FPN (line 66) | class FPN(nn.Module): method __init__ (line 68) | def __init__(self, in_channels_list, out_channels): method forward (line 80) | def forward(self, input): class MobileNetV1 (line 100) | class MobileNetV1(nn.Module): method __init__ (line 102) | def __init__(self): method forward (line 127) | def forward(self, x): class ClassHead (line 138) | class ClassHead(nn.Module): method __init__ (line 140) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 145) | def forward(self, x): class BboxHead (line 152) | class BboxHead(nn.Module): method __init__ (line 154) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 158) | def forward(self, x): class LandmarkHead (line 165) | class LandmarkHead(nn.Module): method __init__ (line 167) | def __init__(self, inchannels=512, num_anchors=3): method forward (line 171) | def forward(self, x): function make_class_head (line 178) | def make_class_head(fpn_num=3, inchannels=64, anchor_num=2): function make_bbox_head (line 185) | def make_bbox_head(fpn_num=3, inchannels=64, anchor_num=2): function make_landmark_head (line 192) | def make_landmark_head(fpn_num=3, inchannels=64, anchor_num=2): FILE: modules/facelib/detection/retinaface/retinaface_utils.py class PriorBox (line 8) | class PriorBox(object): method __init__ (line 10) | def __init__(self, cfg, image_size=None, phase='train'): method forward (line 19) | def forward(self): function py_cpu_nms (line 39) | def py_cpu_nms(dets, thresh): function point_form (line 50) | def point_form(boxes): function center_size (line 65) | def center_size(boxes): function intersect (line 79) | def intersect(box_a, box_b): function jaccard (line 98) | def jaccard(box_a, box_b): function matrix_iou (line 117) | def matrix_iou(a, b): function matrix_iof (line 130) | def matrix_iof(a, b): function match (line 142) | def match(threshold, truths, priors, variances, labels, landms, loc_t, c... function encode (line 199) | def encode(matched, priors, variances): function encode_landm (line 223) | def encode_landm(matched, priors, variances): function decode (line 253) | def decode(loc, priors, variances): function decode_landm (line 273) | def decode_landm(pre, priors, variances): function batched_decode (line 296) | def batched_decode(b_loc, priors, variances): function batched_decode_landm (line 319) | def batched_decode_landm(pre, priors, variances): function log_sum_exp (line 342) | def log_sum_exp(x): function nms (line 356) | def nms(boxes, scores, overlap=0.5, top_k=200): FILE: modules/facelib/detection/yolov5face/face_detector.py function isListempty (line 23) | def isListempty(inList): class YoloDetector (line 28) | class YoloDetector: method __init__ (line 29) | def __init__( method _preprocess (line 49) | def _preprocess(self, imgs): method _postprocess (line 70) | def _postprocess(self, imgs, origimgs, pred, conf_thres, iou_thres): method detect_faces (line 105) | def detect_faces(self, imgs, conf_thres=0.7, iou_thres=0.5): method __call__ (line 141) | def __call__(self, *args): FILE: modules/facelib/detection/yolov5face/models/common.py function autopad (line 18) | def autopad(k, p=None): # kernel, padding function channel_shuffle (line 25) | def channel_shuffle(x, groups): function DWConv (line 37) | def DWConv(c1, c2, k=1, s=1, act=True): class Conv (line 42) | class Conv(nn.Module): method __init__ (line 44) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 50) | def forward(self, x): method fuseforward (line 53) | def fuseforward(self, x): class StemBlock (line 57) | class StemBlock(nn.Module): method __init__ (line 58) | def __init__(self, c1, c2, k=3, s=2, p=None, g=1, act=True): method forward (line 66) | def forward(self, x): class Bottleneck (line 74) | class Bottleneck(nn.Module): method __init__ (line 76) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): # ch_in, ch_ou... method forward (line 83) | def forward(self, x): class BottleneckCSP (line 87) | class BottleneckCSP(nn.Module): method __init__ (line 89) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 100) | def forward(self, x): class C3 (line 106) | class C3(nn.Module): method __init__ (line 108) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 116) | def forward(self, x): class ShuffleV2Block (line 120) | class ShuffleV2Block(nn.Module): method __init__ (line 121) | def __init__(self, inp, oup, stride): method depthwise_conv (line 160) | def depthwise_conv(i, o, kernel_size, stride=1, padding=0, bias=False): method forward (line 163) | def forward(self, x): class SPP (line 173) | class SPP(nn.Module): method __init__ (line 175) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 182) | def forward(self, x): class Focus (line 187) | class Focus(nn.Module): method __init__ (line 189) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 193) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class Concat (line 197) | class Concat(nn.Module): method __init__ (line 199) | def __init__(self, dimension=1): method forward (line 203) | def forward(self, x): class NMS (line 207) | class NMS(nn.Module): method forward (line 213) | def forward(self, x): class AutoShape (line 217) | class AutoShape(nn.Module): method __init__ (line 224) | def __init__(self, model): method autoshape (line 228) | def autoshape(self): method forward (line 232) | def forward(self, imgs, size=640, augment=False, profile=False): class Detections (line 275) | class Detections: method __init__ (line 277) | def __init__(self, imgs, pred, names=None): method __len__ (line 290) | def __len__(self): method tolist (line 293) | def tolist(self): FILE: modules/facelib/detection/yolov5face/models/experimental.py class CrossConv (line 10) | class CrossConv(nn.Module): method __init__ (line 12) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): method forward (line 20) | def forward(self, x): class MixConv2d (line 24) | class MixConv2d(nn.Module): method __init__ (line 26) | def __init__(self, c1, c2, k=(1, 3), s=1, equal_ch=True): method forward (line 44) | def forward(self, x): FILE: modules/facelib/detection/yolov5face/models/yolo.py class Detect (line 29) | class Detect(nn.Module): method __init__ (line 33) | def __init__(self, nc=80, anchors=(), ch=()): # detection layer method forward (line 46) | def forward(self, x): method _make_grid (line 89) | def _make_grid(nx=20, ny=20): class Model (line 95) | class Model(nn.Module): method __init__ (line 96) | def __init__(self, cfg="yolov5s.yaml", ch=3, nc=None): # model, input... method forward (line 120) | def forward(self, x): method forward_once (line 123) | def forward_once(self, x): method _initialize_biases (line 134) | def _initialize_biases(self, cf=None): # initialize biases into Detec... method _print_biases (line 143) | def _print_biases(self): method fuse (line 149) | def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers method nms (line 160) | def nms(self, mode=True): # add or remove NMS module method autoshape (line 174) | def autoshape(self): # add autoShape module function parse_model (line 181) | def parse_model(d, ch): # model_dict, input_channels(3) FILE: modules/facelib/detection/yolov5face/utils/autoanchor.py function check_anchor_order (line 4) | def check_anchor_order(m): FILE: modules/facelib/detection/yolov5face/utils/datasets.py function letterbox (line 5) | def letterbox(img, new_shape=(640, 640), color=(114, 114, 114), auto=Tru... FILE: modules/facelib/detection/yolov5face/utils/general.py function check_img_size (line 9) | def check_img_size(img_size, s=32): function make_divisible (line 17) | def make_divisible(x, divisor): function xyxy2xywh (line 22) | def xyxy2xywh(x): function xywh2xyxy (line 32) | def xywh2xyxy(x): function scale_coords (line 42) | def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None): function clip_coords (line 58) | def clip_coords(boxes, img_shape): function box_iou (line 66) | def box_iou(box1, box2): function non_max_suppression_face (line 89) | def non_max_suppression_face(prediction, conf_thres=0.25, iou_thres=0.45... function non_max_suppression (line 168) | def non_max_suppression(prediction, conf_thres=0.25, iou_thres=0.45, cla... function scale_coords_landmarks (line 249) | def scale_coords_landmarks(img1_shape, coords, img0_shape, ratio_pad=None): FILE: modules/facelib/detection/yolov5face/utils/torch_utils.py function fuse_conv_and_bn (line 5) | def fuse_conv_and_bn(conv, bn): function copy_attr (line 34) | def copy_attr(a, b, include=(), exclude=()): FILE: modules/facelib/parsing/__init__.py function init_parsing_model (line 13) | def init_parsing_model(model_name='bisenet', half=False, device='cuda'): FILE: modules/facelib/parsing/bisenet.py class ConvBNReLU (line 8) | class ConvBNReLU(nn.Module): method __init__ (line 10) | def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1): method forward (line 15) | def forward(self, x): class BiSeNetOutput (line 21) | class BiSeNetOutput(nn.Module): method __init__ (line 23) | def __init__(self, in_chan, mid_chan, num_class): method forward (line 28) | def forward(self, x): class AttentionRefinementModule (line 34) | class AttentionRefinementModule(nn.Module): method __init__ (line 36) | def __init__(self, in_chan, out_chan): method forward (line 43) | def forward(self, x): class ContextPath (line 53) | class ContextPath(nn.Module): method __init__ (line 55) | def __init__(self): method forward (line 64) | def forward(self, x): class FeatureFusionModule (line 87) | class FeatureFusionModule(nn.Module): method __init__ (line 89) | def __init__(self, in_chan, out_chan): method forward (line 97) | def forward(self, fsp, fcp): class BiSeNet (line 110) | class BiSeNet(nn.Module): method __init__ (line 112) | def __init__(self, num_class): method forward (line 120) | def forward(self, x, return_feat=False): FILE: modules/facelib/parsing/parsenet.py class NormLayer (line 8) | class NormLayer(nn.Module): method __init__ (line 16) | def __init__(self, channels, normalize_shape=None, norm_type='bn'): method forward (line 35) | def forward(self, x, ref=None): class ReluLayer (line 42) | class ReluLayer(nn.Module): method __init__ (line 54) | def __init__(self, channels, relu_type='relu'): method forward (line 70) | def forward(self, x): class ConvLayer (line 74) | class ConvLayer(nn.Module): method __init__ (line 76) | def __init__(self, method forward (line 103) | def forward(self, x): class ResidualBlock (line 113) | class ResidualBlock(nn.Module): method __init__ (line 118) | def __init__(self, c_in, c_out, relu_type='prelu', norm_type='bn', sca... method forward (line 132) | def forward(self, x): class ParseNet (line 140) | class ParseNet(nn.Module): method __init__ (line 142) | def __init__(self, method forward (line 188) | def forward(self, x): FILE: modules/facelib/parsing/resnet.py function conv3x3 (line 5) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 10) | class BasicBlock(nn.Module): method __init__ (line 12) | def __init__(self, in_chan, out_chan, stride=1): method forward (line 26) | def forward(self, x): function create_layer_basic (line 41) | def create_layer_basic(in_chan, out_chan, bnum, stride=1): class ResNet18 (line 48) | class ResNet18(nn.Module): method __init__ (line 50) | def __init__(self): method forward (line 60) | def forward(self, x): FILE: modules/facelib/utils/face_restoration_helper.py function get_largest_face (line 12) | def get_largest_face(det_faces, h, w): function get_center_face (line 34) | def get_center_face(det_faces, h=0, w=0, center=None): class FaceRestoreHelper (line 48) | class FaceRestoreHelper(object): method __init__ (line 51) | def __init__(self, method set_upscale_factor (line 111) | def set_upscale_factor(self, upscale_factor): method read_image (line 114) | def read_image(self, img): method get_face_landmarks_5 (line 136) | def get_face_landmarks_5(self, method align_warp_face (line 256) | def align_warp_face(self, save_cropped_path=None, border_mode='constan... method get_inverse_affine (line 288) | def get_inverse_affine(self, save_inverse_affine_path=None): method add_restored_face (line 301) | def add_restored_face(self, face): method paste_faces_to_input_image (line 307) | def paste_faces_to_input_image(self, save_path=None, upsample_img=None... method clean_all (line 453) | def clean_all(self): FILE: modules/facelib/utils/face_utils.py function compute_increased_bbox (line 7) | def compute_increased_bbox(bbox, increase_area, preserve_aspect=True): function get_valid_bboxes (line 24) | def get_valid_bboxes(bboxes, h, w): function align_crop_face_landmarks (line 32) | def align_crop_face_landmarks(img, function paste_face_back (line 190) | def paste_face_back(img, face, inverse_affine): FILE: modules/facelib/utils/misc.py function download_pretrained_models (line 14) | def download_pretrained_models(file_ids, save_path_root): function imwrite (line 38) | def imwrite(img, file_path, params=None, auto_mkdir=True): function img2tensor (line 57) | def img2tensor(imgs, bgr2rgb=True, float32=True): function load_file_from_url (line 86) | def load_file_from_url(url, model_dir=None, progress=True, file_name=None): function scandir (line 106) | def scandir(dir_path, suffix=None, recursive=False, full_path=False): function is_gray (line 146) | def is_gray(img, threshold=10): function rgb2gray (line 162) | def rgb2gray(img, out_channel=3): function bgr2gray (line 169) | def bgr2gray(img, out_channel=3): FILE: modules/files_cache.py class Directory (line 10) | class Directory: # forward declaration method __post_init__ (line 40) | def __post_init__(self): method from_dict (line 44) | def from_dict(cls, dict_object: dict) -> Directory: method clear (line 52) | def clear(self) -> None: method update (line 60) | def update(self, source_directory: Directory) -> Directory: method _update (line 65) | def _update(self, source:Directory) -> None: method exists (line 75) | def exists(self) -> bool: method is_directory (line 79) | def is_directory(self) -> bool: method live_mtime (line 83) | def live_mtime(self) -> float: method is_stale (line 87) | def is_stale(self) -> bool: function real_path (line 25) | def real_path(directory_path:str) -> Union[str, None]: class Directory (line 34) | class Directory(Directory): # pylint: disable=E0102 method __post_init__ (line 40) | def __post_init__(self): method from_dict (line 44) | def from_dict(cls, dict_object: dict) -> Directory: method clear (line 52) | def clear(self) -> None: method update (line 60) | def update(self, source_directory: Directory) -> Directory: method _update (line 65) | def _update(self, source:Directory) -> None: method exists (line 75) | def exists(self) -> bool: method is_directory (line 79) | def is_directory(self) -> bool: method live_mtime (line 83) | def live_mtime(self) -> float: method is_stale (line 87) | def is_stale(self) -> bool: class DirectoryCache (line 91) | class DirectoryCache(UserDict, DirectoryCollection): method __delattr__ (line 92) | def __delattr__(self, directory_path: str) -> None: function clean_directory (line 100) | def clean_directory(directory: Directory, /, recursive: RecursiveType=Fa... function get_directory (line 128) | def get_directory(directory_or_path: str, /, fetch: bool=True) -> Union[... function fetch_directory (line 146) | def fetch_directory(directory_path: str) -> Union[Directory, None]: function _walk (line 153) | def _walk(top, recurse:RecursiveType=True) -> Directory: function _cached_walk (line 182) | def _cached_walk(top, recurse:RecursiveType=True) -> Directory: function walk (line 196) | def walk(top, recurse:RecursiveType=True, cached=True) -> Directory: function delete_cached_directory (line 200) | def delete_cached_directory(directory_path:str) -> bool: function is_directory (line 206) | def is_directory(dir_path:str) -> bool: function directory_mtime (line 210) | def directory_mtime(directory_path:str, /, recursive:RecursiveType=True)... function unique_directories (line 214) | def unique_directories(directories:DirectoryPathList, /, recursive:Recur... function unique_paths (line 247) | def unique_paths(directory_paths:DirectoryPathList) -> DirectoryPathIter... function get_directories (line 252) | def get_directories(*directory_paths: DirectoryPathList, fetch:bool=True... function directory_files (line 258) | def directory_files(*directories_or_paths: Union[DirectoryPathList, Dire... function extension_filter (line 278) | def extension_filter(ext_filter: Optional[ExtensionList]=None, ext_black... function not_hidden (line 288) | def not_hidden(filepath: str) -> bool: function filter_files (line 292) | def filter_files(file_paths: FilePathList, ext_filter: Optional[Extensio... function list_files (line 296) | def list_files(*directory_paths:DirectoryPathList, ext_filter: Optional[... FILE: modules/flash_attn_triton_amd/fwd_prefill.py function load_fn (line 11) | def load_fn(ptrs, offset_first, offset_second, boundary_first, boundary_... function _attn_fwd_inner (line 28) | def _attn_fwd_inner(acc, l_i, m_i, q, k_ptrs, v_ptrs, bias_ptrs, stride_... function get_cdna_autotune_configs (line 149) | def get_cdna_autotune_configs(): function get_rdna_autotune_configs (line 169) | def get_rdna_autotune_configs(): function get_autotune_configs (line 189) | def get_autotune_configs(): function attn_fwd (line 224) | def attn_fwd(Q, K, V, bias, Cache_seqlens, Cache_batch_idx, # pylint: di... function attention_prefill_forward_triton_impl (line 489) | def attention_prefill_forward_triton_impl( FILE: modules/flash_attn_triton_amd/interface_fa.py function fwd (line 6) | def fwd(q: torch.Tensor, FILE: modules/flash_attn_triton_amd/utils.py class MetaData (line 21) | class MetaData(): method __repr__ (line 47) | def __repr__(self) -> str: method __init__ (line 66) | def __init__(self, sm_scale=1.0): method set_varlen_params (line 69) | def set_varlen_params(self, cu_seqlens_q, cu_seqlens_k, max_seqlen_q, ... method need_bias (line 81) | def need_bias(self, bias, batch, nheads, seqlen_q, seqlen_k): method need_alibi (line 88) | def need_alibi(self, alibi_slopes, batch, nheads): method need_causal (line 95) | def need_causal(self, causal): method need_rotary (line 98) | def need_rotary(self, sin, cos, rotary_interleaved, rotary_conjunction... method need_dropout (line 104) | def need_dropout(self, dropout_p, return_scores = True): method check_args (line 110) | def check_args(self, q, k, v, o): function random_seqlens_composition (line 136) | def random_seqlens_composition(SEQ_LEN, BATCH): function generate_varlen_tensor (line 148) | def generate_varlen_tensor( function generate_bshd_tensor (line 198) | def generate_bshd_tensor(BATCH, SEQ_LEN, NUM_HEADS, D_HEAD, dtype, devic... function generate_bhsd_tensor (line 209) | def generate_bhsd_tensor(BATCH, NUM_HEADS, SEQ_LEN, D_HEAD, dtype, devic... function input_helper (line 220) | def input_helper( function compute_alibi_block (line 319) | def compute_alibi_block(alibi_slope, seqlen_q, seqlen_k, offs_m, offs_n,... function get_shape_from_layout (line 353) | def get_shape_from_layout( function get_shapes_from_layout (line 377) | def get_shapes_from_layout(q, k, layout, cu_seqlens_q = None, cu_seqlens... function get_stride_from_layout (line 387) | def get_stride_from_layout(x: torch.Tensor, layout:Literal["bshd", "bhsd... function get_shape_and_strides_from_layout (line 398) | def get_shape_and_strides_from_layout(x: torch.Tensor, layout: Literal["... function get_strides_from_layout (line 401) | def get_strides_from_layout(q, k, v, o, layout): function get_padded_headsize (line 408) | def get_padded_headsize(size): function compute_alibi_tensor_ref (line 416) | def compute_alibi_tensor_ref(alibi_slopes, seqlen_q, seqlen_k): function create_dropout_mask (line 425) | def create_dropout_mask(dropout_p, shape, seed): function create_dropout_mask_varlen (line 430) | def create_dropout_mask_varlen(dropout_p, batch, nheads_q, cu_seqlens_q,... function write_dropout_mask (line 446) | def write_dropout_mask(x, tensor_name = "tensor"): function is_cdna (line 485) | def is_cdna(): function is_rdna (line 490) | def is_rdna(): FILE: modules/framepack/create-video.py function auth (line 23) | def auth(): function get (line 29) | def get(endpoint: str, dct: dict = None): function post (line 37) | def post(endpoint: str, dct: dict = None): function encode (line 45) | def encode(f): function generate (line 60) | def generate(args): # pylint: disable=redefined-outer-name FILE: modules/framepack/framepack_api.py class ReqFramepack (line 7) | class ReqFramepack(BaseModel): class ResFramepack (line 46) | class ResFramepack(BaseModel): function framepack_post (line 52) | def framepack_post(request: ReqFramepack): function create_api (line 131) | def create_api(_fastapi, _gradioapp): FILE: modules/framepack/framepack_hijack.py function set_progress_bar_config (line 23) | def set_progress_bar_config(): function set_prompt_template (line 32) | def set_prompt_template(prompt, system_prompt:str=None, optimized_prompt... FILE: modules/framepack/framepack_install.py function rename (line 8) | def rename(src:str, dst:str): function install_requirements (line 19) | def install_requirements(attention:str='SDPA'): function git_clone (line 35) | def git_clone(git_repo:str, git_dir:str, tmp_dir:str): function git_update (line 61) | def git_update(git_dir:str, git_commit:str): FILE: modules/framepack/framepack_load.py function split_url (line 28) | def split_url(url): function set_model (line 37) | def set_model(receipe: str=None): function get_model (line 50) | def get_model(): function reset_model (line 57) | def reset_model(): function load_model (line 64) | def load_model(variant:str=None, pipeline:str=None, text_encoder:str=Non... function unload_model (line 211) | def unload_model(): FILE: modules/framepack/framepack_ui.py function change_sections (line 9) | def change_sections(duration, mp4_fps, mp4_interpolate, latent_ws, varia... function create_ui (line 15) | def create_ui(prompt, negative, styles, _overrides, init_image, last_ima... FILE: modules/framepack/framepack_vae.py function vae_decode_simple (line 30) | def vae_decode_simple(latents): function vae_decode_tiny (line 43) | def vae_decode_tiny(latents): function vae_decode_remote (line 58) | def vae_decode_remote(latents): function vae_decode_full (line 71) | def vae_decode_full(latents): function vae_decode (line 79) | def vae_decode(latents, vae_type): function vae_encode (line 94) | def vae_encode(image): FILE: modules/framepack/framepack_worker.py function get_latent_paddings (line 13) | def get_latent_paddings(mp4_fps, mp4_interpolate, latent_window_size, to... function worker (line 32) | def worker( FILE: modules/framepack/framepack_wrappers.py function prepare_image (line 23) | def prepare_image(image, resolution): function interpolate_prompts (line 48) | def interpolate_prompts(prompts, steps): function prepare_prompts (line 67) | def prepare_prompts(p, init_image, prompt:str, section_prompt:str, num_s... function load_model (line 93) | def load_model(variant, attention): function unload_model (line 110) | def unload_model(): function run_framepack (line 116) | def run_framepack(task_id, _ui_state, init_image, end_image, start_weigh... FILE: modules/framepack/pipeline/bucket_tools.py function find_nearest_bucket (line 21) | def find_nearest_bucket(h, w, resolution=640): FILE: modules/framepack/pipeline/clip_vision.py function hf_clip_vision_encode (line 4) | def hf_clip_vision_encode(image, feature_extractor, image_encoder): FILE: modules/framepack/pipeline/dit_common.py function LayerNorm_forward (line 10) | def LayerNorm_forward(self, x): function FP32LayerNorm_forward (line 18) | def FP32LayerNorm_forward(self, x): function RMSNorm_forward (line 32) | def RMSNorm_forward(self, hidden_states): function AdaLayerNormContinuous_forward (line 46) | def AdaLayerNormContinuous_forward(self, x, conditioning_embedding): FILE: modules/framepack/pipeline/hunyuan.py function encode_prompt_conds (line 7) | def encode_prompt_conds(prompt, text_encoder, text_encoder_2, tokenizer,... function vae_decode_fake (line 61) | def vae_decode_fake(latents): function vae_decode (line 93) | def vae_decode(latents, vae, image_mode=False): function vae_encode (line 107) | def vae_encode(image, vae): FILE: modules/framepack/pipeline/hunyuan_video_packed.py function pad_for_3d_conv (line 55) | def pad_for_3d_conv(x, kernel_size): function center_down_sample_3d (line 64) | def center_down_sample_3d(x, kernel_size): function get_cu_seqlens (line 73) | def get_cu_seqlens(text_mask, img_len): function apply_rotary_emb_transposed (line 90) | def apply_rotary_emb_transposed(x, freqs_cis): function attn_varlen_func (line 99) | def attn_varlen_func(q, k, v, cu_seqlens_q, cu_seqlens_kv, max_seqlen_q,... class HunyuanAttnProcessorFlashAttnDouble (line 134) | class HunyuanAttnProcessorFlashAttnDouble: method __call__ (line 135) | def __call__(self, attn, hidden_states, encoder_hidden_states, attenti... class HunyuanAttnProcessorFlashAttnSingle (line 180) | class HunyuanAttnProcessorFlashAttnSingle: method __call__ (line 181) | def __call__(self, attn, hidden_states, encoder_hidden_states, attenti... class CombinedTimestepGuidanceTextProjEmbeddings (line 210) | class CombinedTimestepGuidanceTextProjEmbeddings(nn.Module): method __init__ (line 211) | def __init__(self, embedding_dim, pooled_projection_dim): method forward (line 219) | def forward(self, timestep, guidance, pooled_projection): class CombinedTimestepTextProjEmbeddings (line 234) | class CombinedTimestepTextProjEmbeddings(nn.Module): method __init__ (line 235) | def __init__(self, embedding_dim, pooled_projection_dim): method forward (line 242) | def forward(self, timestep, pooled_projection): class HunyuanVideoAdaNorm (line 253) | class HunyuanVideoAdaNorm(nn.Module): method __init__ (line 254) | def __init__(self, in_features: int, out_features: Optional[int] = Non... method forward (line 261) | def forward( class HunyuanVideoIndividualTokenRefinerBlock (line 270) | class HunyuanVideoIndividualTokenRefinerBlock(nn.Module): method __init__ (line 271) | def __init__( method forward (line 297) | def forward( class HunyuanVideoIndividualTokenRefiner (line 320) | class HunyuanVideoIndividualTokenRefiner(nn.Module): method __init__ (line 321) | def __init__( method forward (line 345) | def forward( class HunyuanVideoTokenRefiner (line 367) | class HunyuanVideoTokenRefiner(nn.Module): method __init__ (line 368) | def __init__( method forward (line 395) | def forward( class HunyuanVideoRotaryPosEmbed (line 416) | class HunyuanVideoRotaryPosEmbed(nn.Module): method __init__ (line 417) | def __init__(self, rope_dim, theta): method get_frequency (line 423) | def get_frequency(self, dim, pos): method forward_inner (line 430) | def forward_inner(self, frame_indices, height, width, device): method forward (line 447) | def forward(self, frame_indices, height, width, device): class AdaLayerNormZero (line 454) | class AdaLayerNormZero(nn.Module): method __init__ (line 455) | def __init__(self, embedding_dim: int, norm_type="layer_norm", bias=Tr... method forward (line 464) | def forward( class AdaLayerNormZeroSingle (line 476) | class AdaLayerNormZeroSingle(nn.Module): method __init__ (line 477) | def __init__(self, embedding_dim: int, norm_type="layer_norm", bias=Tr... method forward (line 487) | def forward( class AdaLayerNormContinuous (line 499) | class AdaLayerNormContinuous(nn.Module): method __init__ (line 500) | def __init__( method forward (line 517) | def forward(self, x: torch.Tensor, emb: torch.Tensor) -> torch.Tensor: class HunyuanVideoSingleTransformerBlock (line 525) | class HunyuanVideoSingleTransformerBlock(nn.Module): method __init__ (line 526) | def __init__( method forward (line 556) | def forward( class HunyuanVideoTransformerBlock (line 599) | class HunyuanVideoTransformerBlock(nn.Module): method __init__ (line 600) | def __init__( method forward (line 634) | def forward( class ClipVisionProjection (line 674) | class ClipVisionProjection(nn.Module): method __init__ (line 675) | def __init__(self, in_channels, out_channels): method forward (line 680) | def forward(self, x): class HunyuanVideoPatchEmbed (line 685) | class HunyuanVideoPatchEmbed(nn.Module): method __init__ (line 686) | def __init__(self, patch_size, in_chans, embed_dim): class HunyuanVideoPatchEmbedForCleanLatents (line 691) | class HunyuanVideoPatchEmbedForCleanLatents(nn.Module): method __init__ (line 692) | def __init__(self, inner_dim): method initialize_weight_from_another_conv3d (line 699) | def initialize_weight_from_another_conv3d(self, another_layer): class HunyuanVideoTransformer3DModelPacked (line 718) | class HunyuanVideoTransformer3DModelPacked(ModelMixin, ConfigMixin, Peft... method __init__ (line 720) | def __init__( method install_image_projection (line 796) | def install_image_projection(self, in_channels): method install_clean_x_embedder (line 801) | def install_clean_x_embedder(self): method enable_gradient_checkpointing (line 805) | def enable_gradient_checkpointing(self): method disable_gradient_checkpointing (line 808) | def disable_gradient_checkpointing(self): method initialize_teacache (line 811) | def initialize_teacache(self, enable_teacache=True, num_steps=25, rel_... method gradient_checkpointing_method (line 821) | def gradient_checkpointing_method(self, block, *args): method process_input_hidden_states (line 828) | def process_input_hidden_states( method forward (line 887) | def forward( FILE: modules/framepack/pipeline/k_diffusion_hunyuan.py function flux_time_shift (line 8) | def flux_time_shift(t, mu=1.15, sigma=1.0): function calculate_flux_mu (line 12) | def calculate_flux_mu(context_length, x1=256, y1=0.5, x2=4096, y2=1.15, ... function get_flux_sigmas_from_mu (line 20) | def get_flux_sigmas_from_mu(n, mu): function sample_hunyuan (line 27) | def sample_hunyuan( FILE: modules/framepack/pipeline/thread_utils.py class Listener (line 6) | class Listener: method _process_tasks (line 12) | def _process_tasks(cls): method add_task (line 30) | def add_task(cls, func, *args, **kwargs): function async_run (line 39) | def async_run(func, *args, **kwargs): class FIFOQueue (line 43) | class FIFOQueue: method __init__ (line 44) | def __init__(self): method push (line 48) | def push(self, item): method pop (line 52) | def pop(self): method top (line 58) | def top(self): method next (line 64) | def next(self): class AsyncStream (line 73) | class AsyncStream: method __init__ (line 74) | def __init__(self): FILE: modules/framepack/pipeline/uni_pc_fm.py function expand_dims (line 12) | def expand_dims(v, dims): function test_solver (line 19) | def test_solver(): function linalg_solve (line 31) | def linalg_solve(A, B, device): class FlowMatchUniPC (line 46) | class FlowMatchUniPC: method __init__ (line 47) | def __init__(self, model, extra_args, variant='bh1'): method model_fn (line 52) | def model_fn(self, x, t): method update_fn (line 55) | def update_fn(self, x, model_prev_list, t_prev_list, t, order): method sample (line 141) | def sample(self, x, sigmas, callback=None, disable_pbar=False): function sample_unipc (line 169) | def sample_unipc(model, noise, sigmas, extra_args=None, callback=None, d... FILE: modules/framepack/pipeline/utils.py function min_resize (line 14) | def min_resize(x, m): function d_resize (line 31) | def d_resize(x, y): function resize_and_center_crop (line 43) | def resize_and_center_crop(image, target_width, target_height): function resize_and_center_crop_pytorch (line 61) | def resize_and_center_crop_pytorch(image, target_width, target_height): function resize_without_crop (line 80) | def resize_without_crop(image, target_width, target_height): function just_crop (line 89) | def just_crop(image, w, h): function write_to_json (line 103) | def write_to_json(data, file_path): function read_from_json (line 111) | def read_from_json(file_path): function get_active_parameters (line 117) | def get_active_parameters(m): function cast_training_params (line 121) | def cast_training_params(m, dtype=torch.float32): function separate_lora_AB (line 130) | def separate_lora_AB(parameters, B_patterns=None): function set_attr_recursive (line 146) | def set_attr_recursive(obj, attr, value): function batch_mixture (line 155) | def batch_mixture(a, b=None, probability_a=0.5, mask_a=None): function zero_module (line 171) | def zero_module(module): function supress_lower_channels (line 178) | def supress_lower_channels(m, k, alpha=0.01): function freeze_module (line 188) | def freeze_module(m): function get_latest_safetensors (line 196) | def get_latest_safetensors(folder_path): function generate_random_prompt_from_tags (line 207) | def generate_random_prompt_from_tags(tags_str, min_length=3, max_length=... function interpolate_numbers (line 214) | def interpolate_numbers(a, b, n, round_to_int=False, gamma=1.0): function uniform_random_by_intervals (line 221) | def uniform_random_by_intervals(inclusive, exclusive, n, round_to_int=Fa... function soft_append_bcthw (line 230) | def soft_append_bcthw(history, current, overlap=0): function save_bcthw_as_mp4 (line 244) | def save_bcthw_as_mp4(x, output_filename, fps=10, crf=0): function save_bcthw_as_png (line 261) | def save_bcthw_as_png(x, output_filename): function save_bchw_as_png (line 270) | def save_bchw_as_png(x, output_filename): function add_tensors_with_padding (line 279) | def add_tensors_with_padding(tensor1, tensor2): function visualize_txt_as_img (line 298) | def visualize_txt_as_img(width, height, text, font_path='font/DejaVuSans... function blue_mark (line 334) | def blue_mark(x): function green_mark (line 342) | def green_mark(x): function frame_mark (line 349) | def frame_mark(x): function pytorch2numpy (line 359) | def pytorch2numpy(imgs): function numpy2pytorch (line 370) | def numpy2pytorch(imgs): function duplicate_prefix_to_suffix (line 377) | def duplicate_prefix_to_suffix(x, count, zero_out=False): function weighted_mse (line 384) | def weighted_mse(a, b, weight): function clamped_linear_interpolation (line 388) | def clamped_linear_interpolation(x, x_min, y_min, x_max, y_max, sigma=1.0): function expand_to_dims (line 395) | def expand_to_dims(x, target_dims): function repeat_to_batch_size (line 399) | def repeat_to_batch_size(tensor: torch.Tensor, batch_size: int): function dim5 (line 416) | def dim5(x): function dim4 (line 420) | def dim4(x): function dim3 (line 424) | def dim3(x): function crop_or_pad_yield_mask (line 428) | def crop_or_pad_yield_mask(x, length): function extend_dim (line 443) | def extend_dim(x, dim, minimal_length, zero_pad=False): function lazy_positional_encoding (line 461) | def lazy_positional_encoding(t, repeats=None): function state_dict_offset_merge (line 478) | def state_dict_offset_merge(A, B, C=None): function state_dict_weighted_merge (line 495) | def state_dict_weighted_merge(state_dicts, weights): function group_files_by_folder (line 522) | def group_files_by_folder(all_files): function generate_timestamp (line 535) | def generate_timestamp(): function write_PIL_image_with_png_info (line 543) | def write_PIL_image_with_png_info(image, metadata, path): function torch_safe_save (line 554) | def torch_safe_save(content, path): function move_optimizer_to_device (line 560) | def move_optimizer_to_device(optimizer, device): FILE: modules/framepack/pipeline/wrapper.py function append_dims (line 4) | def append_dims(x, target_dims): function rescale_noise_cfg (line 8) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=1.0): function fm_wrapper (line 19) | def fm_wrapper(transformer, t_scale=1000.0): FILE: modules/generation_parameters_copypaste.py class ParamBinding (line 25) | class ParamBinding: method __init__ (line 26) | def __init__(self, paste_button, tabname: str, source_text_component=N... function reset (line 37) | def reset(): function image_from_url_text (line 42) | def image_from_url_text(filedata): function add_paste_fields (line 86) | def add_paste_fields(tabname: str, init_img: gr.Image | gr.HTML | None, ... function get_all_fields (line 134) | def get_all_fields(): function create_buttons (line 144) | def create_buttons(tabs_list: list[str]) -> dict[str, gr.Button]: function should_skip (line 164) | def should_skip(param: str): function register_paste_params_button (line 187) | def register_paste_params_button(binding: ParamBinding): function connect_paste_params_buttons (line 191) | def connect_paste_params_buttons(): function send_image (line 237) | def send_image(x): function create_override_settings_dict (line 242) | def create_override_settings_dict(text_pairs): function connect_paste (line 256) | def connect_paste(button, local_paste_fields, input_comp, override_setti... FILE: modules/ggml/__init__.py function install_gguf (line 8) | def install_gguf(): function load_gguf_state_dict (line 29) | def load_gguf_state_dict(path: str, compute_dtype: torch.dtype) -> dict: function load_gguf (line 48) | def load_gguf(path, cls, compute_dtype: torch.dtype): FILE: modules/ggml/gguf_tensor.py function dequantize_and_run (line 9) | def dequantize_and_run(func, args, kwargs): function apply_to_quantized_tensor (line 21) | def apply_to_quantized_tensor(func, args, kwargs): class GGMLTensor (line 55) | class GGMLTensor(torch.Tensor): method __new__ (line 63) | def __new__( method __init__ (line 81) | def __init__( method __repr__ (line 94) | def __repr__(self, *, tensor_contents=None): method size (line 98) | def size(self, dim: None = None) -> torch.Size: ... method size (line 101) | def size(self, dim: int) -> int: ... method size (line 103) | def size(self, dim: int | None = None): method shape (line 110) | def shape(self) -> torch.Size: # pyright: ignore[reportIncompatibleVa... method quantized_shape (line 115) | def quantized_shape(self) -> torch.Size: method requires_grad_ (line 119) | def requires_grad_(self, mode: bool = True) -> torch.Tensor: method get_dequantized_tensor (line 125) | def get_dequantized_tensor(self): method __torch_dispatch__ (line 143) | def __torch_dispatch__(cls, func, types, args, kwargs): FILE: modules/ggml/gguf_utils.py function get_scale_min (line 16) | def get_scale_min(scales: torch.Tensor): function dequantize_blocks_Q8_0 (line 30) | def dequantize_blocks_Q8_0( function dequantize_blocks_Q5_1 (line 39) | def dequantize_blocks_Q5_1( function dequantize_blocks_Q5_0 (line 60) | def dequantize_blocks_Q5_0( function dequantize_blocks_Q4_1 (line 81) | def dequantize_blocks_Q4_1( function dequantize_blocks_Q4_0 (line 98) | def dequantize_blocks_Q4_0( function dequantize_blocks_BF16 (line 113) | def dequantize_blocks_BF16( function dequantize_blocks_Q6_K (line 119) | def dequantize_blocks_Q6_K( function dequantize_blocks_Q5_K (line 149) | def dequantize_blocks_Q5_K( function dequantize_blocks_Q4_K (line 177) | def dequantize_blocks_Q4_K( function dequantize_blocks_Q3_K (line 199) | def dequantize_blocks_Q3_K( function dequantize_blocks_Q2_K (line 234) | def dequantize_blocks_Q2_K( function is_torch_compatible (line 273) | def is_torch_compatible(tensor: Optional[torch.Tensor]): function is_quantized (line 277) | def is_quantized(tensor: torch.Tensor): function dequantize (line 281) | def dequantize( function to_uint32 (line 298) | def to_uint32(x: torch.Tensor) -> torch.Tensor: function split_block_dims (line 303) | def split_block_dims(blocks: torch.Tensor, *args): FILE: modules/gr_hijack.py function process_kanvas (line 15) | def process_kanvas(self, x): # only used when kanvas overrides gr.Image ... function gr_image_preprocess (line 46) | def gr_image_preprocess(self, x): function add_classes_to_gradio_component (line 73) | def add_classes_to_gradio_component(comp): function IOComponent_init (line 82) | def IOComponent_init(self, *args, **kwargs): function Block_get_config (line 95) | def Block_get_config(self): function BlockContext_init (line 104) | def BlockContext_init(self, *args, **kwargs): function Blocks_get_config_file (line 116) | def Blocks_get_config_file(self, *args, **kwargs): function patch_gradio (line 124) | def patch_gradio(): function init (line 153) | def init(): FILE: modules/gr_tempdir.py function register_tmp_file (line 13) | def register_tmp_file(gradio, filename): function check_tmp_file (line 18) | def check_tmp_file(gradio, filename): function pil_to_temp_file (line 51) | def pil_to_temp_file(self, img: Image, dir: str, format="png") -> str: #... function on_tmpdir_changed (line 98) | def on_tmpdir_changed(): function cleanup_tmpdr (line 104) | def cleanup_tmpdr(): FILE: modules/hashes.py function init_cache (line 14) | def init_cache(): function dump_cache (line 20) | def dump_cache(): function cache (line 24) | def cache(subsection): function calculate_sha256 (line 33) | def calculate_sha256(filename, quiet=False): function sha256_from_cache (line 57) | def sha256_from_cache(filename, title, use_addnet_hash=False): function sha256 (line 69) | def sha256(filename, title, use_addnet_hash=False): function addnet_hash_safetensors (line 103) | def addnet_hash_safetensors(b): FILE: modules/hidiffusion/__init__.py function apply (line 8) | def apply(p, model_type): function unapply (line 42) | def unapply(): FILE: modules/hidiffusion/hidiffusion.py function sd15_hidiffusion_key (line 9) | def sd15_hidiffusion_key(): function sdxl_hidiffusion_key (line 23) | def sdxl_hidiffusion_key(): function sdxl_turbo_hidiffusion_key (line 43) | def sdxl_turbo_hidiffusion_key(): function make_diffusers_transformer_block (line 82) | def make_diffusers_transformer_block(block_class: Type[torch.nn.Module])... function make_diffusers_cross_attn_down_block (line 256) | def make_diffusers_cross_attn_down_block(block_class: Type[torch.nn.Modu... function make_diffusers_cross_attn_up_block (line 388) | def make_diffusers_cross_attn_up_block(block_class: Type[torch.nn.Module... function make_diffusers_downsampler_block (line 487) | def make_diffusers_downsampler_block(block_class: Type[torch.nn.Module])... function make_diffusers_upsampler_block (line 554) | def make_diffusers_upsampler_block(block_class: Type[torch.nn.Module]) -... function hook_diffusion_model (line 608) | def hook_diffusion_model(model: torch.nn.Module): function apply_hidiffusion (line 617) | def apply_hidiffusion( function remove_hidiffusion (line 700) | def remove_hidiffusion(model: torch.nn.Module): FILE: modules/hidiffusion/hidiffusion_controlnet.py function make_diffusers_unet_2d_condition (line 13) | def make_diffusers_unet_2d_condition(block_class): function make_diffusers_sdxl_contrtolnet_ppl (line 264) | def make_diffusers_sdxl_contrtolnet_ppl(block_class): FILE: modules/hidiffusion/utils.py function isinstance_str (line 4) | def isinstance_str(x: object, cls_name: str): function init_generator (line 19) | def init_generator(device: torch.device, fallback: torch.Generator=None): FILE: modules/history.py class Item (line 12) | class Item(): method __init__ (line 13) | def __init__(self, latent, preview=None, info=None, ops=[]): class History (line 23) | class History(): method __init__ (line 24) | def __init__(self): method count (line 29) | def count(self): method size (line 33) | def size(self): method list (line 40) | def list(self): method selected (line 45) | def selected(self): method find (line 55) | def find(self, name): method add (line 61) | def add(self, latent, preview=None, info=None, ops=[]): method clear (line 71) | def clear(self): method load (line 75) | def load(self): method save (line 78) | def save(self): FILE: modules/images.py function sanitize_filename_part (line 44) | def sanitize_filename_part(text, replace_spaces=True): function atomically_save_image (line 59) | def atomically_save_image(): function save_image (line 154) | def save_image(image, function safe_decode_string (line 239) | def safe_decode_string(s: bytes): function parse_comfy_metadata (line 256) | def parse_comfy_metadata(data: dict): function parse_invoke_metadata (line 294) | def parse_invoke_metadata(data: dict): function parse_novelai_metadata (line 316) | def parse_novelai_metadata(data: dict): function read_info_from_image (line 328) | def read_info_from_image(image: Image.Image, watermark: bool = False) ->... function image_data (line 394) | def image_data(data): function flatten (line 421) | def flatten(img, bgcolor): function draw_overlay (line 430) | def draw_overlay(im, text: str = '', y_offset: int = 0): function set_watermark (line 438) | def set_watermark(image, wm_text: str | None = None, wm_image: Image.Ima... function get_watermark (line 500) | def get_watermark(image): FILE: modules/images_grid.py function check_grid_size (line 11) | def check_grid_size(imgs): function get_grid_size (line 28) | def get_grid_size(imgs, batch_size=1, rows=None, cols=None): function image_grid (line 60) | def image_grid(imgs, batch_size:int=1, rows:int=None, cols:int=None): function split_grid (line 75) | def split_grid(image, tile_w=512, tile_h=512, overlap=64): function combine_grid (line 100) | def combine_grid(grid): class GridAnnotation (line 125) | class GridAnnotation: method __init__ (line 126) | def __init__(self, text='', is_active=True): function get_font (line 132) | def get_font(fontsize): function draw_grid_annotations (line 139) | def draw_grid_annotations(im, width, height, x_texts, y_texts, margin=0,... function draw_prompt_matrix (line 212) | def draw_prompt_matrix(im, width, height, all_prompts, margin=0): FILE: modules/images_namegen.py class FilenameGenerator (line 26) | class FilenameGenerator: method __init__ (line 68) | def __init__(self, p, seed, prompt, image=None, grid=False, width=None... method hasprompt (line 98) | def hasprompt(self, *args): method image_hash (line 114) | def image_hash(self): method prompt_full (line 125) | def prompt_full(self): method prompt_words (line 128) | def prompt_words(self): method prompt_no_style (line 138) | def prompt_no_style(self): method datetime (line 149) | def datetime(self, *args): method prompt_sanitize (line 164) | def prompt_sanitize(self, prompt): method sanitize (line 170) | def sanitize(self, filename): method safe_int (line 207) | def safe_int(self, s): method sequence (line 213) | def sequence(self, fn): method apply (line 236) | def apply(self, x): function get_next_sequence_number (line 284) | def get_next_sequence_number(path, basename): # pylint: disable=unused-a... FILE: modules/images_resize.py function resize_image (line 10) | def resize_image(resize_mode: int, im: Union[Image.Image, torch.Tensor],... FILE: modules/img2img.py function validate_inputs (line 17) | def validate_inputs(inputs): function process_batch (line 27) | def process_batch(p, input_files, input_dir, output_dir, inpaint_mask_di... function img2img (line 150) | def img2img(id_task: str, state: str, mode: int, FILE: modules/infotext.py function quote (line 16) | def quote(text): function unquote (line 22) | def unquote(text): function parse (line 31) | def parse(infotext): FILE: modules/intel/ipex/__init__.py function ipex_init (line 19) | def ipex_init(): # pylint: disable=too-many-statements FILE: modules/intel/ipex/attention.py function find_split_size (line 16) | def find_split_size(original_size: int, slice_block_size: int, slice_rat... function find_sdpa_slice_sizes (line 29) | def find_sdpa_slice_sizes(query_shape: Tuple[int], key_shape: Tuple[int]... function dynamic_scaled_dot_product_attention (line 62) | def dynamic_scaled_dot_product_attention(query: torch.FloatTensor, key: ... FILE: modules/intel/ipex/device_prop.py function mb_to_byte (line 3) | def mb_to_byte(mb: int) -> int: FILE: modules/intel/ipex/diffusers.py function fourier_filter (line 13) | def fourier_filter(x_in, threshold, scale): class FluxPosEmbed (line 19) | class FluxPosEmbed(torch.nn.Module): method __init__ (line 20) | def __init__(self, theta: int, axes_dim): method forward (line 25) | def forward(self, ids: torch.Tensor) -> torch.Tensor: function hidream_rope (line 45) | def hidream_rope(pos: torch.Tensor, dim: int, theta: int) -> torch.Tensor: function get_1d_sincos_pos_embed_from_grid (line 63) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos, output_type="np"): function apply_rotary_emb (line 83) | def apply_rotary_emb(x, freqs_cis, use_real: bool = True, use_real_unbin... function ipex_diffusers (line 112) | def ipex_diffusers(device_supports_fp64=False): FILE: modules/intel/ipex/hijacks.py function is_cuda (line 22) | def is_cuda(self): function check_device_type (line 26) | def check_device_type(device, device_type: str) -> bool: function check_cuda (line 33) | def check_cuda(device) -> bool: function return_xpu (line 37) | def return_xpu(device): # keep the device instance type, aka return stri... function autocast_init (line 44) | def autocast_init(self, device_type=None, dtype=None, enabled=True, cach... function GradScaler_init (line 53) | def GradScaler_init(self, device: str = None, init_scale: float = 2.0**1... function torch_is_autocast_enabled (line 62) | def torch_is_autocast_enabled(device_type=None): function torch_get_autocast_dtype (line 71) | def torch_get_autocast_dtype(device_type=None): function interpolate (line 82) | def interpolate(tensor, size=None, scale_factor=None, mode="nearest", al... function functional_pad (line 96) | def functional_pad(input, pad, mode="constant", value=None): function fft_fftn (line 106) | def fft_fftn(input, s=None, dim=None, norm=None, *, out=None): function fft_ifftn (line 114) | def fft_ifftn(input, s=None, dim=None, norm=None, *, out=None): function from_numpy (line 122) | def from_numpy(ndarray): function as_tensor (line 131) | def as_tensor(data, dtype=None, device=None): function torch_tensor (line 142) | def torch_tensor(data, *args, dtype=None, device=None, **kwargs): function Tensor_to (line 156) | def Tensor_to(self, device=None, *args, **kwargs): function Tensor_cuda (line 170) | def Tensor_cuda(self, device=None, *args, **kwargs): function Tensor_pin_memory (line 179) | def Tensor_pin_memory(self, device=None, *args, **kwargs): function UntypedStorage_init (line 188) | def UntypedStorage_init(*args, device=None, **kwargs): function UntypedStorage_to (line 198) | def UntypedStorage_to(self, *args, device=None, **kwargs): function UntypedStorage_cuda (line 206) | def UntypedStorage_cuda(self, device=None, non_blocking=False, **kwargs): function torch_empty (line 215) | def torch_empty(*args, device=None, **kwargs): function torch_randn (line 224) | def torch_randn(*args, device=None, dtype=None, **kwargs): function torch_ones (line 233) | def torch_ones(*args, device=None, **kwargs): function torch_zeros (line 242) | def torch_zeros(*args, device=None, **kwargs): function torch_full (line 251) | def torch_full(*args, device=None, **kwargs): function torch_arange (line 260) | def torch_arange(*args, device=None, dtype=None, **kwargs): function torch_linspace (line 274) | def torch_linspace(*args, device=None, dtype=None, **kwargs): function torch_eye (line 288) | def torch_eye(*args, device=None, **kwargs): function torch_load (line 297) | def torch_load(f, map_location=None, *args, **kwargs): function torch_cuda_synchronize (line 305) | def torch_cuda_synchronize(device=None): function torch_cuda_device (line 313) | def torch_cuda_device(device): function torch_cuda_set_device (line 321) | def torch_cuda_set_device(device): function get_device_properties (line 329) | def get_device_properties(device=None): class DeviceProperties (line 341) | class DeviceProperties(): method __init__ (line 342) | def __init__(self, device_prop, new_keys): class torch_Generator (line 352) | class torch_Generator(original_torch_Generator): method __new__ (line 353) | def __new__(self, device=None): function ipex_hijacks (line 362) | def ipex_hijacks(): FILE: modules/intel/openvino/__init__.py function warn_once (line 77) | def warn_once(msg): class OpenVINOGraphModule (line 83) | class OpenVINOGraphModule(torch.nn.Module): method __init__ (line 84) | def __init__(self, gm, partition_id, use_python_fusion_cache, model_ha... method __call__ (line 93) | def __call__(self, *args): function get_device_list (line 104) | def get_device_list(): function get_device (line 109) | def get_device(): function get_openvino_device (line 142) | def get_openvino_device(): function cached_model_name (line 150) | def cached_model_name(model_hash_str, device, args, cache_root, reversed... function execute (line 183) | def execute( function execute_cached (line 199) | def execute_cached(compiled_model, *args): function openvino_compile (line 210) | def openvino_compile(gm: GraphModule, *example_inputs, model_hash_str: s... function openvino_compile_cached_model (line 294) | def openvino_compile_cached_model(cached_model_path, *example_inputs): function openvino_execute (line 341) | def openvino_execute(gm: GraphModule, *args, executor_parameters=None, p... function openvino_execute_partitioned (line 386) | def openvino_execute_partitioned(gm: GraphModule, *args, executor_parame... function partition_graph (line 426) | def partition_graph(gm: GraphModule, use_python_fusion_cache: bool, mode... function generate_subgraph_str (line 445) | def generate_subgraph_str(tensor): function get_subgraph_type (line 451) | def get_subgraph_type(tensor): function openvino_fx (line 458) | def openvino_fx(subgraph, example_inputs, options=None): FILE: modules/interrogate/deepbooru.py class DeepDanbooru (line 13) | class DeepDanbooru: method __init__ (line 14) | def __init__(self): method load (line 17) | def load(self): method start (line 36) | def start(self): method stop (line 40) | def stop(self): method tag (line 45) | def tag(self, pil_image, **kwargs): method tag_multi (line 52) | def tag_multi( function _save_tags_to_file (line 129) | def _save_tags_to_file(img_path, tags_str: str, save_append: bool) -> bool: function get_models (line 154) | def get_models() -> list: function load_model (line 159) | def load_model(model_name: str = None) -> bool: # pylint: disable=unused... function unload_model (line 169) | def unload_model(): function tag (line 177) | def tag(image, **kwargs) -> str: function batch (line 204) | def batch( FILE: modules/interrogate/deepbooru_model.py class DeepDanbooruModel (line 10) | class DeepDanbooruModel(nn.Module): method __init__ (line 11) | def __init__(self): method forward (line 195) | def forward(self, *inputs): method load_state_dict (line 672) | def load_state_dict(self, state_dict, **kwargs): # pylint: disable=arg... FILE: modules/interrogate/deepseek.py class fake_attrdict (line 24) | class fake_attrdict(): class AttrDict (line 25) | class AttrDict(dict): # dot notation access to dictionary attributes function load (line 31) | def load(repo: str): function unload (line 61) | def unload(): function predict (line 75) | def predict(question, image, repo): FILE: modules/interrogate/interrogate.py function interrogate (line 6) | def interrogate(image): FILE: modules/interrogate/joycaption.py class JoyOptions (line 43) | class JoyOptions(): method __str__ (line 51) | def __str__(self): function load (line 60) | def load(repo: str = None): function unload (line 80) | def unload(): function predict (line 94) | def predict(question: str, image, vqa_model: str = None) -> str: FILE: modules/interrogate/joytag.py class VisionModel (line 112) | class VisionModel(nn.Module): method __init__ (line 116) | def __init__(self, image_size: int, n_tags: int): method load_model (line 122) | def load_model(path: str) -> 'VisionModel': method from_config (line 134) | def from_config(config: dict) -> 'VisionModel': method get_optimized_parameters (line 139) | def get_optimized_parameters(self, lr: float): method save (line 142) | def save(self): method load (line 145) | def load(self, state_dict): function basic_calculate_loss (line 149) | def basic_calculate_loss(preds: dict[str, torch.Tensor], batch: dict, po... class CLIPMlp (line 225) | class CLIPMlp(nn.Module): method __init__ (line 226) | def __init__(self, hidden_size: int, intermediate_size: int, activatio... method forward (line 232) | def forward(self, hidden_states: torch.Tensor): class FastCLIPAttention2 (line 239) | class FastCLIPAttention2(nn.Module): method __init__ (line 241) | def __init__(self, hidden_size: int, out_dim: int, num_attention_heads... method forward (line 257) | def forward(self, query_states: torch.Tensor, kv_states: torch.Tensor)... class SkipInit (line 285) | class SkipInit(nn.Module): method __init__ (line 286) | def __init__(self, hidden_size: int, channel_wise: bool, init_scale: f... method forward (line 296) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FastCLIPEncoderLayer (line 300) | class FastCLIPEncoderLayer(nn.Module): method __init__ (line 301) | def __init__( method forward (line 333) | def forward(self, hidden_states: torch.Tensor): function sinusoidal_position_embedding (line 360) | def sinusoidal_position_embedding(width: int, height: int, depth: int, d... class CLIPEmbeddingLayer (line 374) | class CLIPEmbeddingLayer(nn.Module): method __init__ (line 375) | def __init__(self, hidden_size: int, num_channels: int, image_size: in... method forward (line 411) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class MHAPoolingHead (line 450) | class MHAPoolingHead(nn.Module): method __init__ (line 451) | def __init__(self, hidden_size: int, num_attention_heads: int, activat... method forward (line 473) | def forward(self, hidden_states: torch.Tensor): class GAPHead (line 486) | class GAPHead(nn.Module): method __init__ (line 487) | def __init__(self, hidden_size: int, out_dim: int): method forward (line 492) | def forward(self, x: torch.Tensor) -> torch.Tensor: class CLIPLikeModel (line 499) | class CLIPLikeModel(VisionModel): method __init__ (line 500) | def __init__( method forward (line 546) | def forward(self, batch): method calculate_loss (line 555) | def calculate_loss(self, preds, batch, pos_weight): method get_optimized_parameters (line 558) | def get_optimized_parameters(self, lr: float): method get_optimized_parameters_no_wd_bias (line 564) | def get_optimized_parameters_no_wd_bias(self): method save (line 581) | def save(self): method load (line 584) | def load(self, state_dict): class MaskedAutoEncoderViT (line 588) | class MaskedAutoEncoderViT(nn.Module): method __init__ (line 589) | def __init__( method forward (line 667) | def forward(self, batch): method calculate_loss (line 742) | def calculate_loss(self, preds, batch, pos_weight): method get_optimized_parameters (line 745) | def get_optimized_parameters(self, _lr: float): method save (line 748) | def save(self): method load (line 751) | def load(self, state_dict): class StochDepth (line 755) | class StochDepth(nn.Module): method __init__ (line 756) | def __init__(self, drop_rate: float, scale_by_keep: bool = False): method forward (line 761) | def forward(self, x): class SkipInitChannelwise (line 773) | class SkipInitChannelwise(nn.Module): method __init__ (line 774) | def __init__(self, channels, init_val=1e-6): method forward (line 780) | def forward(self, x): class PosEmbedding (line 784) | class PosEmbedding(nn.Module): method __init__ (line 785) | def __init__(self, d_model: int, max_len: int, use_sine: bool, patch_s... method forward (line 796) | def forward(self, x, width: int, height: int): class MLPBlock (line 804) | class MLPBlock(nn.Module): method __init__ (line 805) | def __init__(self, d_model: int, d_ff: int, stochdepth_rate: float): method forward (line 815) | def forward(self, x): class ViTBlock (line 824) | class ViTBlock(nn.Module): method __init__ (line 825) | def __init__(self, num_heads: int, d_model: int, d_ff: int, layerscale... method forward (line 842) | def forward(self, x): function CaiT_LayerScale_init (line 868) | def CaiT_LayerScale_init(network_depth): class CNNLayerNorm (line 877) | class CNNLayerNorm(nn.Module): method __init__ (line 878) | def __init__(self, d_model: int): method forward (line 882) | def forward(self, x: torch.Tensor) -> torch.Tensor: class CNNStem (line 889) | class CNNStem(nn.Module): method __init__ (line 890) | def __init__(self, config: str): method forward (line 920) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ViT (line 924) | class ViT(VisionModel): method __init__ (line 925) | def __init__(self, method forward (line 966) | def forward(self, batch, return_embeddings=False, return_loss: bool = ... method calculate_loss (line 1005) | def calculate_loss(self, preds, batch, pos_weight): method get_optimized_parameters (line 1008) | def get_optimized_parameters(self, lr: float): method save (line 1011) | def save(self): method load (line 1014) | def load(self, state_dict): function prepare_image (line 1022) | def prepare_image(image: Image.Image, target_size: int) -> torch.Tensor: function load (line 1037) | def load(): function unload (line 1051) | def unload(): function predict (line 1064) | def predict(image: Image.Image): FILE: modules/interrogate/moondream3.py function debug (line 16) | def debug(*args, **kwargs): function get_settings (line 27) | def get_settings(): function load_model (line 42) | def load_model(repo: str): function encode_image (line 75) | def encode_image(image: Image.Image, cache_key: str = None): function query (line 102) | def query(image: Image.Image, question: str, repo: str, stream: bool = F... function caption (line 163) | def caption(image: Image.Image, repo: str, length: str = 'normal', strea... function point (line 208) | def point(image: Image.Image, object_name: str, repo: str): function detect (line 241) | def detect(image: Image.Image, object_name: str, repo: str, max_objects:... function predict (line 274) | def predict(question: str, image: Image.Image, repo: str, model_name: st... function clear_cache (line 389) | def clear_cache(): function unload (line 397) | def unload(): FILE: modules/interrogate/openclip.py function _apply_blip2_fix (line 15) | def _apply_blip2_fix(model, processor): class BatchWriter (line 52) | class BatchWriter: method __init__ (line 53) | def __init__(self, folder, mode='w'): method add (line 59) | def add(self, file, prompt): method close (line 66) | def close(self): function update_interrogate_params (line 71) | def update_interrogate_params(): function get_clip_models (line 80) | def get_clip_models(): function refresh_clip_models (line 84) | def refresh_clip_models(): function load_interrogator (line 93) | def load_interrogator(clip_model, blip_model): function unload_clip_model (line 142) | def unload_clip_model(): function interrogate (line 153) | def interrogate(image, mode, caption=None): function interrogate_image (line 179) | def interrogate_image(image, clip_model, blip_model, mode): function interrogate_batch (line 201) | def interrogate_batch(batch_files, batch_folder, batch_str, clip_model, ... function analyze_image (line 250) | def analyze_image(image, clip_model, blip_model): FILE: modules/interrogate/tagger.py function get_models (line 9) | def get_models() -> list: function refresh_models (line 15) | def refresh_models() -> list: function is_deepbooru (line 20) | def is_deepbooru(model_name: str) -> bool: function load_model (line 25) | def load_model(model_name: str) -> bool: function unload_model (line 35) | def unload_model(): function tag (line 42) | def tag(image, model_name: str = None, **kwargs) -> str: function batch (line 64) | def batch(model_name: str, **kwargs) -> str: FILE: modules/interrogate/vqa.py function debug (line 18) | def debug(*args, **kwargs): function get_prompts_for_model (line 156) | def get_prompts_for_model(model_name: str) -> list: function get_internal_prompt (line 178) | def get_internal_prompt(friendly_name: str, user_prompt: str = None) -> ... function get_prompt_placeholder (line 191) | def get_prompt_placeholder(friendly_name: str) -> str: function is_florence_task (line 196) | def is_florence_task(question: str) -> bool: function is_thinking_model (line 210) | def is_thinking_model(model_name: str) -> bool: function truncate_b64_in_conversation (line 227) | def truncate_b64_in_conversation(conversation, front_chars=50, tail_char... function keep_think_block_open (line 251) | def keep_think_block_open(text_prompt: str) -> str: function b64 (line 272) | def b64(image): function clean (line 282) | def clean(response, question, prefill=None): function get_kwargs (line 339) | def get_kwargs(): class VQA (line 355) | class VQA: method __init__ (line 358) | def __init__(self): method unload (line 365) | def unload(self): method load (line 379) | def load(self, model_name: str = None): method _load_fastvlm (line 447) | def _load_fastvlm(self, repo: str): method _fastvlm (line 464) | def _fastvlm(self, question: str, image: Image.Image, repo: str, model... method _load_qwen (line 493) | def _load_qwen(self, repo: str): method _qwen (line 519) | def _qwen(self, question: str, image: Image.Image, repo: str, system_p... method _load_gemma (line 631) | def _load_gemma(self, repo: str): method _gemma (line 653) | def _gemma(self, question: str, image: Image.Image, repo: str, system_... method _load_paligemma (line 757) | def _load_paligemma(self, repo: str): method _paligemma (line 771) | def _paligemma(self, question: str, image: Image.Image, repo: str, mod... method _load_ovis (line 786) | def _load_ovis(self, repo: str): method _ovis (line 801) | def _ovis(self, question: str, image: Image.Image, repo: str, model_na... method _load_smol (line 834) | def _load_smol(self, repo: str): method _smol (line 852) | def _smol(self, question: str, image: Image.Image, repo: str, system_p... method _load_git (line 940) | def _load_git(self, repo: str): method _git (line 954) | def _git(self, question: str, image: Image.Image, repo: str, model_nam... method _load_blip (line 970) | def _load_blip(self, repo: str): method _blip (line 984) | def _blip(self, question: str, image: Image.Image, repo: str, model_na... method _load_vilt (line 994) | def _load_vilt(self, repo: str): method _vilt (line 1008) | def _vilt(self, question: str, image: Image.Image, repo: str, model_na... method _load_pix (line 1020) | def _load_pix(self, repo: str): method _pix (line 1034) | def _pix(self, question: str, image: Image.Image, repo: str, model_nam... method _load_moondream (line 1046) | def _load_moondream(self, repo: str): method _moondream (line 1063) | def _moondream(self, question: str, image: Image.Image, repo: str, mod... method _load_florence (line 1125) | def _load_florence(self, repo: str, revision: str = None): method _florence (line 1163) | def _florence(self, question: str, image: Image.Image, repo: str, revi... method _load_sa2 (line 1183) | def _load_sa2(self, repo: str): method _sa2 (line 1202) | def _sa2(self, question: str, image: Image.Image, repo: str, model_nam... method interrogate (line 1220) | def interrogate(self, question: str = '', system_prompt: str = None, p... method batch (line 1364) | def batch(self, model_name, system_prompt, batch_files, batch_folder, ... function get_instance (line 1432) | def get_instance() -> VQA: function interrogate (line 1441) | def interrogate(*args, **kwargs): function unload_model (line 1445) | def unload_model(): function load_model (line 1449) | def load_model(model_name: str = None): function get_last_annotated_image (line 1453) | def get_last_annotated_image(): function batch (line 1457) | def batch(*args, **kwargs): FILE: modules/interrogate/vqa_detection.py function parse_points (line 8) | def parse_points(result) -> list: function parse_detections (line 41) | def parse_detections(result, label: str, max_objects: int = None) -> list: function format_points_text (line 77) | def format_points_text(points: list) -> str: function format_detections_text (line 98) | def format_detections_text(detections: list, include_confidence: bool = ... function calculate_eye_position (line 125) | def calculate_eye_position(face_bbox: dict) -> tuple: function draw_bounding_boxes (line 139) | def draw_bounding_boxes(image: Image.Image, detections: list, points: li... FILE: modules/interrogate/waifudiffusion.py class WaifuDiffusionTagger (line 41) | class WaifuDiffusionTagger: method __init__ (line 44) | def __init__(self): method load (line 52) | def load(self, model_name: str = None): method _load_tags (line 117) | def _load_tags(self): method unload (line 141) | def unload(self): method preprocess_image (line 155) | def preprocess_image(self, image: Image.Image) -> np.ndarray: method predict (line 195) | def predict( method tag (line 331) | def tag(self, image: Image.Image, **kwargs) -> str: function _save_tags_to_file (line 340) | def _save_tags_to_file(img_path, tags_str: str, save_append: bool) -> bool: function get_models (line 365) | def get_models() -> list: function refresh_models (line 370) | def refresh_models() -> list: function load_model (line 377) | def load_model(model_name: str = None) -> bool: function unload_model (line 382) | def unload_model(): function tag (line 387) | def tag(image: Image.Image, model_name: str = None, **kwargs) -> str: function batch (line 419) | def batch( FILE: modules/ipadapter.py function get_adapters (line 60) | def get_adapters(): function get_images (line 75) | def get_images(input_images): function get_scales (line 109) | def get_scales(adapter_scales, adapter_images): function get_crops (line 116) | def get_crops(adapter_crops, adapter_images): function crop_images (line 123) | def crop_images(images, crops): function unapply (line 144) | def unapply(pipe, unload: bool = False): # pylint: disable=arguments-differ function load_image_encoder (line 167) | def load_image_encoder(pipe: DiffusionPipeline, adapter_names: list[str]): function load_feature_extractor (line 223) | def load_feature_extractor(pipe): function parse_params (line 247) | def parse_params(p: processing.StableDiffusionProcessing, adapters: list... function apply (line 291) | def apply(pipe, p: processing.StableDiffusionProcessing, adapter_names=[... FILE: modules/json_helpers.py function readfile (line 15) | def readfile(filename: str, silent: bool = False, lock: bool = False, *,... function readfile (line 17) | def readfile(filename: str, silent: bool = False, lock: bool = False, *,... function readfile (line 19) | def readfile(filename: str, silent: bool = False, lock: bool = False) ->... function readfile (line 20) | def readfile(filename: str, silent: bool = False, lock: bool = False, *,... function writefile (line 77) | def writefile(data, filename, mode='w', silent=False, atomic=False): FILE: modules/lama.py function prepare_img_and_mask (line 15) | def prepare_img_and_mask(image, mask, device, pad_out_to_modulo=8, scale... function download_model (line 67) | def download_model(): class SimpleLama (line 81) | class SimpleLama: method __init__ (line 82) | def __init__(self): method __call__ (line 89) | def __call__(self, image: Image.Image, mask: Image.Image): FILE: modules/linfusion/__init__.py function detect (line 9) | def detect(pipeline): function apply (line 17) | def apply(pipeline, pretrained: bool = True): function unapply (line 39) | def unapply(pipeline): FILE: modules/linfusion/attention.py function get_none_linear_projection (line 6) | def get_none_linear_projection(query_dim, mid_dim=None): class GeneralizedLinearAttention (line 21) | class GeneralizedLinearAttention(Attention): method __init__ (line 22) | def __init__(self, *args, projection_mid_dim=None, **kwargs): method from_attention_instance (line 35) | def from_attention_instance(self, attention_instance, projection_mid_d... method add_non_linear_model (line 42) | def add_non_linear_model(self, mid_dim=None, **kwargs): method forward (line 47) | def forward( # pylint: disable=unused-argument FILE: modules/linfusion/linfusion.py function replace_submodule (line 16) | def replace_submodule(model, module_name, new_submodule): class LinFusion (line 22) | class LinFusion(ModelMixin, ConfigMixin): method __init__ (line 23) | def __init__(self, modules_list, *args, **kwargs) -> None: method get_default_config (line 43) | def get_default_config( method construct_for (line 73) | def construct_for( method mount_to (line 109) | def mount_to(self, pipeline=None, unet=None) -> None: FILE: modules/loader.py function obj2sctype (line 23) | def obj2sctype(obj): function dummy_npwarn_decorator_factory (line 29) | def dummy_npwarn_decorator_factory(): class _tqdm_cls (line 172) | class _tqdm_cls(): method __call__ (line 173) | def __call__(self, *args, **kwargs): class _tqdm_old (line 177) | class _tqdm_old(tqdm_lib.tqdm): method __init__ (line 178) | def __init__(self, *args, **kwargs): function get_packages (line 190) | def get_packages(): function deprecate_warn (line 223) | def deprecate_warn(*args, **kwargs): class VersionString (line 232) | class VersionString(str): # support both string and tuple for version check method __ge__ (line 233) | def __ge__(self, version): FILE: modules/localization.py function list_localizations (line 8) | def list_localizations(dirname): # pylint: disable=unused-argument function localization_js (line 26) | def localization_js(current_localization_name): FILE: modules/lora/extra_networks_lora.py function get_stepwise (line 14) | def get_stepwise(param, step, steps): # from https://github.com/cheald/s... function prompt (line 39) | def prompt(p): function infotext (line 72) | def infotext(p): function to_float (line 86) | def to_float(value): function parse (line 93) | def parse(p, params_list, step=0): function unload_diffusers (line 152) | def unload_diffusers(): class ExtraNetworkLora (line 165) | class ExtraNetworkLora(extra_networks.ExtraNetwork): method __init__ (line 167) | def __init__(self): method signature (line 173) | def signature(self, names: List[str], te_multipliers: List, unet_multi... method changed (line 176) | def changed(self, requested: List[str], include: List[str] = None, exc... method activate (line 201) | def activate(self, p, params_list, step=0, include=[], exclude=[]): method deactivate (line 250) | def deactivate(self, p, force=False): FILE: modules/lora/lora_apply.py function network_backup_weights (line 15) | def network_backup_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear,... function network_calc_weights (line 79) | def network_calc_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, t... function network_add_weights (line 150) | def network_add_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, to... function network_apply_direct (line 242) | def network_apply_direct(self: Union[torch.nn.Conv2d, torch.nn.Linear, t... function network_apply_weights (line 269) | def network_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, ... FILE: modules/lora/lora_convert.py function make_unet_conversion_map (line 26) | def make_unet_conversion_map() -> Dict[str, str]: class KeyConvert (line 108) | class KeyConvert: method __init__ (line 109) | def __init__(self): method __call__ (line 119) | def __call__(self, key): function _convert_to_ai_toolkit (line 145) | def _convert_to_ai_toolkit(sds_sd, ait_sd, sds_key, ait_key): function _convert_to_ai_toolkit_cat (line 165) | def _convert_to_ai_toolkit_cat(sds_sd, ait_sd, sds_key, ait_keys, dims=N... function _convert_text_encoder_lora_key (line 227) | def _convert_text_encoder_lora_key(key, lora_name): function _convert_kohya_flux_lora_to_diffusers (line 253) | def _convert_kohya_flux_lora_to_diffusers(state_dict): function _convert_kohya_sd3_lora_to_diffusers (line 359) | def _convert_kohya_sd3_lora_to_diffusers(state_dict): function assign_network_names_to_compvis_modules (line 478) | def assign_network_names_to_compvis_modules(sd_model): FILE: modules/lora/lora_diffusers.py function load_per_module (line 14) | def load_per_module(sd_model: diffusers.DiffusionPipeline, filename: str... function load_diffusers (line 53) | def load_diffusers(name: str, network_on_disk: network.NetworkOnDisk, lo... FILE: modules/lora/lora_extract.py class SVDHandler (line 14) | class SVDHandler: method __init__ (line 15) | def __init__(self, maxrank=0, rank_ratio=1): method decompose (line 28) | def decompose(self, weight, backupweight): method findrank (line 45) | def findrank(self): method makeweights (line 58) | def makeweights(self): function loaded_lora (line 72) | def loaded_lora(): function loaded_lora_str (line 85) | def loaded_lora_str(): function make_meta (line 89) | def make_meta(fn, maxrank, rank_ratio): function make_lora (line 118) | def make_lora(fn, maxrank, auto_rank, rank_ratio, modules, overwrite): function create_ui (line 247) | def create_ui(): FILE: modules/lora/lora_load.py function lora_dump (line 21) | def lora_dump(lora, dct): function load_safetensors (line 42) | def load_safetensors(name, network_on_disk: network.NetworkOnDisk) -> Un... function maybe_recompile_model (line 139) | def maybe_recompile_model(names, te_multipliers): function list_available_networks (line 174) | def list_available_networks(): function network_download (line 209) | def network_download(name): function gather_networks (line 222) | def gather_networks(names): function network_load (line 233) | def network_load(names, te_multipliers=None, unet_multipliers=None, dyn_... FILE: modules/lora/lora_nunchaku.py function load_nunchaku (line 9) | def load_nunchaku(names, strengths): FILE: modules/lora/lora_overrides.py function get_method (line 42) | def get_method(shorthash=''): function disable_fuse (line 57) | def disable_fuse(): FILE: modules/lora/lora_timers.py class Timer (line 1) | class Timer(): method total (line 13) | def total(self): method summary (line 17) | def summary(self): method clear (line 24) | def clear(self, complete: bool = False): method add (line 34) | def add(self, name, t): method __str__ (line 37) | def __str__(self): FILE: modules/lora/lyco_helpers.py function make_weight_cp (line 4) | def make_weight_cp(t, wa, wb): function rebuild_conventional (line 9) | def rebuild_conventional(up, down, shape, dyn_dim=None): function rebuild_cp_decomposition (line 18) | def rebuild_cp_decomposition(up, down, mid): function factorization (line 25) | def factorization(dimension: int, factor:int=-1) -> tuple[int, int]: FILE: modules/lora/network.py class SdVersion (line 12) | class SdVersion(enum.Enum): class NetworkOnDisk (line 24) | class NetworkOnDisk: method __init__ (line 25) | def __init__(self, name, filename): method __str__ (line 48) | def __str__(self): method detect_version (line 51) | def detect_version(self): method set_hash (line 99) | def set_hash(self, v): method read_hash (line 103) | def read_hash(self): method get_info (line 107) | def get_info(self): method get_desc (line 117) | def get_desc(self): method get_alias (line 127) | def get_alias(self): class Network (line 131) | class Network: # LoraModule method __init__ (line 132) | def __init__(self, name, network_on_disk: NetworkOnDisk): class ModuleType (line 146) | class ModuleType: method create_module (line 147) | def create_module(self, net: Network, weights: NetworkWeights) -> Unio... class NetworkModule (line 151) | class NetworkModule: method __init__ (line 152) | def __init__(self, net: Network, weights: NetworkWeights): method multiplier (line 169) | def multiplier(self): method calc_scale (line 182) | def calc_scale(self): method apply_weight_decompose (line 189) | def apply_weight_decompose(self, updown, orig_weight): method finalize_updown (line 210) | def finalize_updown(self, updown, orig_weight, output_shape, ex_bias=N... method calc_updown (line 225) | def calc_updown(self, target): method forward (line 228) | def forward(self, x, y): FILE: modules/lora/network_full.py class ModuleTypeFull (line 4) | class ModuleTypeFull(network.ModuleType): method create_module (line 5) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleFull (line 11) | class NetworkModuleFull(network.NetworkModule): # pylint: disable=abstra... method __init__ (line 12) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 18) | def calc_updown(self, target): FILE: modules/lora/network_glora.py class ModuleTypeGLora (line 4) | class ModuleTypeGLora(network.ModuleType): method create_module (line 5) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleGLora (line 11) | class NetworkModuleGLora(network.NetworkModule): # pylint: disable=abstr... method __init__ (line 12) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 23) | def calc_updown(self, target): # pylint: disable=arguments-differ FILE: modules/lora/network_hada.py class ModuleTypeHada (line 5) | class ModuleTypeHada(network.ModuleType): method create_module (line 6) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleHada (line 12) | class NetworkModuleHada(network.NetworkModule): # pylint: disable=abstra... method __init__ (line 13) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 25) | def calc_updown(self, target): FILE: modules/lora/network_ia3.py class ModuleTypeIa3 (line 3) | class ModuleTypeIa3(network.ModuleType): method create_module (line 4) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleIa3 (line 10) | class NetworkModuleIa3(network.NetworkModule): # pylint: disable=abstrac... method __init__ (line 11) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 16) | def calc_updown(self, target): FILE: modules/lora/network_lokr.py class ModuleTypeLokr (line 6) | class ModuleTypeLokr(network.ModuleType): method create_module (line 7) | def create_module(self, net: network.Network, weights: network.Network... function make_kron (line 15) | def make_kron(orig_shape, w1, w2): class NetworkModuleLokr (line 22) | class NetworkModuleLokr(network.NetworkModule): # pylint: disable=abstra... method __init__ (line 23) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 35) | def calc_updown(self, target): FILE: modules/lora/network_lora.py class ModuleTypeLora (line 8) | class ModuleTypeLora(network.ModuleType): method create_module (line 9) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleLora (line 15) | class NetworkModuleLora(network.NetworkModule): method __init__ (line 17) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method create_module (line 24) | def create_module(self, weights, key, none_ok=False): method calc_updown (line 55) | def calc_updown(self, target): # pylint: disable=W0237 method forward (line 72) | def forward(self, x, y): FILE: modules/lora/network_norm.py class ModuleTypeNorm (line 4) | class ModuleTypeNorm(network.ModuleType): method create_module (line 5) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleNorm (line 11) | class NetworkModuleNorm(network.NetworkModule): # pylint: disable=abstra... method __init__ (line 12) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 17) | def calc_updown(self, target): FILE: modules/lora/network_oft.py class ModuleTypeOFT (line 7) | class ModuleTypeOFT(network.ModuleType): method create_module (line 8) | def create_module(self, net: network.Network, weights: network.Network... class NetworkModuleOFT (line 16) | class NetworkModuleOFT(network.NetworkModule): # pylint: disable=abstrac... method __init__ (line 17) | def __init__(self, net: network.Network, weights: network.NetworkWeig... method calc_updown (line 55) | def calc_updown(self, target): FILE: modules/lora/networks.py function network_activate (line 14) | def network_activate(include=[], exclude=[]): function network_deactivate (line 80) | def network_deactivate(include=[], exclude=[]): FILE: modules/ltx/ltx_process.py function run_ltx (line 20) | def run_ltx(task_id, FILE: modules/ltx/ltx_ui.py function create_ui (line 11) | def create_ui(prompt, negative, styles, overrides, init_image, init_stre... FILE: modules/ltx/ltx_util.py function get_bucket (line 10) | def get_bucket(size: int): function get_frames (line 16) | def get_frames(frames: int): function load_model (line 20) | def load_model(engine: str, model: str): function load_upsample (line 41) | def load_upsample(upsample_pipe, upsample_repo_id): function get_conditions (line 57) | def get_conditions(width, height, condition_strength, condition_images, ... function get_prompts (line 98) | def get_prompts(prompt, negative, styles): function get_generator (line 106) | def get_generator(seed): function vae_decode (line 114) | def vae_decode(latents, decode_timestep, seed): FILE: modules/masking.py function get_crop_region (line 19) | def get_crop_region(mask, pad=0): function expand_crop_region (line 61) | def expand_crop_region(crop_region, processing_width, processing_height,... function fill (line 106) | def fill(image, mask): function init_model (line 176) | def init_model(selected_model: str): function run_segment (line 211) | def run_segment(input_image: gr.Image, input_mask: np.ndarray): function run_rembg (line 260) | def run_rembg(input_image: Image, input_mask: np.ndarray): function get_mask (line 308) | def get_mask(input_image: gr.Image, input_mask: gr.Image): function outpaint (line 355) | def outpaint(input_image: Image.Image, outpaint_type: str = 'Edge'): function run_mask (line 381) | def run_mask(input_image: Image.Image, input_mask: Image.Image = None, r... function run_lama (line 484) | def run_lama(input_image: gr.Image, input_mask: gr.Image = None): function run_mask_live (line 505) | def run_mask_live(input_image: gr.Image): function create_segment_ui (line 516) | def create_segment_ui(): function bind_controls (line 564) | def bind_controls(image_controls: List[gr.Image], preview_image: gr.Imag... function process_kanvas (line 573) | def process_kanvas(kanvas_data): function process_kanvas_lama (line 583) | def process_kanvas_lama(kanvas_data): function bind_kanvas (line 593) | def bind_kanvas(input_image: Image.Image, output_image: gr.Image): FILE: modules/memmon.py class MemUsageMonitor (line 5) | class MemUsageMonitor(): method __init__ (line 11) | def __init__(self, name, device): method cuda_mem_get_info (line 24) | def cuda_mem_get_info(self): # legacy for extensions only method reset (line 29) | def reset(self): method read (line 41) | def read(self): method summary (line 57) | def summary(self): FILE: modules/memstats.py function gb (line 18) | def gb(val: float): function get_docker_limit (line 22) | def get_docker_limit(): function get_runpod_limit (line 36) | def get_runpod_limit(): function ram_stats (line 46) | def ram_stats(): function gpu_stats (line 87) | def gpu_stats(): function memory_stats (line 111) | def memory_stats(): function reset_stats (line 122) | def reset_stats(): class Object (line 129) | class Object: method __init__ (line 132) | def __init__(self, name, obj): method __str__ (line 144) | def __str__(self): function get_objects (line 148) | def get_objects(gcl={}, threshold:int=0): FILE: modules/merging/convert_sdxl.py function convert_unet_state_dict (line 88) | def convert_unet_state_dict(unet_state_dict): function reshape_weight_for_sd (line 156) | def reshape_weight_for_sd(w): function convert_vae_state_dict (line 164) | def convert_vae_state_dict(vae_state_dict): function convert_openclip_text_enc_state_dict (line 203) | def convert_openclip_text_enc_state_dict(text_enc_dict): function convert_openai_text_enc_state_dict (line 250) | def convert_openai_text_enc_state_dict(text_enc_dict): function calculate_model_hash (line 254) | def calculate_model_hash(state_dict): function convert (line 263) | def convert(model_path:str, checkpoint_path:str, metadata:dict={}): FILE: modules/merging/merge.py function fix_clip (line 41) | def fix_clip(model: Dict) -> Dict: function prune_sd_model (line 52) | def prune_sd_model(model: Dict, keyset: Set) -> Dict: function restore_sd_model (line 64) | def restore_sd_model(original_model: Dict, merged_model: Dict) -> Dict: function log_vram (line 71) | def log_vram(txt=""): function load_thetas (line 75) | def load_thetas( function merge_models (line 97) | def merge_models( function un_prune_model (line 138) | def un_prune_model( function simple_merge (line 181) | def simple_merge( function rebasin_merge (line 228) | def rebasin_merge( function simple_merge_key (line 299) | def simple_merge_key(progress, task, key, thetas, *args, **kwargs): function merge_key (line 306) | def merge_key( # pylint: disable=inconsistent-return-statements function clip_weights (line 352) | def clip_weights(thetas, merged): function clip_weights_key (line 359) | def clip_weights_key(thetas, merged_weights, key): function merge_key_context (line 368) | def merge_key_context(*args, **kwargs): function get_merge_method_args (line 377) | def get_merge_method_args( function save_model (line 395) | def save_model(model, output_file, file_format) -> None: FILE: modules/merging/merge_PermSpec.py function sdunet_permutation_spec (line 2) | def sdunet_permutation_spec() -> PermutationSpec: FILE: modules/merging/merge_PermSpec_SDXL.py function sdxl_permutation_spec (line 3) | def sdxl_permutation_spec() -> PermutationSpec: FILE: modules/merging/merge_methods.py function weighted_sum (line 26) | def weighted_sum(a: Tensor, b: Tensor, alpha: float, **kwargs) -> Tensor... function weighted_subtraction (line 35) | def weighted_subtraction(a: Tensor, b: Tensor, alpha: float, beta: float... function tensor_sum (line 48) | def tensor_sum(a: Tensor, b: Tensor, alpha: float, beta: float, **kwargs... function add_difference (line 68) | def add_difference(a: Tensor, b: Tensor, c: Tensor, alpha: float, **kwar... function sum_twice (line 75) | def sum_twice(a: Tensor, b: Tensor, c: Tensor, alpha: float, beta: float... function triple_sum (line 84) | def triple_sum(a: Tensor, b: Tensor, c: Tensor, alpha: float, beta: floa... function euclidean_add_difference (line 93) | def euclidean_add_difference(a: Tensor, b: Tensor, c: Tensor, alpha: flo... function multiply_difference (line 114) | def multiply_difference(a: Tensor, b: Tensor, c: Tensor, alpha: float, b... function top_k_tensor_sum (line 124) | def top_k_tensor_sum(a: Tensor, b: Tensor, alpha: float, beta: float, **... function kth_abs_value (line 147) | def kth_abs_value(a: Tensor, k: int) -> Tensor: function ratio_to_region (line 154) | def ratio_to_region(width: float, offset: float, n: int) -> Tuple[int, i... function similarity_add_difference (line 176) | def similarity_add_difference(a: Tensor, b: Tensor, c: Tensor, alpha: fl... function distribution_crossover (line 189) | def distribution_crossover(a: Tensor, b: Tensor, c: Tensor, alpha: float... function ties_add_difference (line 221) | def ties_add_difference(a: Tensor, b: Tensor, c: Tensor, alpha: float, b... function filter_top_k (line 243) | def filter_top_k(a: Tensor, k: float): FILE: modules/merging/merge_rebasin.py class PermutationSpec (line 20) | class PermutationSpec(NamedTuple): function permutation_spec_from_axes_to_perm (line 25) | def permutation_spec_from_axes_to_perm(axes_to_perm: dict) -> Permutatio... function get_permuted_param (line 34) | def get_permuted_param(ps: PermutationSpec, perm, k: str, params, except... function apply_permutation (line 49) | def apply_permutation(ps: PermutationSpec, perm, params): function update_model_a (line 54) | def update_model_a(ps: PermutationSpec, perm, model_a, new_alpha): function inner_matching (line 66) | def inner_matching( function weight_matching (line 126) | def weight_matching( FILE: modules/merging/merge_utils.py function interpolate (line 23) | def interpolate(values, interp_lambda): class WeightClass (line 30) | class WeightClass: method __init__ (line 31) | def __init__(self, method __call__ (line 64) | def __call__(self, key, it=0): method step_weights_and_bases (line 98) | def step_weights_and_bases(self, ratio): method set_it (line 110) | def set_it(self, it): FILE: modules/merging/modules_sdxl.py class Recipe (line 14) | class Recipe: method __repr__ (line 37) | def __repr__(self): class Test (line 41) | class Test: function msg (line 57) | def msg(text, err:bool=False): function load_base (line 67) | def load_base(override:str=None): function load_unet (line 81) | def load_unet(pipe: diffusers.StableDiffusionXLPipeline, override:str=No... function load_scheduler (line 101) | def load_scheduler(pipe: diffusers.StableDiffusionXLPipeline, override:s... function load_vae (line 116) | def load_vae(pipe: diffusers.StableDiffusionXLPipeline, override:str=None): function load_te1 (line 137) | def load_te1(pipe: diffusers.StableDiffusionXLPipeline, override:str=None): function load_te2 (line 158) | def load_te2(pipe: diffusers.StableDiffusionXLPipeline, override:str=None): function load_lora (line 179) | def load_lora(pipe: diffusers.StableDiffusionXLPipeline, override: dict=... function test_model (line 205) | def test_model(pipe: diffusers.StableDiffusionXLPipeline, fn: str, **kwa... function get_thumbnail (line 228) | def get_thumbnail(): function get_metadata (line 240) | def get_metadata(): function save_model (line 268) | def save_model(pipe: diffusers.StableDiffusionXLPipeline): function merge (line 309) | def merge(): FILE: modules/migrate.py function migrate_data (line 21) | def migrate_data(): FILE: modules/mit_nunchaku.py function check (line 11) | def check(): function install_nunchaku (line 31) | def install_nunchaku(): FILE: modules/model_quant.py function get_quant_type (line 21) | def get_quant_type(args): function get_quant (line 27) | def get_quant(name): function dont_quant (line 43) | def dont_quant(): function create_bnb_config (line 53) | def create_bnb_config(kwargs = None, allow: bool = True, module: str = '... function create_ao_config (line 76) | def create_ao_config(kwargs = None, allow: bool = True, module: str = 'M... function create_quanto_config (line 95) | def create_quanto_config(kwargs = None, allow: bool = True, module: str ... function create_trt_config (line 117) | def create_trt_config(kwargs = None, allow: bool = True, module: str = '... function get_sdnq_devices (line 145) | def get_sdnq_devices(mode="pre"): function create_sdnq_config (line 165) | def create_sdnq_config(kwargs = None, allow: bool = True, module: str = ... function check_quant (line 249) | def check_quant(module: str = ''): function check_nunchaku (line 256) | def check_nunchaku(module: str = ''): function create_config (line 267) | def create_config(kwargs = None, allow: bool = True, module: str = 'Mode... function load_torchao (line 300) | def load_torchao(msg='', silent=False): function load_bnb (line 325) | def load_bnb(msg='', silent=False): function load_quanto (line 353) | def load_quanto(msg='', silent=False): function load_trt (line 382) | def load_trt(msg='', silent=False): function upcast_non_layerwise_modules (line 406) | def upcast_non_layerwise_modules(model, dtype): # pylint: disable=unused... function load_fp8_model_layerwise (line 423) | def load_fp8_model_layerwise(checkpoint_info, load_model_func, diffusers... function apply_layerwise (line 453) | def apply_layerwise(sd_model, quiet:bool=False): function sdnq_quantize_model (line 499) | def sdnq_quantize_model(model, op=None, sd_model=None, do_gc: bool = Tru... function sdnq_quantize_weights (line 606) | def sdnq_quantize_weights(sd_model): function optimum_quanto_model (line 633) | def optimum_quanto_model(model, op=None, sd_model=None, weights=None, ac... function optimum_quanto_weights (line 681) | def optimum_quanto_weights(sd_model): function torchao_quantization (line 740) | def torchao_quantization(sd_model): function get_dit_args (line 765) | def get_dit_args(load_config:dict=None, module:str=None, device_map:bool... function do_post_load_quant (line 794) | def do_post_load_quant(sd_model, allow=True): FILE: modules/model_te.py function load_t5 (line 14) | def load_t5(name=None, cache_dir=None): function set_t5 (line 112) | def set_t5(pipe, module, t5=None, cache_dir=None): function load_vit_l (line 142) | def load_vit_l(): function load_vit_g (line 153) | def load_vit_g(): function set_clip (line 164) | def set_clip(pipe): function refresh_te_list (line 200) | def refresh_te_list(): FILE: modules/model_tools.py function remove_entries_after_depth (line 8) | def remove_entries_after_depth(d, depth, current_depth=0): function list_compact (line 16) | def list_compact(flat_list): function list_to_dict (line 26) | def list_to_dict(flat_list): function get_safetensor_keys (line 40) | def get_safetensor_keys(filename): function get_modules (line 50) | def get_modules(model: callable): function load_modules (line 58) | def load_modules(repo_id: str, params: dict): FILE: modules/modeldata.py function get_model_type (line 7) | def get_model_type(pipe): class ModelData (line 120) | class ModelData: method __init__ (line 121) | def __init__(self): method get_sd_model (line 129) | def get_sd_model(self): method set_sd_model (line 147) | def set_sd_model(self, v): method get_sd_refiner (line 151) | def get_sd_refiner(self): method set_sd_refiner (line 164) | def set_sd_refiner(self, v): class Shared (line 170) | class Shared(sys.modules[__name__].__class__): method sd_loaded (line 172) | def sd_loaded(self): method sd_model (line 177) | def sd_model(self): method sd_model (line 185) | def sd_model(self, value): method sd_refiner (line 190) | def sd_refiner(self): method sd_refiner (line 195) | def sd_refiner(self, value): method sd_model_type (line 200) | def sd_model_type(self): method sd_refiner_type (line 212) | def sd_refiner_type(self): FILE: modules/modelloader.py function hf_login (line 22) | def hf_login(token=None): function download_diffusers_model (line 58) | def download_diffusers_model(hub_id: str, cache_dir: str = None, downloa... function load_diffusers_models (line 116) | def load_diffusers_models(clear=True): function find_diffuser (line 171) | def find_diffuser(name: str, full=False): function get_reference_opts (line 196) | def get_reference_opts(name: str, quiet=False): function load_reference (line 222) | def load_reference(name: str, variant: str = None, revision: str = None,... function load_civitai (line 253) | def load_civitai(model: str, url: str): function download_url_to_file (line 275) | def download_url_to_file(url: str, dst: str): function load_file_from_url (line 322) | def load_file_from_url(url: str, *, model_dir: str, progress: bool = Tru... function load_models (line 340) | def load_models(model_path: str, model_url: str = None, command_path: st... function friendly_name (line 366) | def friendly_name(file: str): function friendly_fullname (line 374) | def friendly_fullname(file: str): function cleanup_models (line 381) | def cleanup_models(): function move_files (line 410) | def move_files(src_path: str, dest_path: str, ext_filter: str = None): function load_upscalers (line 433) | def load_upscalers(): FILE: modules/models_hf.py function hf_init (line 9) | def hf_init(): function hf_check_cache (line 45) | def hf_check_cache(): function hf_search (line 56) | def hf_search(keyword): function hf_select (line 69) | def hf_select(evt: gr.SelectData, df): function hf_download_model (line 75) | def hf_download_model(hub_id: str, token, variant, revision, mirror, cus... function hf_update_token (line 84) | def hf_update_token(token): FILE: modules/modelstats.py function walk (line 7) | def walk(folder: str): function stat (line 15) | def stat(fn: str): class Module (line 31) | class Module(): method __init__ (line 41) | def __init__(self, name, module): method __repr__ (line 55) | def __repr__(self): class Model (line 64) | class Model(): method __init__ (line 76) | def __init__(self, name): method __repr__ (line 89) | def __repr__(self): function analyze (line 93) | def analyze(): FILE: modules/modular.py function is_compatible (line 20) | def is_compatible(diffusion_pipeline: diffusers.DiffusionPipeline) -> bool: function is_guider (line 29) | def is_guider(diffusion_pipeline: diffusers.DiffusionPipeline) -> bool: function convert_to_modular (line 34) | def convert_to_modular(diffusion_pipeline: diffusers.DiffusionPipeline) ... function restore_standard (line 65) | def restore_standard(modular_pipe): FILE: modules/modular_guiders.py function set_guider (line 27) | def set_guider(p: processing.StableDiffusionProcessing): FILE: modules/olive_script.py class ENVStore (line 8) | class ENVStore: method __getattr__ (line 20) | def __getattr__(self, name: str): method __setattr__ (line 28) | def __setattr__(self, name: str, value) -> None: method __delattr__ (line 35) | def __delattr__(self, name: str) -> None: class OliveOptimizerConfig (line 44) | class OliveOptimizerConfig(ENVStore): function get_variant (line 63) | def get_variant(): function get_loader_arguments (line 79) | def get_loader_arguments(no_variant: bool = False): function from_pretrained (line 92) | def from_pretrained(cls: Type[T], pretrained_model_name_or_path: os.Path... class RandomDataLoader (line 107) | class RandomDataLoader: method __init__ (line 108) | def __init__(self, create_inputs_func, batchsize, torch_dtype): method __getitem__ (line 113) | def __getitem__(self, idx): function text_encoder_inputs (line 122) | def text_encoder_inputs(batchsize, torch_dtype): # pylint: disable=unuse... function text_encoder_load (line 130) | def text_encoder_load(model_name): function text_encoder_conversion_inputs (line 135) | def text_encoder_conversion_inputs(model): # pylint: disable=unused-argu... function text_encoder_data_loader (line 139) | def text_encoder_data_loader(data_dir, batchsize, *_, **__): # pylint: d... function text_encoder_2_inputs (line 148) | def text_encoder_2_inputs(batchsize, torch_dtype): # pylint: disable=unu... function text_encoder_2_load (line 155) | def text_encoder_2_load(model_name): function text_encoder_2_conversion_inputs (line 160) | def text_encoder_2_conversion_inputs(model): # pylint: disable=unused-ar... function text_encoder_2_data_loader (line 164) | def text_encoder_2_data_loader(data_dir, batchsize, *_, **__): # pylint:... function unet_inputs (line 173) | def unet_inputs(batchsize, torch_dtype, is_conversion_inputs=False): # p... function unet_load (line 218) | def unet_load(model_name): function unet_conversion_inputs (line 223) | def unet_conversion_inputs(model): # pylint: disable=unused-argument function unet_data_loader (line 227) | def unet_data_loader(data_dir, batchsize, *_, **__): # pylint: disable=u... function vae_encoder_inputs (line 236) | def vae_encoder_inputs(batchsize, torch_dtype): # pylint: disable=unused... function vae_encoder_load (line 243) | def vae_encoder_load(model_name): function vae_encoder_conversion_inputs (line 260) | def vae_encoder_conversion_inputs(model): # pylint: disable=unused-argument function vae_encoder_data_loader (line 264) | def vae_encoder_data_loader(data_dir, batchsize, *_, **__): # pylint: di... function vae_decoder_inputs (line 273) | def vae_decoder_inputs(batchsize, torch_dtype): # pylint: disable=unused... function vae_decoder_load (line 280) | def vae_decoder_load(model_name): function vae_decoder_conversion_inputs (line 297) | def vae_decoder_conversion_inputs(model): # pylint: disable=unused-argument function vae_decoder_data_loader (line 301) | def vae_decoder_data_loader(data_dir, batchsize, *_, **__): # pylint: di... FILE: modules/onnx_impl/__init__.py class DynamicSessionOptions (line 18) | class DynamicSessionOptions(ort.SessionOptions): method __init__ (line 21) | def __init__(self): method from_sess_options (line 26) | def from_sess_options(cls, sess_options: ort.SessionOptions): method enable_static_dims (line 31) | def enable_static_dims(self, config: Dict): method copy (line 46) | def copy(self): class TorchCompatibleModule (line 53) | class TorchCompatibleModule: method named_modules (line 57) | def named_modules(self): # dummy method to (line 60) | def to(self, *_, **__): method type (line 63) | def type(self, *_, **__): class TemporalModule (line 67) | class TemporalModule(TorchCompatibleModule): method __init__ (line 75) | def __init__(self, provider: Any, path: str, sess_options: ort.Session... method to (line 80) | def to(self, *args, **kwargs): class OnnxRuntimeModel (line 91) | class OnnxRuntimeModel(TorchCompatibleModule, diffusers.OnnxRuntimeModel): method to (line 94) | def to(self, *args, **kwargs): class VAEConfig (line 104) | class VAEConfig: method __init__ (line 108) | def __init__(self, config: Dict): method __getattr__ (line 111) | def __getattr__(self, key): method get (line 114) | def get(self, key, default): class VAE (line 118) | class VAE(TorchCompatibleModule): method __init__ (line 121) | def __init__(self, pipeline: Any): method config (line 125) | def config(self): method device (line 129) | def device(self): method encode (line 132) | def encode(self, sample: torch.Tensor, *_, **__): method decode (line 140) | def decode(self, latent_sample: torch.Tensor, *_, **__): method to (line 148) | def to(self, *args, **kwargs): function check_parameters_changed (line 154) | def check_parameters_changed(p, refiner_enabled: bool): function preprocess_pipeline (line 178) | def preprocess_pipeline(p): function ORTPipelinePart_to (line 195) | def ORTPipelinePart_to(self, *args, **kwargs): function initialize_onnx (line 200) | def initialize_onnx(): function initialize_onnx_pipelines (line 220) | def initialize_onnx_pipelines(): function install_olive (line 248) | def install_olive(): FILE: modules/onnx_impl/execution_providers.py class ExecutionProvider (line 8) | class ExecutionProvider(str, Enum): function get_default_execution_provider (line 43) | def get_default_execution_provider() -> ExecutionProvider: function get_execution_provider_options (line 57) | def get_execution_provider_options(): function get_provider (line 93) | def get_provider() -> Tuple: function install_execution_provider (line 98) | def install_execution_provider(ep: ExecutionProvider): FILE: modules/onnx_impl/pipelines/__init__.py class PipelineBase (line 28) | class PipelineBase(TorchCompatibleModule, diffusers.DiffusionPipeline, m... method __init__ (line 34) | def __init__(self): # pylint: disable=super-init-not-called method to (line 37) | def to(self, *args, **kwargs): method components (line 68) | def components(self): method from_pretrained (line 72) | def from_pretrained(cls, pretrained_model_name_or_path, **_): # pylint... method from_single_file (line 79) | def from_single_file(cls, pretrained_model_name_or_path, **_): method from_ckpt (line 86) | def from_ckpt(cls, pretrained_model_name_or_path, **_): class CallablePipelineBase (line 90) | class CallablePipelineBase(PipelineBase): method __init__ (line 93) | def __init__(self): class OnnxRawPipeline (line 98) | class OnnxRawPipeline(PipelineBase): method __init__ (line 111) | def __init__(self, constructor: Type[PipelineBase], path: os.PathLike)... method derive_properties (line 146) | def derive_properties(self, pipeline: diffusers.DiffusionPipeline): method convert (line 153) | def convert(self, submodels: List[str], in_dir: os.PathLike, out_dir: ... method run_olive (line 221) | def run_olive(self, submodels: List[str], in_dir: os.PathLike, out_dir... method preprocess (line 323) | def preprocess(self, p: 'StableDiffusionProcessing'): FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_img2img_pipeline.py class OnnxStableDiffusionImg2ImgPipeline (line 13) | class OnnxStableDiffusionImg2ImgPipeline(diffusers.OnnxStableDiffusionIm... method __init__ (line 19) | def __init__( method __call__ (line 34) | def __call__( FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_inpaint_pipeline.py class OnnxStableDiffusionInpaintPipeline (line 13) | class OnnxStableDiffusionInpaintPipeline(diffusers.OnnxStableDiffusionIn... method __init__ (line 17) | def __init__( method __call__ (line 32) | def __call__( FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_pipeline.py class OnnxStableDiffusionPipeline (line 12) | class OnnxStableDiffusionPipeline(diffusers.OnnxStableDiffusionPipeline,... method __init__ (line 16) | def __init__( method __call__ (line 30) | def __call__( FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_upscale_pipeline.py class OnnxStableDiffusionUpscalePipeline (line 14) | class OnnxStableDiffusionUpscalePipeline(diffusers.OnnxStableDiffusionUp... method __init__ (line 18) | def __init__( method __call__ (line 32) | def __call__( FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_xl_img2img_pipeline.py class OnnxStableDiffusionXLImg2ImgPipeline (line 11) | class OnnxStableDiffusionXLImg2ImgPipeline(CallablePipelineBase, optimum... method __init__ (line 15) | def __init__( method prepare_latents (line 35) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... FILE: modules/onnx_impl/pipelines/onnx_stable_diffusion_xl_pipeline.py class OnnxStableDiffusionXLPipeline (line 8) | class OnnxStableDiffusionXLPipeline(CallablePipelineBase, optimum.onnxru... method __init__ (line 12) | def __init__( method prepare_latents (line 32) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... FILE: modules/onnx_impl/pipelines/utils.py function extract_generator_seed (line 6) | def extract_generator_seed(generator: Union[torch.Generator, List[torch.... function randn_tensor (line 14) | def randn_tensor(shape, dtype: np.dtype, generator: Union[torch.Generato... function prepare_latents (line 22) | def prepare_latents( FILE: modules/onnx_impl/ui.py function get_recursively (line 8) | def get_recursively(d: Union[Dict, List], *args): function create_ui (line 14) | def create_ui(): FILE: modules/onnx_impl/utils.py function extract_device (line 9) | def extract_device(args: List, kwargs: Dict): function move_inference_session (line 20) | def move_inference_session(session, device: torch.device): # session: or... function check_diffusers_cache (line 40) | def check_diffusers_cache(path: os.PathLike): function check_pipeline_sdxl (line 45) | def check_pipeline_sdxl(cls: Type[diffusers.DiffusionPipeline]) -> bool: function check_cache_onnx (line 49) | def check_cache_onnx(path: os.PathLike) -> bool: function load_init_dict (line 69) | def load_init_dict(cls: Type[diffusers.DiffusionPipeline], path: os.Path... function load_submodel (line 88) | def load_submodel(path: os.PathLike, is_sdxl: bool, submodel_name: str, ... function load_submodels (line 110) | def load_submodels(path: os.PathLike, is_sdxl: bool, init_dict: Dict[str... function load_pipeline (line 125) | def load_pipeline(cls: Type[diffusers.DiffusionPipeline], path: os.PathL... function patch_kwargs (line 132) | def patch_kwargs(cls: Type[diffusers.DiffusionPipeline], kwargs: Dict) -... function get_base_constructor (line 143) | def get_base_constructor(cls: Type[diffusers.DiffusionPipeline], is_refi... function get_io_config (line 153) | def get_io_config(submodel: str, is_sdxl: bool): FILE: modules/options.py function options_section (line 14) | def options_section(section_identifier: tuple[str, str], options_dict: d... class OptionInfo (line 23) | class OptionInfo: method __init__ (line 24) | def __init__( method needs_reload_ui (line 57) | def needs_reload_ui(self): method link (line 60) | def link(self, label, uri): method js (line 64) | def js(self, label, js_func): method info (line 68) | def info(self, info): method html (line 72) | def html(self, info): method needs_restart (line 76) | def needs_restart(self): method validate (line 80) | def validate(self, opt, value): method __str__ (line 115) | def __str__(self) -> str: class OptionsCategory (line 124) | class OptionsCategory: class OptionsCategories (line 128) | class OptionsCategories: method __init__ (line 129) | def __init__(self): method register_category (line 132) | def register_category(self, category_id, label): FILE: modules/options_handler.py class Options (line 21) | class Options(): method __init__ (line 27) | def __init__(self, options_templates: dict[str, OptionInfo | LegacyOpt... method __setattr__ (line 37) | def __setattr__(self, key, value): # pylint: disable=inconsistent-retu... method get (line 53) | def get(self, item): method __getattr__ (line 60) | def __getattr__(self, item): method set (line 67) | def set(self, key, value): method get_default (line 93) | def get_default(self, key): method list (line 98) | def list(self): method save_atomic (line 103) | def save_atomic(self, filename=None, silent=False): method save (line 151) | def save(self, filename=None, silent=False): method same_type (line 154) | def same_type(self, x, y): method load (line 161) | def load(self, filename=None): method onchange (line 186) | def onchange(self, key, func: Callable, call=True): method dumpjson (line 192) | def dumpjson(self): method add_option (line 202) | def add_option(self, key, info): method reorder (line 205) | def reorder(self): method cast_value (line 214) | def cast_value(self, key, value): FILE: modules/pag/__init__.py function apply (line 11) | def apply(p: processing.StableDiffusionProcessing): # pylint: disable=ar... function unapply (line 50) | def unapply(): FILE: modules/pag/pipe_sd.py class PAGIdentitySelfAttnProcessor (line 47) | class PAGIdentitySelfAttnProcessor: method __init__ (line 52) | def __init__(self): method __call__ (line 56) | def __call__( class PAGCFGIdentitySelfAttnProcessor (line 160) | class PAGCFGIdentitySelfAttnProcessor: method __init__ (line 165) | def __init__(self): method __call__ (line 169) | def __call__( function rescale_noise_cfg (line 271) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 285) | def retrieve_timesteps( class StableDiffusionPAGPipeline (line 327) | class StableDiffusionPAGPipeline( method __init__ (line 365) | def __init__( method enable_vae_slicing (line 457) | def enable_vae_slicing(self): method disable_vae_slicing (line 464) | def disable_vae_slicing(self): method enable_vae_tiling (line 471) | def enable_vae_tiling(self): method disable_vae_tiling (line 479) | def disable_vae_tiling(self): method _encode_prompt (line 486) | def _encode_prompt( method encode_prompt (line 518) | def encode_prompt( method encode_image (line 698) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method prepare_ip_adapter_image_embeds (line 722) | def prepare_ip_adapter_image_embeds( method run_safety_checker (line 756) | def run_safety_checker(self, image, device, dtype): method decode_latents (line 770) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 781) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 798) | def check_inputs( method prepare_latents (line 857) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method enable_freeu (line 874) | def enable_freeu(self, s1: float, s2: float, b1: float, b2: float): method disable_freeu (line 893) | def disable_freeu(self): method fuse_qkv_projections (line 898) | def fuse_qkv_projections(self, unet: bool = True, vae: bool = True): method unfuse_qkv_projections (line 926) | def unfuse_qkv_projections(self, unet: bool = True, vae: bool = True): method get_guidance_scale_embedding (line 950) | def get_guidance_scale_embedding(self, w, embedding_dim=512, dtype=tor... method pred_z0 (line 976) | def pred_z0(self, sample, model_output, timestep): method pred_x0 (line 996) | def pred_x0(self, latents, noise_pred, t, generator, device, prompt_em... method guidance_scale (line 1006) | def guidance_scale(self): method guidance_rescale (line 1010) | def guidance_rescale(self): method clip_skip (line 1014) | def clip_skip(self): method do_classifier_free_guidance (line 1021) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 1025) | def cross_attention_kwargs(self): method num_timesteps (line 1029) | def num_timesteps(self): method interrupt (line 1033) | def interrupt(self): method pag_scale (line 1037) | def pag_scale(self): method do_perturbed_attention_guidance (line 1041) | def do_perturbed_attention_guidance(self): method pag_adaptive_scaling (line 1045) | def pag_adaptive_scaling(self): method do_pag_adaptive_scaling (line 1049) | def do_pag_adaptive_scaling(self): method pag_applied_layers_index (line 1053) | def pag_applied_layers_index(self): method __call__ (line 1058) | def __call__( FILE: modules/pag/pipe_sdxl.py class PAGIdentitySelfAttnProcessor (line 67) | class PAGIdentitySelfAttnProcessor: method __init__ (line 72) | def __init__(self): method __call__ (line 76) | def __call__( class PAGCFGIdentitySelfAttnProcessor (line 180) | class PAGCFGIdentitySelfAttnProcessor: method __init__ (line 185) | def __init__(self): method __call__ (line 189) | def __call__( function rescale_noise_cfg (line 302) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 316) | def retrieve_timesteps( class StableDiffusionXLPAGPipeline (line 359) | class StableDiffusionXLPAGPipeline( method __init__ (line 431) | def __init__( method encode_prompt (line 472) | def encode_prompt( method encode_image (line 707) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method prepare_ip_adapter_image_embeds (line 732) | def prepare_ip_adapter_image_embeds( method prepare_extra_step_kwargs (line 784) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 801) | def check_inputs( method prepare_latents (line 898) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 915) | def _get_add_time_ids( method upcast_vae (line 933) | def upcast_vae(self): method get_guidance_scale_embedding (line 952) | def get_guidance_scale_embedding( method pred_z0 (line 982) | def pred_z0(self, sample, model_output, timestep): method pred_x0 (line 1002) | def pred_x0(self, latents, noise_pred, t, generator, device, prompt_em... method guidance_scale (line 1016) | def guidance_scale(self): method guidance_rescale (line 1020) | def guidance_rescale(self): method clip_skip (line 1024) | def clip_skip(self): method do_classifier_free_guidance (line 1031) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 1035) | def cross_attention_kwargs(self): method denoising_end (line 1039) | def denoising_end(self): method num_timesteps (line 1043) | def num_timesteps(self): method interrupt (line 1047) | def interrupt(self): method pag_scale (line 1051) | def pag_scale(self): method do_adversarial_guidance (line 1055) | def do_adversarial_guidance(self): method pag_adaptive_scaling (line 1059) | def pag_adaptive_scaling(self): method do_pag_adaptive_scaling (line 1063) | def do_pag_adaptive_scaling(self): method pag_drop_rate (line 1067) | def pag_drop_rate(self): method pag_applied_layers (line 1071) | def pag_applied_layers(self): method pag_applied_layers_index (line 1075) | def pag_applied_layers_index(self): method __call__ (line 1080) | def __call__( FILE: modules/para_attention.py function apply_first_block_cache (line 7) | def apply_first_block_cache(): FILE: modules/patches.py function patch (line 6) | def patch(key, obj, field, replacement, add_if_not_exists:bool = False): function undo (line 31) | def undo(key, obj, field): function original (line 52) | def original(key, obj, field): function patch_method (line 58) | def patch_method(cls, key:Optional[str]=None): function add_method (line 64) | def add_method(cls, key:Optional[str]=None): FILE: modules/paths.py function create_path (line 53) | def create_path(folder): function resolve_output_path (line 65) | def resolve_output_path(base_path: str, specific_path: str) -> str: function create_paths (line 82) | def create_paths(opts): class Prioritize (line 153) | class Prioritize: method __init__ (line 154) | def __init__(self, name): method __enter__ (line 158) | def __enter__(self): method __exit__ (line 162) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: modules/postprocess/aurasr_arch.py function get_same_padding (line 19) | def get_same_padding(size, kernel, dilation, stride): class AdaptiveConv2DMod (line 23) | class AdaptiveConv2DMod(nn.Module): method __init__ (line 24) | def __init__( method forward (line 56) | def forward( class Attend (line 127) | class Attend(nn.Module): method __init__ (line 128) | def __init__(self, dropout=0.0, flash=False): method flash_attn (line 135) | def flash_attn(self, q, k, v): method forward (line 142) | def forward(self, q, k, v): function exists (line 161) | def exists(x): function default (line 165) | def default(val, d): function cast_tuple (line 171) | def cast_tuple(t, length=1): function identity (line 177) | def identity(t, *args, **kwargs): function is_power_of_two (line 181) | def is_power_of_two(n): function null_iterator (line 185) | def null_iterator(): function Downsample (line 189) | def Downsample(dim, dim_out=None): class RMSNorm (line 196) | class RMSNorm(nn.Module): method __init__ (line 197) | def __init__(self, dim): method forward (line 202) | def forward(self, x): class Block (line 209) | class Block(nn.Module): method __init__ (line 210) | def __init__(self, dim, dim_out, groups=8, num_conv_kernels=0): method forward (line 221) | def forward(self, x, conv_mods_iter: Optional[Iterable] = None): class ResnetBlock (line 230) | class ResnetBlock(nn.Module): method __init__ (line 231) | def __init__( method forward (line 245) | def forward(self, x, conv_mods_iter: Optional[Iterable] = None): class LinearAttention (line 252) | class LinearAttention(nn.Module): method __init__ (line 253) | def __init__(self, dim, heads=4, dim_head=32): method forward (line 264) | def forward(self, x): class Attention (line 286) | class Attention(nn.Module): method __init__ (line 287) | def __init__(self, dim, heads=4, dim_head=32, flash=False): method forward (line 298) | def forward(self, x): function FeedForward (line 314) | def FeedForward(dim, mult=4): class Transformer (line 324) | class Transformer(nn.Module): method __init__ (line 325) | def __init__(self, dim, dim_head=64, heads=8, depth=1, flash_attn=True... method forward (line 341) | def forward(self, x): class LinearTransformer (line 349) | class LinearTransformer(nn.Module): method __init__ (line 350) | def __init__(self, dim, dim_head=64, heads=8, depth=1, ff_mult=4): method forward (line 364) | def forward(self, x): class NearestNeighborhoodUpsample (line 372) | class NearestNeighborhoodUpsample(nn.Module): method __init__ (line 373) | def __init__(self, dim, dim_out=None): method forward (line 378) | def forward(self, x): class EqualLinear (line 388) | class EqualLinear(nn.Module): method __init__ (line 389) | def __init__(self, dim, dim_out, lr_mul=1, bias=True): method forward (line 397) | def forward(self, input): class StyleGanNetwork (line 401) | class StyleGanNetwork(nn.Module): method __init__ (line 402) | def __init__(self, dim_in=128, dim_out=512, depth=8, lr_mul=0.1, dim_t... method forward (line 425) | def forward(self, x, text_latent=None): class UnetUpsampler (line 433) | class UnetUpsampler(torch.nn.Module): method __init__ (line 435) | def __init__( method allowable_rgb_resolutions (line 611) | def allowable_rgb_resolutions(self): method device (line 618) | def device(self): method total_params (line 622) | def total_params(self): method resize_image_to (line 625) | def resize_image_to(self, x, size): method forward (line 628) | def forward( function tile_image (line 710) | def tile_image(image, chunk_size=64): function merge_tiles (line 722) | def merge_tiles(tiles, h_chunks, w_chunks, chunk_size=64): class AuraSR (line 745) | class AuraSR: method __init__ (line 746) | def __init__(self, config: dict[str, Any], device: str = "cuda"): method from_pretrained (line 751) | def from_pretrained(cls, model_id: str = "fal-ai/AuraSR", use_safetens... method upscale_4x (line 803) | def upscale_4x(self, image: Image.Image, max_batch_size=8) -> Image.Im... FILE: modules/postprocess/aurasr_model.py class UpscalerAuraSR (line 8) | class UpscalerAuraSR(Upscaler): method __init__ (line 9) | def __init__(self, dirname): # pylint: disable=super-init-not-called method callback (line 17) | def callback(self, _step: int, _timestep: int, _latents: torch.FloatTe... method do_upscale (line 20) | def do_upscale(self, img: Image.Image, selected_model): FILE: modules/postprocess/codeformer_arch.py function calc_mean_std (line 10) | def calc_mean_std(feat, eps=1e-5): function adaptive_instance_normalization (line 27) | def adaptive_instance_normalization(content_feat, style_feat): class PositionEmbeddingSine (line 44) | class PositionEmbeddingSine(nn.Module): method __init__ (line 50) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 61) | def forward(self, x, mask=None): function _get_activation_fn (line 86) | def _get_activation_fn(activation): class TransformerSALayer (line 97) | class TransformerSALayer(nn.Module): method __init__ (line 98) | def __init__(self, embed_dim, nhead=8, dim_mlp=2048, dropout=0.0, acti... method with_pos_embed (line 113) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward (line 116) | def forward(self, tgt, class Fuse_sft_block (line 133) | class Fuse_sft_block(nn.Module): method __init__ (line 134) | def __init__(self, in_ch, out_ch): method forward (line 148) | def forward(self, enc_feat, dec_feat, w=1): class CodeFormer (line 157) | class CodeFormer(VQAutoEncoder): method __init__ (line 158) | def __init__(self, dim_embd=512, n_head=8, n_layers=9, method _init_weights (line 206) | def _init_weights(self, module): method forward (line 215) | def forward(self, x, w=0, detach_16=True, code_only=False, adain=False): FILE: modules/postprocess/codeformer_model.py function setup_model (line 20) | def setup_model(dirname): FILE: modules/postprocess/dcc.py function DetectDirect (line 4) | def DetectDirect(A, dcc_type, k, T): function PixelValue (line 43) | def PixelValue(A, mode, w, n, f): function PadLeftTop (line 60) | def PadLeftTop(img_pad, H, W): function PadRightBottom (line 74) | def PadRightBottom(img_pad, H, W): function _DCC (line 88) | def _DCC(I, k, T): function DCC (line 117) | def DCC(img, level): FILE: modules/postprocess/esrgan_model.py function mod2normal (line 10) | def mod2normal(state_dict): function resrgan2normal (line 43) | def resrgan2normal(state_dict, nb=23): function infer_params (line 86) | def infer_params(state_dict): class UpscalerESRGAN (line 118) | class UpscalerESRGAN(Upscaler): method __init__ (line 119) | def __init__(self, dirname): method do_upscale (line 126) | def do_upscale(self, img, selected_model): method load_model (line 138) | def load_model(self, path: str): function upscale_without_tiling (line 176) | def upscale_without_tiling(model, img): function esrgan_upscale (line 191) | def esrgan_upscale(model, img): FILE: modules/postprocess/esrgan_model_arch.py class RRDBNet (line 13) | class RRDBNet(nn.Module): method __init__ (line 14) | def __init__(self, in_nc, out_nc, nf, nb, nr=3, gc=32, upscale=4, norm... method forward (line 52) | def forward(self, x, outm=None): class RRDB (line 63) | class RRDB(nn.Module): method __init__ (line 69) | def __init__(self, nf, nr=3, kernel_size=3, gc=32, stride=1, bias=1, p... method forward (line 90) | def forward(self, x): class ResidualDenseBlock_5C (line 100) | class ResidualDenseBlock_5C(nn.Module): method __init__ (line 111) | def __init__(self, nf=64, kernel_size=3, gc=32, stride=1, bias=1, pad_... method forward (line 139) | def forward(self, x): class GaussianNoise (line 159) | class GaussianNoise(nn.Module): method __init__ (line 160) | def __init__(self, sigma=0.1, is_relative_detach=False): method forward (line 166) | def forward(self, x): function conv1x1 (line 174) | def conv1x1(in_planes, out_planes, stride=1): class SRVGGNetCompact (line 182) | class SRVGGNetCompact(nn.Module): method __init__ (line 187) | def __init__(self, num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=16... method forward (line 225) | def forward(self, x): class Upsample (line 241) | class Upsample(nn.Module): method __init__ (line 247) | def __init__(self, size=None, scale_factor=None, mode="nearest", align... method forward (line 257) | def forward(self, x): method extra_repr (line 260) | def extra_repr(self): function pixel_unshuffle (line 269) | def pixel_unshuffle(x, scale): function pixelshuffle_block (line 286) | def pixelshuffle_block(in_nc, out_nc, upscale_factor=2, kernel_size=3, s... function upconv_block (line 302) | def upconv_block(in_nc, out_nc, upscale_factor=2, kernel_size=3, stride=... function make_layer (line 323) | def make_layer(basic_block, num_basic_block, **kwarg): function act (line 337) | def act(act_type, inplace=True, neg_slope=0.2, n_prelu=1, beta=1.0): class Identity (line 355) | class Identity(nn.Module): method __init__ (line 356) | def __init__(self, *kwargs): method forward (line 359) | def forward(self, x, *kwargs): function norm (line 363) | def norm(norm_type, nc): function pad (line 377) | def pad(pad_type, padding): function get_valid_padding (line 393) | def get_valid_padding(kernel_size, dilation): class ShortcutBlock (line 399) | class ShortcutBlock(nn.Module): method __init__ (line 401) | def __init__(self, submodule): method forward (line 405) | def forward(self, x): method __repr__ (line 409) | def __repr__(self): function sequential (line 413) | def sequential(*args): function conv_block (line 430) | def conv_block(in_nc, out_nc, kernel_size, stride=1, dilation=1, groups=... FILE: modules/postprocess/gfpgan_model.py function gfpgann (line 14) | def gfpgann(): function send_model_to (line 40) | def send_model_to(model, device): function gfpgan_fix_faces (line 46) | def gfpgan_fix_faces(np_image): function setup_model (line 68) | def setup_model(dirname): FILE: modules/postprocess/hqx.py function RGBtoYUV (line 18) | def RGBtoYUV(c): function Diff (line 26) | def Diff(w1, w2): function Interp1 (line 33) | def Interp1( pc, c1, c2, dest ): function Interp2 (line 42) | def Interp2( pc, c1, c2, c3, dest ): function Interp3 (line 48) | def Interp3( pc, c1, c2, dest ): function Interp4 (line 57) | def Interp4( pc, c1, c2, c3, dest ): function Interp5 (line 63) | def Interp5( pc, c1, c2, dest ): function Interp6 (line 72) | def Interp6( pc, c1, c2, c3, dest ): function Interp7 (line 78) | def Interp7( pc, c1, c2, c3, dest ): function Interp8 (line 84) | def Interp8( pc, c1, c2, dest ): function Interp9 (line 93) | def Interp9( pc, c1, c2, c3, dest ): function Interp10 (line 99) | def Interp10( pc, c1, c2, c3, dest ): function hqx (line 105) | def hqx( img: cv2.Mat, scale_factor: int ) -> cv2.Mat: function hq2x (line 139) | def hq2x( width: int, height: int, src, dest ) -> None: # noqa:C901 # py... function hq3x (line 1561) | def hq3x( width: int, height: int, src, dest ) -> None: # noqa:C901 # py... function hq4x (line 3955) | def hq4x( width: int, height: int, src, dest ) -> None: # noqa:C901 # py... function main (line 7709) | def main(): FILE: modules/postprocess/icbi.py function icbi (line 11) | def icbi(IM,ZK = 1,SZ = 8,PF = 1,ST = 20,TM = 100,TC = 50,SC = 1,TS = 10... FILE: modules/postprocess/pixelart.py function img_to_pixelart (line 18) | def img_to_pixelart(image: PipelineImageInput, sharpen: float = 0, block... function edge_detect_for_pixelart (line 50) | def edge_detect_for_pixelart(image: PipelineImageInput, image_weight: fl... function get_dct_harmonics (line 80) | def get_dct_harmonics(N: int, device: torch.device) -> torch.FloatTensor: function get_dct_norm (line 87) | def get_dct_norm(N: int, device: torch.device) -> torch.FloatTensor: function dct_2d (line 94) | def dct_2d(x: torch.FloatTensor, norm: str="ortho") -> torch.FloatTensor: function idct_2d (line 108) | def idct_2d(coeff: torch.FloatTensor, norm: str="ortho") -> torch.FloatT... function encode_single_channel_dct_2d (line 122) | def encode_single_channel_dct_2d(img: torch.FloatTensor, block_size: int... function decode_single_channel_dct_2d (line 136) | def decode_single_channel_dct_2d(img: torch.FloatTensor, norm: str="orth... function rgb_to_ycbcr_tensor (line 148) | def rgb_to_ycbcr_tensor(image: torch.ByteTensor) -> torch.FloatTensor: function ycbcr_tensor_to_rgb (line 155) | def ycbcr_tensor_to_rgb(ycbcr: torch.FloatTensor) -> torch.ByteTensor: function encode_jpeg_tensor (line 160) | def encode_jpeg_tensor(img: torch.FloatTensor, block_size: int=16, cbcr_... function decode_jpeg_tensor (line 172) | def decode_jpeg_tensor(jpeg_img: torch.FloatTensor, block_size: int=16, ... function process_image_input (line 189) | def process_image_input(images: PipelineImageInput) -> torch.ByteTensor: class JPEGEncoder (line 223) | class JPEGEncoder(ImageProcessingMixin, ConfigMixin): method __init__ (line 228) | def __init__( method encode (line 243) | def encode(self, images: PipelineImageInput, device: str="cpu") -> tor... method decode (line 268) | def decode(self, latents: torch.FloatTensor, return_type: str="pil") -... FILE: modules/postprocess/realesrgan_model.py class UpscalerRealESRGAN (line 10) | class UpscalerRealESRGAN(Upscaler): method __init__ (line 11) | def __init__(self, dirname): method load_model (line 34) | def load_model(self, path): # pylint: disable=unused-argument method do_upscale (line 37) | def do_upscale(self, img, selected_model): FILE: modules/postprocess/realesrgan_model_arch.py class RealESRGANer (line 17) | class RealESRGANer(): method __init__ (line 32) | def __init__(self, method dni (line 84) | def dni(self, net_a, net_b, dni_weight, key='params', loc='cpu'): method pre_process (line 95) | def pre_process(self, img): method process (line 120) | def process(self): method tile_process (line 124) | def tile_process(self): method post_process (line 195) | def post_process(self): method enhance (line 207) | def enhance(self, img, outscale=None, alpha_upsampler='realesrgan'): class PrefetchReader (line 278) | class PrefetchReader(threading.Thread): method __init__ (line 286) | def __init__(self, img_list, num_prefetch_queue): method run (line 291) | def run(self): method __next__ (line 298) | def __next__(self): method __iter__ (line 304) | def __iter__(self): class IOConsumer (line 308) | class IOConsumer(threading.Thread): method __init__ (line 310) | def __init__(self, opt, que, qid): method run (line 316) | def run(self): class SRVGGNetCompact (line 327) | class SRVGGNetCompact(nn.Module): method __init__ (line 342) | def __init__(self, num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=16... method forward (line 380) | def forward(self, x): FILE: modules/postprocess/restorer.py function restore (line 10) | def restore(np_image, name, session, strength): # pylint: disable=unused... FILE: modules/postprocess/scunet_model.py class UpscalerSCUNet (line 11) | class UpscalerSCUNet(Upscaler): method __init__ (line 12) | def __init__(self, dirname): method load_model (line 19) | def load_model(self, path: str): method tiled_inference (line 40) | def tiled_inference(img, model): method do_upscale (line 71) | def do_upscale(self, img: Image.Image, selected_file): FILE: modules/postprocess/scunet_model_arch.py class WMSA (line 10) | class WMSA(nn.Module): method __init__ (line 14) | def __init__(self, input_dim, output_dim, head_dim, window_size, type): method generate_mask (line 36) | def generate_mask(self, h, w, p, shift): method forward (line 56) | def forward(self, x): method relative_embedding (line 95) | def relative_embedding(self): class Block (line 102) | class Block(nn.Module): method __init__ (line 103) | def __init__(self, input_dim, output_dim, head_dim, window_size, drop_... method forward (line 124) | def forward(self, x): class ConvTransBlock (line 130) | class ConvTransBlock(nn.Module): method __init__ (line 131) | def __init__(self, conv_dim, trans_dim, head_dim, window_size, drop_pa... method forward (line 158) | def forward(self, x): class SCUNet (line 170) | class SCUNet(nn.Module): method __init__ (line 172) | def __init__(self, in_nc=3, config=None, dim=64, drop_path_rate=0.0, i... method forward (line 240) | def forward(self, x0): method _init_weights (line 261) | def _init_weights(self, m): FILE: modules/postprocess/sdupscaler_model.py class UpscalerDiffusion (line 8) | class UpscalerDiffusion(Upscaler): method __init__ (line 9) | def __init__(self, dirname): # pylint: disable=super-init-not-called method load_model (line 22) | def load_model(self, path: str): method callback (line 40) | def callback(self, _step: int, _timestep: int, _latents: torch.FloatTe... method do_upscale (line 43) | def do_upscale(self, img: Image.Image, selected_model): FILE: modules/postprocess/seedvr_model.py class UpscalerSeedVR (line 20) | class UpscalerSeedVR(Upscaler): method __init__ (line 21) | def __init__(self, dirname=None): method load_model (line 32) | def load_model(self, path: str): method vae_encode (line 66) | def vae_encode(self, samples): method vae_decode (line 93) | def vae_decode(self, latents, target_dtype: torch.dtype = None): method model_step (line 121) | def model_step(self, *args, **kwargs): method do_upscale (line 134) | def do_upscale(self, img: Image.Image, selected_file): FILE: modules/postprocess/swinir_model.py class UpscalerSwinIR (line 11) | class UpscalerSwinIR(Upscaler): method __init__ (line 12) | def __init__(self, dirname): method load_model (line 19) | def load_model(self, path, scale=4): method do_upscale (line 68) | def do_upscale(self, img, selected_model): function upscale (line 81) | def upscale( function inference (line 113) | def inference(img, model, tile, tile_overlap, window_size, scale): FILE: modules/postprocess/swinir_model_arch.py class Mlp (line 14) | class Mlp(nn.Module): method __init__ (line 15) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 24) | def forward(self, x): function window_partition (line 33) | def window_partition(x, window_size): function window_reverse (line 48) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 65) | class WindowAttention(nn.Module): method __init__ (line 79) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 114) | def forward(self, x, mask=None): method extra_repr (line 147) | def extra_repr(self) -> str: method flops (line 150) | def flops(self, N): class SwinTransformerBlock (line 164) | class SwinTransformerBlock(nn.Module): method __init__ (line 183) | def __init__(self, dim, input_resolution, num_heads, window_size=7, sh... method calculate_mask (line 216) | def calculate_mask(self, x_size): method forward (line 239) | def forward(self, x, x_size): method extra_repr (line 281) | def extra_repr(self) -> str: method flops (line 284) | def flops(self): class PatchMerging (line 299) | class PatchMerging(nn.Module): method __init__ (line 308) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 315) | def forward(self, x): method extra_repr (line 338) | def extra_repr(self) -> str: method flops (line 341) | def flops(self): class BasicLayer (line 348) | class BasicLayer(nn.Module): method __init__ (line 368) | def __init__(self, dim, input_resolution, depth, num_heads, window_size, method forward (line 396) | def forward(self, x, x_size): method extra_repr (line 406) | def extra_repr(self) -> str: method flops (line 409) | def flops(self): class RSTB (line 418) | class RSTB(nn.Module): method __init__ (line 441) | def __init__(self, dim, input_resolution, depth, num_heads, window_size, method forward (line 480) | def forward(self, x, x_size): method flops (line 483) | def flops(self): class PatchEmbed (line 494) | class PatchEmbed(nn.Module): method __init__ (line 505) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 523) | def forward(self, x): method flops (line 529) | def flops(self): class PatchUnEmbed (line 537) | class PatchUnEmbed(nn.Module): method __init__ (line 548) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 561) | def forward(self, x, x_size): method flops (line 566) | def flops(self): class Upsample (line 571) | class Upsample(nn.Sequential): method __init__ (line 579) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 593) | class UpsampleOneStep(nn.Sequential): method __init__ (line 603) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 611) | def flops(self): class SwinIR (line 617) | class SwinIR(nn.Module): method __init__ (line 645) | def __init__(self, img_size=64, patch_size=1, in_chans=3, method _init_weights (line 765) | def _init_weights(self, m): method no_weight_decay (line 775) | def no_weight_decay(self): method no_weight_decay_keywords (line 779) | def no_weight_decay_keywords(self): method check_image_size (line 782) | def check_image_size(self, x): method forward_features (line 789) | def forward_features(self, x): method forward (line 804) | def forward(self, x): method flops (line 841) | def flops(self): FILE: modules/postprocess/swinir_model_arch_v2.py class Mlp (line 15) | class Mlp(nn.Module): method __init__ (line 16) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 25) | def forward(self, x): function window_partition (line 34) | def window_partition(x, window_size): function window_reverse (line 48) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 63) | class WindowAttention(nn.Module): method __init__ (line 76) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, attn_dr... method forward (line 135) | def forward(self, x, mask=None): method extra_repr (line 176) | def extra_repr(self) -> str: method flops (line 179) | def flops(self, N): class SwinTransformerBlock (line 192) | class SwinTransformerBlock(nn.Module): method __init__ (line 210) | def __init__(self, dim, input_resolution, num_heads, window_size=7, sh... method calculate_mask (line 244) | def calculate_mask(self, x_size): method forward (line 267) | def forward(self, x, x_size): method extra_repr (line 308) | def extra_repr(self) -> str: method flops (line 311) | def flops(self): class PatchMerging (line 325) | class PatchMerging(nn.Module): method __init__ (line 333) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method forward (line 340) | def forward(self, x): method extra_repr (line 363) | def extra_repr(self) -> str: method flops (line 366) | def flops(self): class BasicLayer (line 372) | class BasicLayer(nn.Module): method __init__ (line 391) | def __init__(self, dim, input_resolution, depth, num_heads, window_size, method forward (line 421) | def forward(self, x, x_size): method extra_repr (line 431) | def extra_repr(self) -> str: method flops (line 434) | def flops(self): method _init_respostnorm (line 442) | def _init_respostnorm(self): class PatchEmbed (line 449) | class PatchEmbed(nn.Module): method __init__ (line 459) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 478) | def forward(self, x): method flops (line 488) | def flops(self): class RSTB (line 495) | class RSTB(nn.Module): method __init__ (line 517) | def __init__(self, dim, input_resolution, depth, num_heads, window_size, method forward (line 556) | def forward(self, x, x_size): method flops (line 559) | def flops(self): class PatchUnEmbed (line 569) | class PatchUnEmbed(nn.Module): method __init__ (line 580) | def __init__(self, img_size=224, patch_size=4, in_chans=3, embed_dim=9... method forward (line 593) | def forward(self, x, x_size): method flops (line 598) | def flops(self): class Upsample (line 603) | class Upsample(nn.Sequential): method __init__ (line 611) | def __init__(self, scale, num_feat): class Upsample_hf (line 624) | class Upsample_hf(nn.Sequential): method __init__ (line 632) | def __init__(self, scale, num_feat): class UpsampleOneStep (line 646) | class UpsampleOneStep(nn.Sequential): method __init__ (line 656) | def __init__(self, scale, num_feat, num_out_ch, input_resolution=None): method flops (line 664) | def flops(self): class Swin2SR (line 671) | class Swin2SR(nn.Module): method __init__ (line 698) | def __init__(self, img_size=64, patch_size=1, in_chans=3, method _init_weights (line 868) | def _init_weights(self, m): method no_weight_decay (line 878) | def no_weight_decay(self): method no_weight_decay_keywords (line 882) | def no_weight_decay_keywords(self): method check_image_size (line 885) | def check_image_size(self, x): method forward_features (line 892) | def forward_features(self, x): method forward_features_hf (line 907) | def forward_features_hf(self, x): method forward (line 922) | def forward(self, x): method flops (line 990) | def flops(self): FILE: modules/postprocess/vqgan_arch.py function normalize (line 14) | def normalize(in_channels): function swish (line 19) | def swish(x): class VectorQuantizer (line 24) | class VectorQuantizer(nn.Module): method __init__ (line 25) | def __init__(self, codebook_size, emb_dim, beta): method forward (line 33) | def forward(self, z): method get_codebook_feat (line 73) | def get_codebook_feat(self, indices, shape): class GumbelQuantizer (line 88) | class GumbelQuantizer(nn.Module): method __init__ (line 89) | def __init__(self, codebook_size, emb_dim, num_hiddens, straight_throu... method forward (line 99) | def forward(self, z): class Downsample (line 118) | class Downsample(nn.Module): method __init__ (line 119) | def __init__(self, in_channels): method forward (line 123) | def forward(self, x): class Upsample (line 130) | class Upsample(nn.Module): method __init__ (line 131) | def __init__(self, in_channels): method forward (line 135) | def forward(self, x): class ResBlock (line 142) | class ResBlock(nn.Module): method __init__ (line 143) | def __init__(self, in_channels, out_channels=None): method forward (line 154) | def forward(self, x_in): class AttnBlock (line 168) | class AttnBlock(nn.Module): method __init__ (line 169) | def __init__(self, in_channels): method forward (line 203) | def forward(self, x): class Encoder (line 230) | class Encoder(nn.Module): method __init__ (line 231) | def __init__(self, in_channels, nf, emb_dim, ch_mult, num_res_blocks, ... method forward (line 270) | def forward(self, x): class Generator (line 277) | class Generator(nn.Module): method __init__ (line 278) | def __init__(self, nf, emb_dim, ch_mult, res_blocks, img_size, attn_re... method forward (line 320) | def forward(self, x): class VQAutoEncoder (line 328) | class VQAutoEncoder(nn.Module): method __init__ (line 329) | def __init__(self, img_size, nf, ch_mult, quantizer="nearest", res_blo... method forward (line 386) | def forward(self, x): class VQGANDiscriminator (line 396) | class VQGANDiscriminator(nn.Module): method __init__ (line 397) | def __init__(self, nc=3, ndf=64, n_layers=4, model_path=None): method forward (line 434) | def forward(self, x): FILE: modules/postprocess/yolo.py class YoloResult (line 32) | class YoloResult: method __init__ (line 33) | def __init__(self, cls: int, label: str, score: float, box: list[int],... method __repl__ (line 44) | def __repl__(self): class YoloRestorer (line 48) | class YoloRestorer(Detailer): method __init__ (line 49) | def __init__(self): method name (line 57) | def name(self): method enumerate (line 60) | def enumerate(self): method dependencies (line 78) | def dependencies(self): method predict (line 82) | def predict( method load (line 186) | def load(self, model_name: str = None): method merge (line 224) | def merge(self, items: list[YoloResult]) -> list[YoloResult]: method draw_masks (line 243) | def draw_masks(self, image: Image.Image, items: list[YoloResult]) -> I... method restore (line 269) | def restore(self, np_image, p: processing.StableDiffusionProcessing = ... method change_mode (line 470) | def change_mode(self, dropdown, text): method ui (line 479) | def ui(self, tab: str): function initialize (line 563) | def initialize(): FILE: modules/postprocessing.py function run_postprocessing (line 12) | def run_postprocessing(extras_mode, image, image_folder: List[tempfile.N... function run_extras (line 103) | def run_extras(extras_mode, resize_mode, image, image_folder, input_dir,... FILE: modules/processing.py class Processed (line 33) | class Processed: method __init__ (line 34) | def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1,... method js (line 88) | def js(self): method infotext (line 121) | def infotext(self, p: StableDiffusionProcessing, index): method __str___ (line 124) | def __str___(self): function get_processed (line 128) | def get_processed(*args, **kwargs): function process_images (line 134) | def process_images(p: StableDiffusionProcessing) -> Processed: function process_init (line 242) | def process_init(p: StableDiffusionProcessing): function process_samples (line 278) | def process_samples(p: StableDiffusionProcessing, samples): function process_images_inner (line 390) | def process_images_inner(p: StableDiffusionProcessing) -> Processed: FILE: modules/processing_args.py function task_modular_kwargs (line 22) | def task_modular_kwargs(p, model): # pylint: disable=unused-argument function task_specific_kwargs (line 42) | def task_specific_kwargs(p, model): function get_params (line 178) | def get_params(model): function set_pipeline_args (line 188) | def set_pipeline_args(p, model, prompts:list, negative_prompts:list, pro... FILE: modules/processing_callbacks.py function set_callbacks_p (line 15) | def set_callbacks_p(processing): function prompt_callback (line 21) | def prompt_callback(step, kwargs): function diffusers_callback_legacy (line 36) | def diffusers_callback_legacy(step: int, timestep: int, latents: typing.... function diffusers_callback (line 54) | def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: d... FILE: modules/processing_class.py class StableDiffusionProcessing (line 17) | class StableDiffusionProcessing: method __init__ (line 18) | def __init__(self, method __repr__ (line 388) | def __repr__(self): method sd_model (line 392) | def sd_model(self): method scripts (line 396) | def scripts(self): method scripts (line 400) | def scripts(self, value): method script_args (line 406) | def script_args(self): method script_args (line 410) | def script_args(self, value): method setup_scripts (line 415) | def setup_scripts(self): method comment (line 419) | def comment(self, text): method init (line 422) | def init(self, all_prompts=None, all_seeds=None, all_subseeds=None): method close (line 425) | def close(self): class StableDiffusionProcessingVideo (line 430) | class StableDiffusionProcessingVideo(StableDiffusionProcessing): method __init__ (line 431) | def __init__(self, **kwargs): class StableDiffusionProcessingTxt2Img (line 441) | class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): method __init__ (line 442) | def __init__(self, **kwargs): method init (line 446) | def init(self, all_prompts=None, all_seeds=None, all_subseeds=None): method init_hr (line 457) | def init_hr(self, scale = None, upscaler = None, force = False): # pyl... class StableDiffusionProcessingImg2Img (line 476) | class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): method __init__ (line 477) | def __init__(self, **kwargs): method init (line 481) | def init(self, all_prompts=None, all_seeds=None, all_subseeds=None): class StableDiffusionProcessingControl (line 573) | class StableDiffusionProcessingControl(StableDiffusionProcessingImg2Img): method __init__ (line 574) | def __init__(self, **kwargs): method init_hr (line 578) | def init_hr(self, scale:float=None, upscaler:str=None, force:bool=False): function switch_class (line 596) | def switch_class(p: StableDiffusionProcessing, new_class: type, dct: dic... FILE: modules/processing_correction.py function warn_once (line 19) | def warn_once(message): function sharpen_tensor (line 26) | def sharpen_tensor(tensor, ratio=0): function soft_clamp_tensor (line 41) | def soft_clamp_tensor(tensor, threshold=0.8, boundary=4): function center_tensor (line 58) | def center_tensor(tensor, channel_shift=0.0, full_shift=0.0, offset=0.0): function maximize_tensor (line 69) | def maximize_tensor(tensor, boundary=1.0): function get_color (line 81) | def get_color(colorstr): function color_adjust (line 88) | def color_adjust(tensor, colorstr, ratio): function correction (line 96) | def correction(p, timestep, latent): function correction_callback (line 121) | def correction_callback(p, timestep, kwargs, initial: bool = False): FILE: modules/processing_diffusers.py function restore_state (line 21) | def restore_state(p: processing.StableDiffusionProcessing): function process_pre (line 70) | def process_pre(p: processing.StableDiffusionProcessing): function process_post (line 113) | def process_post(p: processing.StableDiffusionProcessing): function process_base (line 133) | def process_base(p: processing.StableDiffusionProcessing): function process_hires (line 237) | def process_hires(p: processing.StableDiffusionProcessing, output): function process_refine (line 352) | def process_refine(p: processing.StableDiffusionProcessing, output): function process_decode (line 438) | def process_decode(p: processing.StableDiffusionProcessing, output): function update_pipeline (line 496) | def update_pipeline(sd_model, p: processing.StableDiffusionProcessing): function validate_pipeline (line 512) | def validate_pipeline(p: processing.StableDiffusionProcessing): function process_diffusers (line 533) | def process_diffusers(p: processing.StableDiffusionProcessing): FILE: modules/processing_helpers.py function is_modular (line 20) | def is_modular(): function is_txt2img (line 24) | def is_txt2img(): function is_refiner_enabled (line 28) | def is_refiner_enabled(p): function setup_color_correction (line 32) | def setup_color_correction(image): function apply_color_correction (line 38) | def apply_color_correction(correction, original_image): function apply_overlay (line 50) | def apply_overlay(image: Image, paste_loc, index, overlays): function create_binary_mask (line 75) | def create_binary_mask(image): function images_tensor_to_samples (line 83) | def images_tensor_to_samples(image, approximation=None, model=None): # p... function get_sampler_name (line 99) | def get_sampler_name(sampler_index: int, img: bool = False) -> str: function get_sampler_index (line 112) | def get_sampler_index(sampler_name: str) -> int: function slerp (line 121) | def slerp(val, lo, hi): # from https://discuss.pytorch.org/t/help-regard... function slerp_alt (line 140) | def slerp_alt(val, lo, hi): # from https://discuss.pytorch.org/t/help-re... function create_random_tensors (line 159) | def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=... function decode_first_stage (line 208) | def decode_first_stage(model, x): function get_fixed_seed (line 229) | def get_fixed_seed(seed): function fix_seed (line 236) | def fix_seed(p): function old_hires_fix_first_pass_dimensions (line 251) | def old_hires_fix_first_pass_dimensions(width, height): function validate_sample (line 261) | def validate_sample(tensor): function decode_images (line 293) | def decode_images(image): function resize_init_images (line 322) | def resize_init_images(p): function resize_hires (line 352) | def resize_hires(p, latents): # input=latents output=pil if not latent_u... function calculate_base_steps (line 385) | def calculate_base_steps(p, use_denoise_start, use_refiner_start): function calculate_hires_steps (line 410) | def calculate_hires_steps(p): function calculate_refiner_steps (line 426) | def calculate_refiner_steps(p): function get_generator (line 443) | def get_generator(p): function set_latents (line 462) | def set_latents(p): function apply_circular (line 476) | def apply_circular(enable: bool, model): function save_intermediate (line 497) | def save_intermediate(p, latents, suffix): function update_sampler (line 506) | def update_sampler(p, sd_model, second_pass=False): function get_job_name (line 533) | def get_job_name(p, model): FILE: modules/processing_info.py function get_last_args (line 12) | def get_last_args(): function create_infotext (line 16) | def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_... FILE: modules/processing_prompt.py function fix_prompt_batch (line 10) | def fix_prompt_batch(p, prompts, negative_prompts, prompts_2, negative_p... function fix_prompt_model (line 48) | def fix_prompt_model(cls, prompts, negative_prompts, prompts_2, negative... function set_fallback_prompt (line 56) | def set_fallback_prompt(args: dict, possible: list[str], prompts, negati... function set_prompt (line 72) | def set_prompt(p, FILE: modules/processing_vae.py function create_latents (line 14) | def create_latents(image, p, dtype=None, device=None): function full_vqgan_decode (line 36) | def full_vqgan_decode(latents, model): function full_vae_decode (line 88) | def full_vae_decode(latents, model): function full_vae_encode (line 183) | def full_vae_encode(image, model): function taesd_vae_decode (line 216) | def taesd_vae_decode(latents): function taesd_vae_encode (line 231) | def taesd_vae_encode(image): function vae_postprocess (line 237) | def vae_postprocess(tensor, model, output_type='np'): function vae_decode (line 271) | def vae_decode(latents, model, output_type='np', vae_type='Full', width=... function vae_encode (line 335) | def vae_encode(image, model, vae_type='Full'): # pylint: disable=unused-... function reprocess (line 359) | def reprocess(gallery): FILE: modules/progress.py function start_task (line 19) | def start_task(id_task): function record_results (line 25) | def record_results(id_task, res): function finish_task (line 31) | def finish_task(id_task): function add_task_to_queue (line 40) | def add_task_to_queue(id_job): class ProgressRequest (line 44) | class ProgressRequest(BaseModel): class InternalProgressResponse (line 49) | class InternalProgressResponse(BaseModel): function api_progress (line 71) | def api_progress(req: ProgressRequest): function setup_progress_api (line 130) | def setup_progress_api(): FILE: modules/prompt_parser.py function get_learned_conditioning_prompt_schedules (line 87) | def get_learned_conditioning_prompt_schedules(prompts, steps): function get_learned_conditioning (line 168) | def get_learned_conditioning(model, prompts, steps): function get_multicond_prompt_list (line 200) | def get_multicond_prompt_list(prompts): class ComposableScheduledPromptConditioning (line 221) | class ComposableScheduledPromptConditioning: method __init__ (line 222) | def __init__(self, schedules, weight=1.0): class MulticondLearnedConditioning (line 227) | class MulticondLearnedConditioning: method __init__ (line 228) | def __init__(self, shape, batch): function get_multicond_learned_conditioning (line 233) | def get_multicond_learned_conditioning(model, prompts, steps) -> Multico... function reconstruct_cond_batch (line 246) | def reconstruct_cond_batch(c: List[List[ScheduledPromptConditioning]], c... function reconstruct_multicond_batch (line 259) | def reconstruct_multicond_batch(c: MulticondLearnedConditioning, current... function parse_prompt_attention (line 284) | def parse_prompt_attention(text): FILE: modules/prompt_parser_diffusers.py function prompt_compatible (line 23) | def prompt_compatible(pipe = None): function prepare_model (line 38) | def prepare_model(pipe = None): class PromptEmbedder (line 50) | class PromptEmbedder: method __init__ (line 51) | def __init__(self, method checkcache (line 108) | def checkcache(self, p) -> bool: method compare_prompts (line 162) | def compare_prompts(self): method prepare_schedule (line 169) | def prepare_schedule(self, prompt, negative_prompt): method scheduled_encode (line 175) | def scheduled_encode(self, pipe, batchidx): method extend_embeds (line 188) | def extend_embeds(self, batchidx, idx): # Extends scheduled prompt vi... method encode (line 202) | def encode(self, pipe, positive_prompt, negative_prompt, batchidx): method clone_embeds (line 247) | def clone_embeds(self, batchidx, idx): method __call__ (line 264) | def __call__(self, key, step=0): function compel_hijack (line 303) | def compel_hijack(self, token_ids: torch.Tensor, attention_mask: typing.... function sd3_compel_hijack (line 326) | def sd3_compel_hijack(self, token_ids: torch.Tensor, attention_mask: typ... function insert_parser_highjack (line 334) | def insert_parser_highjack(pipename): class DiffusersTextualInversionManager (line 347) | class DiffusersTextualInversionManager(BaseTextualInversionManager): method __init__ (line 348) | def __init__(self, pipe, tokenizer): method maybe_convert_prompt (line 356) | def maybe_convert_prompt(self, prompt: typing.Union[str, typing.List[s... method _maybe_convert_prompt (line 363) | def _maybe_convert_prompt(self, prompt: str, tokenizer: PreTrainedToke... method expand_textual_inversion_token_ids_if_necessary (line 381) | def expand_textual_inversion_token_ids_if_necessary(self, token_ids: t... function get_prompt_schedule (line 390) | def get_prompt_schedule(prompt, steps): function get_tokens (line 402) | def get_tokens(pipe, msg, prompt): function normalize_prompt (line 449) | def normalize_prompt(pairs: list): function get_prompts_with_weights (line 466) | def get_prompts_with_weights(pipe, prompt: str): function prepare_embedding_providers (line 499) | def prepare_embedding_providers(pipe, clip_skip) -> list[EmbeddingsProvi... function pad_to_same_length (line 537) | def pad_to_same_length(pipe, embeds, empty_embedding_providers=None): function split_prompts (line 562) | def split_prompts(pipe, prompt, SD3 = False): function get_weighted_text_embeddings (line 595) | def get_weighted_text_embeddings(pipe, prompt: str = "", neg_prompt: str... function get_xhinker_text_embeddings (line 746) | def get_xhinker_text_embeddings(pipe, prompt: str = "", neg_prompt: str ... FILE: modules/prompt_parser_xhinker.py function get_prompts_tokens_with_weights (line 30) | def get_prompts_tokens_with_weights( function get_prompts_tokens_with_weights_t5 (line 90) | def get_prompts_tokens_with_weights_t5( function group_tokens_and_weights (line 128) | def group_tokens_and_weights( function get_weighted_text_embeddings_sd15 (line 185) | def get_weighted_text_embeddings_sd15( function get_weighted_text_embeddings_sdxl (line 321) | def get_weighted_text_embeddings_sdxl( function get_weighted_text_embeddings_sdxl_refiner (line 577) | def get_weighted_text_embeddings_sdxl_refiner( function get_weighted_text_embeddings_sdxl_2p (line 757) | def get_weighted_text_embeddings_sdxl_2p( function get_weighted_text_embeddings_sd3 (line 1035) | def get_weighted_text_embeddings_sd3( function get_weighted_text_embeddings_flux1 (line 1348) | def get_weighted_text_embeddings_flux1( function get_weighted_text_embeddings_chroma (line 1434) | def get_weighted_text_embeddings_chroma( function get_weighted_prompt_embeds_with_attention_mask_chroma (line 1501) | def get_weighted_prompt_embeds_with_attention_mask_chroma( function pad_prompt_tokens_to_length_chroma (line 1519) | def pad_prompt_tokens_to_length_chroma(pipe, input_tokens, input_weights... FILE: modules/ras/__init__.py function apply (line 7) | def apply(pipe, p: processing.StableDiffusionProcessing): function unapply (line 30) | def unapply(pipe): FILE: modules/ras/ras_attention.py class RASLuminaAttnProcessor2_0 (line 23) | class RASLuminaAttnProcessor2_0: method __init__ (line 29) | def __init__(self): method __call__ (line 36) | def __call__( class RASJointAttnProcessor2_0 (line 153) | class RASJointAttnProcessor2_0: method __init__ (line 156) | def __init__(self): method __call__ (line 163) | def __call__( FILE: modules/ras/ras_forward.py function ras_forward (line 22) | def ras_forward( FILE: modules/ras/ras_manager.py class ras_manager (line 1) | class ras_manager: method __init__ (line 2) | def __init__(self): method __str__ (line 33) | def __str__(self): method set_parameters (line 36) | def set_parameters(self, args): method generate_skip_token_list (line 52) | def generate_skip_token_list(self): method reset_cache (line 76) | def reset_cache(self): method increase_step (line 93) | def increase_step(self): FILE: modules/ras/ras_scheduler.py class RASFlowMatchEulerDiscreteSchedulerOutput (line 30) | class RASFlowMatchEulerDiscreteSchedulerOutput(BaseOutput): class RASFlowMatchEulerDiscreteScheduler (line 43) | class RASFlowMatchEulerDiscreteScheduler(FlowMatchEulerDiscreteScheduler): method __init__ (line 64) | def __init__( method _init_ras_config (line 87) | def _init_ras_config(self, latents): method extract_latents_index_from_patched_latents_index (line 90) | def extract_latents_index_from_patched_latents_index(self, indices, he... method ras_selection (line 95) | def ras_selection(self, sample, diff, height, width): method step (line 120) | def step( FILE: modules/res4lyf/abnorsett_scheduler.py class ABNorsettScheduler (line 29) | class ABNorsettScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 38) | def __init__( method step_index (line 90) | def step_index(self) -> Optional[int]: method begin_index (line 94) | def begin_index(self) -> Optional[int]: method set_begin_index (line 97) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 171) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 177) | def add_noise( method scale_model_input (line 186) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 195) | def step( method _init_step_index (line 331) | def _init_step_index(self, timestep): method __len__ (line 339) | def __len__(self): FILE: modules/res4lyf/bong_tangent_scheduler.py class BongTangentScheduler (line 27) | class BongTangentScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 36) | def __init__( method step_index (line 89) | def step_index(self) -> Optional[int]: method begin_index (line 93) | def begin_index(self) -> Optional[int]: method set_begin_index (line 96) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 99) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 108) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 198) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 204) | def add_noise( method _get_bong_tangent_sigmas (line 213) | def _get_bong_tangent_sigmas(self, steps: int, slope: float, pivot: in... method step (line 228) | def step( method _init_step_index (line 269) | def _init_step_index(self, timestep): method __len__ (line 277) | def __len__(self): FILE: modules/res4lyf/common_sigma_scheduler.py class CommonSigmaScheduler (line 28) | class CommonSigmaScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 37) | def __init__( method step_index (line 91) | def step_index(self) -> Optional[int]: method begin_index (line 95) | def begin_index(self) -> Optional[int]: method set_begin_index (line 98) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 101) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 188) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 194) | def add_noise( method scale_model_input (line 203) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 212) | def step( method _init_step_index (line 254) | def _init_step_index(self, timestep): method __len__ (line 262) | def __len__(self): FILE: modules/res4lyf/deis_scheduler_alt.py function get_def_integral_2 (line 11) | def get_def_integral_2(a, b, start, end, c): function get_def_integral_3 (line 16) | def get_def_integral_3(a, b, c, start, end, d): class RESDEISMultistepScheduler (line 21) | class RESDEISMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 30) | def __init__( method set_timesteps (line 87) | def set_timesteps( method step_index (line 212) | def step_index(self): method index_for_timestep (line 218) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 224) | def _init_step_index(self, timestep): method scale_model_input (line 228) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 236) | def step( method add_noise (line 393) | def add_noise( method __len__ (line 402) | def __len__(self): FILE: modules/res4lyf/etdrk_scheduler.py class ETDRKScheduler (line 29) | class ETDRKScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 38) | def __init__( method step_index (line 90) | def step_index(self) -> Optional[int]: method begin_index (line 94) | def begin_index(self) -> Optional[int]: method set_begin_index (line 97) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 100) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 159) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 165) | def add_noise( method scale_model_input (line 174) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 183) | def step( method _init_step_index (line 276) | def _init_step_index(self, timestep): method __len__ (line 284) | def __len__(self): FILE: modules/res4lyf/gauss_legendre_scheduler.py class GaussLegendreScheduler (line 9) | class GaussLegendreScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 19) | def __init__( method _get_tableau (line 72) | def _get_tableau(self): method set_timesteps (line 147) | def set_timesteps( method step_index (line 233) | def step_index(self): method index_for_timestep (line 239) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 245) | def _init_step_index(self, timestep): method scale_model_input (line 251) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 259) | def step( method add_noise (line 374) | def add_noise( method __len__ (line 383) | def __len__(self): FILE: modules/res4lyf/langevin_dynamics_scheduler.py class LangevinDynamicsScheduler (line 28) | class LangevinDynamicsScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 37) | def __init__( method step_index (line 88) | def step_index(self) -> Optional[int]: method begin_index (line 92) | def begin_index(self) -> Optional[int]: method set_begin_index (line 95) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 98) | def set_timesteps( method index_for_timestep (line 175) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 181) | def add_noise( method scale_model_input (line 190) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 199) | def step( method _init_step_index (line 240) | def _init_step_index(self, timestep): method __len__ (line 248) | def __len__(self): FILE: modules/res4lyf/lawson_scheduler.py class LawsonScheduler (line 27) | class LawsonScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 36) | def __init__( method step_index (line 88) | def step_index(self) -> Optional[int]: method begin_index (line 92) | def begin_index(self) -> Optional[int]: method set_begin_index (line 95) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 98) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 157) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 163) | def add_noise( method scale_model_input (line 172) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 181) | def step( method _init_step_index (line 268) | def _init_step_index(self, timestep): method __len__ (line 276) | def __len__(self): FILE: modules/res4lyf/linear_rk_scheduler.py class LinearRKScheduler (line 9) | class LinearRKScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 19) | def __init__( method _get_tableau (line 72) | def _get_tableau(self): method set_timesteps (line 103) | def set_timesteps( method step_index (line 189) | def step_index(self): method index_for_timestep (line 195) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 201) | def _init_step_index(self, timestep): method scale_model_input (line 207) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 215) | def step( method add_noise (line 311) | def add_noise( method __len__ (line 320) | def __len__(self): FILE: modules/res4lyf/lobatto_scheduler.py class LobattoScheduler (line 10) | class LobattoScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 20) | def __init__( method _get_tableau (line 73) | def _get_tableau(self): method set_timesteps (line 103) | def set_timesteps( method step_index (line 189) | def step_index(self): method index_for_timestep (line 195) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 201) | def _init_step_index(self, timestep): method scale_model_input (line 207) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 215) | def step( method add_noise (line 311) | def add_noise( method __len__ (line 320) | def __len__(self): FILE: modules/res4lyf/pec_scheduler.py class PECScheduler (line 29) | class PECScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 38) | def __init__( method step_index (line 90) | def step_index(self) -> Optional[int]: method begin_index (line 94) | def begin_index(self) -> Optional[int]: method set_begin_index (line 97) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 100) | def set_timesteps( method index_for_timestep (line 165) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 171) | def add_noise( method scale_model_input (line 180) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 188) | def step( method _init_step_index (line 268) | def _init_step_index(self, timestep): method __len__ (line 274) | def __len__(self): FILE: modules/res4lyf/phi_functions.py function calculate_gamma (line 27) | def calculate_gamma(c2: float, c3: float) -> float: function _torch_factorial (line 32) | def _torch_factorial(n: int) -> float: function phi_standard_torch (line 36) | def phi_standard_torch(j: int, neg_h: torch.Tensor) -> torch.Tensor: function phi_mpmath_series (line 70) | def phi_mpmath_series(j: int, neg_h: float) -> float: class Phi (line 86) | class Phi: method __init__ (line 92) | def __init__(self, h: torch.Tensor, c: List[Union[float, mpf]], analyt... method __call__ (line 105) | def __call__(self, j: int, i: int = -1) -> Union[float, torch.Tensor]: FILE: modules/res4lyf/radau_iia_scheduler.py class RadauIIAScheduler (line 10) | class RadauIIAScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 20) | def __init__( method _get_tableau (line 73) | def _get_tableau(self): method set_timesteps (line 137) | def set_timesteps( method step_index (line 223) | def step_index(self): method index_for_timestep (line 229) | def index_for_timestep(self, timestep, schedule_timesteps=None): method scale_model_input (line 241) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method _init_step_index (line 251) | def _init_step_index(self, timestep): method step (line 257) | def step( method add_noise (line 354) | def add_noise( method __len__ (line 363) | def __len__(self): FILE: modules/res4lyf/res_multistep_scheduler.py class RESMultistepScheduler (line 29) | class RESMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 56) | def __init__( method step_index (line 105) | def step_index(self) -> Optional[int]: method begin_index (line 109) | def begin_index(self) -> Optional[int]: method set_begin_index (line 112) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 115) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 123) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 193) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 199) | def add_noise( method step (line 208) | def step( method _get_res_coefficients (line 383) | def _get_res_coefficients(self, rk_type, h, c2, c3): method _get_deis_coefficients (line 402) | def _get_deis_coefficients(self, order, sigma, sigma_next): method _init_step_index (line 444) | def _init_step_index(self, timestep): method __len__ (line 450) | def __len__(self): FILE: modules/res4lyf/res_multistep_sde_scheduler.py class RESMultistepSDEScheduler (line 28) | class RESMultistepSDEScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 45) | def __init__( method step_index (line 95) | def step_index(self) -> Optional[int]: method begin_index (line 99) | def begin_index(self) -> Optional[int]: method set_begin_index (line 102) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 105) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 114) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 173) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 179) | def add_noise( method step (line 188) | def step( method _get_res_coefficients (line 301) | def _get_res_coefficients(self, rk_type, h, c2, c3): method _init_step_index (line 321) | def _init_step_index(self, timestep): method __len__ (line 329) | def __len__(self): FILE: modules/res4lyf/res_singlestep_scheduler.py class RESSinglestepScheduler (line 27) | class RESSinglestepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 36) | def __init__( method step_index (line 81) | def step_index(self) -> Optional[int]: method begin_index (line 85) | def begin_index(self) -> Optional[int]: method set_begin_index (line 88) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 91) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 99) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 168) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 174) | def add_noise( method step (line 183) | def step( method _init_step_index (line 236) | def _init_step_index(self, timestep): method __len__ (line 242) | def __len__(self): FILE: modules/res4lyf/res_singlestep_sde_scheduler.py class RESSinglestepSDEScheduler (line 28) | class RESSinglestepSDEScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 37) | def __init__( method step_index (line 83) | def step_index(self) -> Optional[int]: method begin_index (line 87) | def begin_index(self) -> Optional[int]: method set_begin_index (line 90) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 93) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 102) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 158) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 164) | def add_noise( method step (line 173) | def step( method _init_step_index (line 230) | def _init_step_index(self, timestep): method __len__ (line 236) | def __len__(self): FILE: modules/res4lyf/res_unified_scheduler.py class RESUnifiedScheduler (line 11) | class RESUnifiedScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 22) | def __init__( method set_sigmas (line 72) | def set_sigmas(self, sigmas: torch.Tensor): method step_index (line 77) | def step_index(self) -> Optional[int]: method begin_index (line 81) | def begin_index(self) -> Optional[int]: method set_begin_index (line 84) | def set_begin_index(self, begin_index: int = 0) -> None: method scale_model_input (line 87) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method set_timesteps (line 95) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 165) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 171) | def add_noise( method _get_coefficients (line 180) | def _get_coefficients(self, sigma, sigma_next): method step (line 236) | def step( method _init_step_index (line 333) | def _init_step_index(self, timestep): method __len__ (line 341) | def __len__(self): FILE: modules/res4lyf/riemannian_flow_scheduler.py class RiemannianFlowScheduler (line 27) | class RiemannianFlowScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 36) | def __init__( method step_index (line 87) | def step_index(self) -> Optional[int]: method begin_index (line 91) | def begin_index(self) -> Optional[int]: method set_begin_index (line 94) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 97) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 190) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 196) | def add_noise( method scale_model_input (line 205) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 214) | def step( method _init_step_index (line 255) | def _init_step_index(self, timestep): method __len__ (line 263) | def __len__(self): FILE: modules/res4lyf/rungekutta_44s_scheduler.py class RungeKutta44Scheduler (line 9) | class RungeKutta44Scheduler(SchedulerMixin, ConfigMixin): method __init__ (line 20) | def __init__( method set_timesteps (line 72) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step_index (line 125) | def step_index(self): method index_for_timestep (line 131) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 139) | def _init_step_index(self, timestep): method scale_model_input (line 144) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 152) | def step( method add_noise (line 241) | def add_noise( method __len__ (line 250) | def __len__(self): FILE: modules/res4lyf/rungekutta_57s_scheduler.py class RungeKutta57Scheduler (line 9) | class RungeKutta57Scheduler(SchedulerMixin, ConfigMixin): method __init__ (line 18) | def __init__( method set_timesteps (line 72) | def set_timesteps( method step_index (line 163) | def step_index(self): method index_for_timestep (line 169) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 175) | def _init_step_index(self, timestep): method scale_model_input (line 181) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 189) | def step( method add_noise (line 289) | def add_noise( method __len__ (line 298) | def __len__(self): FILE: modules/res4lyf/rungekutta_67s_scheduler.py class RungeKutta67Scheduler (line 9) | class RungeKutta67Scheduler(SchedulerMixin, ConfigMixin): method __init__ (line 19) | def __init__( method set_timesteps (line 72) | def set_timesteps( method step_index (line 162) | def step_index(self): method index_for_timestep (line 168) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 174) | def _init_step_index(self, timestep): method scale_model_input (line 180) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 188) | def step( method add_noise (line 291) | def add_noise( method __len__ (line 300) | def __len__(self): FILE: modules/res4lyf/scheduler_utils.py function betas_for_alpha_bar (line 13) | def betas_for_alpha_bar( function rescale_zero_terminal_snr (line 40) | def rescale_zero_terminal_snr(betas: torch.Tensor) -> torch.Tensor: function get_sigmas_karras (line 54) | def get_sigmas_karras(n, sigma_min, sigma_max, rho=7.0, device="cpu", dt... function get_sigmas_exponential (line 61) | def get_sigmas_exponential(n, sigma_min, sigma_max, device="cpu", dtype:... function get_sigmas_beta (line 65) | def get_sigmas_beta(n, sigma_min, sigma_max, alpha=0.6, beta=0.6, device... function get_sigmas_flow (line 79) | def get_sigmas_flow(n, sigma_min, sigma_max, device="cpu", dtype: torch.... function apply_shift (line 84) | def apply_shift(sigmas, shift): function get_dynamic_shift (line 87) | def get_dynamic_shift(mu, base_shift, max_shift, base_seq_len, max_seq_l... function index_for_timestep (line 92) | def index_for_timestep(timestep, timesteps): function add_noise_to_sample (line 108) | def add_noise_to_sample( FILE: modules/res4lyf/simple_exponential_scheduler.py class SimpleExponentialScheduler (line 27) | class SimpleExponentialScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 36) | def __init__( method step_index (line 88) | def step_index(self) -> Optional[int]: method begin_index (line 92) | def begin_index(self) -> Optional[int]: method set_begin_index (line 95) | def set_begin_index(self, begin_index: int = 0) -> None: method set_timesteps (line 98) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method index_for_timestep (line 140) | def index_for_timestep(self, timestep, schedule_timesteps=None): method add_noise (line 146) | def add_noise( method scale_model_input (line 155) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 164) | def step( method _init_step_index (line 205) | def _init_step_index(self, timestep): method __len__ (line 213) | def __len__(self): FILE: modules/res4lyf/specialized_rk_scheduler.py class SpecializedRKScheduler (line 10) | class SpecializedRKScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 20) | def __init__( method _get_tableau (line 73) | def _get_tableau(self): method set_timesteps (line 107) | def set_timesteps( method step_index (line 196) | def step_index(self): method index_for_timestep (line 202) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 208) | def _init_step_index(self, timestep): method scale_model_input (line 214) | def scale_model_input(self, sample: torch.Tensor, timestep: Union[floa... method step (line 222) | def step( method add_noise (line 335) | def add_noise( method __len__ (line 344) | def __len__(self): FILE: modules/res4lyf/variants.py class RESUnified2MScheduler (line 25) | class RESUnified2MScheduler(RESUnifiedScheduler): method __init__ (line 26) | def __init__(self, **kwargs): class RESUnified3MScheduler (line 31) | class RESUnified3MScheduler(RESUnifiedScheduler): method __init__ (line 32) | def __init__(self, **kwargs): class RESUnified2SScheduler (line 37) | class RESUnified2SScheduler(RESUnifiedScheduler): method __init__ (line 38) | def __init__(self, **kwargs): class RESUnified3SScheduler (line 43) | class RESUnified3SScheduler(RESUnifiedScheduler): method __init__ (line 44) | def __init__(self, **kwargs): class RESUnified5SScheduler (line 49) | class RESUnified5SScheduler(RESUnifiedScheduler): method __init__ (line 50) | def __init__(self, **kwargs): class RESUnified6SScheduler (line 55) | class RESUnified6SScheduler(RESUnifiedScheduler): method __init__ (line 56) | def __init__(self, **kwargs): class DEISUnified1SScheduler (line 61) | class DEISUnified1SScheduler(RESUnifiedScheduler): method __init__ (line 62) | def __init__(self, **kwargs): class DEISUnified2MScheduler (line 67) | class DEISUnified2MScheduler(RESUnifiedScheduler): method __init__ (line 68) | def __init__(self, **kwargs): class DEISUnified3MScheduler (line 73) | class DEISUnified3MScheduler(RESUnifiedScheduler): method __init__ (line 74) | def __init__(self, **kwargs): class RES2MScheduler (line 80) | class RES2MScheduler(RESMultistepScheduler): method __init__ (line 81) | def __init__(self, **kwargs): class RES3MScheduler (line 86) | class RES3MScheduler(RESMultistepScheduler): method __init__ (line 87) | def __init__(self, **kwargs): class DEIS2MScheduler (line 92) | class DEIS2MScheduler(RESMultistepScheduler): method __init__ (line 93) | def __init__(self, **kwargs): class DEIS3MScheduler (line 98) | class DEIS3MScheduler(RESMultistepScheduler): method __init__ (line 99) | def __init__(self, **kwargs): class RES2MSDEScheduler (line 105) | class RES2MSDEScheduler(RESMultistepSDEScheduler): method __init__ (line 106) | def __init__(self, **kwargs): class RES3MSDEScheduler (line 111) | class RES3MSDEScheduler(RESMultistepSDEScheduler): method __init__ (line 112) | def __init__(self, **kwargs): class RES2SScheduler (line 118) | class RES2SScheduler(RESSinglestepScheduler): method __init__ (line 119) | def __init__(self, **kwargs): class RES3SScheduler (line 124) | class RES3SScheduler(RESSinglestepScheduler): method __init__ (line 125) | def __init__(self, **kwargs): class RES5SScheduler (line 130) | class RES5SScheduler(RESSinglestepScheduler): method __init__ (line 131) | def __init__(self, **kwargs): class RES6SScheduler (line 136) | class RES6SScheduler(RESSinglestepScheduler): method __init__ (line 137) | def __init__(self, **kwargs): class RES2SSDEScheduler (line 143) | class RES2SSDEScheduler(RESSinglestepSDEScheduler): method __init__ (line 144) | def __init__(self, **kwargs): class RES3SSDEScheduler (line 149) | class RES3SSDEScheduler(RESSinglestepSDEScheduler): method __init__ (line 150) | def __init__(self, **kwargs): class RES5SSDEScheduler (line 155) | class RES5SSDEScheduler(RESSinglestepSDEScheduler): method __init__ (line 156) | def __init__(self, **kwargs): class RES6SSDEScheduler (line 161) | class RES6SSDEScheduler(RESSinglestepSDEScheduler): method __init__ (line 162) | def __init__(self, **kwargs): class ETDRK2Scheduler (line 168) | class ETDRK2Scheduler(ETDRKScheduler): method __init__ (line 169) | def __init__(self, **kwargs): class ETDRK3AScheduler (line 174) | class ETDRK3AScheduler(ETDRKScheduler): method __init__ (line 175) | def __init__(self, **kwargs): class ETDRK3BScheduler (line 180) | class ETDRK3BScheduler(ETDRKScheduler): method __init__ (line 181) | def __init__(self, **kwargs): class ETDRK4Scheduler (line 186) | class ETDRK4Scheduler(ETDRKScheduler): method __init__ (line 187) | def __init__(self, **kwargs): class ETDRK4AltScheduler (line 192) | class ETDRK4AltScheduler(ETDRKScheduler): method __init__ (line 193) | def __init__(self, **kwargs): class Lawson2AScheduler (line 199) | class Lawson2AScheduler(LawsonScheduler): method __init__ (line 200) | def __init__(self, **kwargs): class Lawson2BScheduler (line 205) | class Lawson2BScheduler(LawsonScheduler): method __init__ (line 206) | def __init__(self, **kwargs): class Lawson4Scheduler (line 211) | class Lawson4Scheduler(LawsonScheduler): method __init__ (line 212) | def __init__(self, **kwargs): class ABNorsett2MScheduler (line 218) | class ABNorsett2MScheduler(ABNorsettScheduler): method __init__ (line 219) | def __init__(self, **kwargs): class ABNorsett3MScheduler (line 224) | class ABNorsett3MScheduler(ABNorsettScheduler): method __init__ (line 225) | def __init__(self, **kwargs): class ABNorsett4MScheduler (line 230) | class ABNorsett4MScheduler(ABNorsettScheduler): method __init__ (line 231) | def __init__(self, **kwargs): class PEC2H2SScheduler (line 237) | class PEC2H2SScheduler(PECScheduler): method __init__ (line 238) | def __init__(self, **kwargs): class PEC2H3SScheduler (line 243) | class PEC2H3SScheduler(PECScheduler): method __init__ (line 244) | def __init__(self, **kwargs): class FlowEuclideanScheduler (line 250) | class FlowEuclideanScheduler(RiemannianFlowScheduler): method __init__ (line 251) | def __init__(self, **kwargs): class FlowHyperbolicScheduler (line 256) | class FlowHyperbolicScheduler(RiemannianFlowScheduler): method __init__ (line 257) | def __init__(self, **kwargs): class FlowSphericalScheduler (line 262) | class FlowSphericalScheduler(RiemannianFlowScheduler): method __init__ (line 263) | def __init__(self, **kwargs): class FlowLorentzianScheduler (line 268) | class FlowLorentzianScheduler(RiemannianFlowScheduler): method __init__ (line 269) | def __init__(self, **kwargs): class SigmaSigmoidScheduler (line 275) | class SigmaSigmoidScheduler(CommonSigmaScheduler): method __init__ (line 276) | def __init__(self, **kwargs): class SigmaSineScheduler (line 281) | class SigmaSineScheduler(CommonSigmaScheduler): method __init__ (line 282) | def __init__(self, **kwargs): class SigmaEasingScheduler (line 287) | class SigmaEasingScheduler(CommonSigmaScheduler): method __init__ (line 288) | def __init__(self, **kwargs): class SigmaArcsineScheduler (line 293) | class SigmaArcsineScheduler(CommonSigmaScheduler): method __init__ (line 294) | def __init__(self, **kwargs): class SigmaSmoothScheduler (line 299) | class SigmaSmoothScheduler(CommonSigmaScheduler): method __init__ (line 300) | def __init__(self, **kwargs): class DEIS1MultistepScheduler (line 305) | class DEIS1MultistepScheduler(RESDEISMultistepScheduler): method __init__ (line 306) | def __init__(self, **kwargs): class DEIS2MultistepScheduler (line 310) | class DEIS2MultistepScheduler(RESDEISMultistepScheduler): method __init__ (line 311) | def __init__(self, **kwargs): class DEIS3MultistepScheduler (line 315) | class DEIS3MultistepScheduler(RESDEISMultistepScheduler): method __init__ (line 316) | def __init__(self, **kwargs): class LinearRKEulerScheduler (line 321) | class LinearRKEulerScheduler(LinearRKScheduler): method __init__ (line 322) | def __init__(self, **kwargs): class LinearRKHeunScheduler (line 326) | class LinearRKHeunScheduler(LinearRKScheduler): method __init__ (line 327) | def __init__(self, **kwargs): class LinearRK2Scheduler (line 331) | class LinearRK2Scheduler(LinearRKScheduler): method __init__ (line 332) | def __init__(self, **kwargs): class LinearRK3Scheduler (line 336) | class LinearRK3Scheduler(LinearRKScheduler): method __init__ (line 337) | def __init__(self, **kwargs): class LinearRK4Scheduler (line 341) | class LinearRK4Scheduler(LinearRKScheduler): method __init__ (line 342) | def __init__(self, **kwargs): class LinearRKRalsstonScheduler (line 346) | class LinearRKRalsstonScheduler(LinearRKScheduler): method __init__ (line 347) | def __init__(self, **kwargs): class LinearRKMidpointScheduler (line 351) | class LinearRKMidpointScheduler(LinearRKScheduler): method __init__ (line 352) | def __init__(self, **kwargs): class Lobatto2Scheduler (line 357) | class Lobatto2Scheduler(LobattoScheduler): method __init__ (line 358) | def __init__(self, **kwargs): class Lobatto3Scheduler (line 362) | class Lobatto3Scheduler(LobattoScheduler): method __init__ (line 363) | def __init__(self, **kwargs): class Lobatto4Scheduler (line 367) | class Lobatto4Scheduler(LobattoScheduler): method __init__ (line 368) | def __init__(self, **kwargs): class RadauIIA2Scheduler (line 373) | class RadauIIA2Scheduler(RadauIIAScheduler): method __init__ (line 374) | def __init__(self, **kwargs): class RadauIIA3Scheduler (line 378) | class RadauIIA3Scheduler(RadauIIAScheduler): method __init__ (line 379) | def __init__(self, **kwargs): class GaussLegendre2SScheduler (line 384) | class GaussLegendre2SScheduler(GaussLegendreScheduler): method __init__ (line 385) | def __init__(self, **kwargs): class GaussLegendre3SScheduler (line 389) | class GaussLegendre3SScheduler(GaussLegendreScheduler): method __init__ (line 390) | def __init__(self, **kwargs): class GaussLegendre4SScheduler (line 394) | class GaussLegendre4SScheduler(GaussLegendreScheduler): method __init__ (line 395) | def __init__(self, **kwargs): FILE: modules/rife/__init__.py function load (line 22) | def load(model_path: str = 'rife/flownet-v46.pkl'): function interpolate (line 35) | def interpolate(images: list, count: int = 2, scale: float = 1.0, pad: i... function interpolate_nchw (line 121) | def interpolate_nchw(images: list, count: int = 2, scale: float = 1.0): FILE: modules/rife/loss.py class EPE (line 9) | class EPE(nn.Module): method __init__ (line 10) | def __init__(self): method forward (line 13) | def forward(self, flow, gt, loss_mask): class Ternary (line 19) | class Ternary(nn.Module): method __init__ (line 20) | def __init__(self): method transform (line 29) | def transform(self, img): method rgb2gray (line 35) | def rgb2gray(self, rgb): method hamming (line 40) | def hamming(self, t1, t2): method valid_mask (line 45) | def valid_mask(self, t, padding): method forward (line 51) | def forward(self, img0, img1): class SOBEL (line 57) | class SOBEL(nn.Module): method __init__ (line 58) | def __init__(self): method forward (line 69) | def forward(self, pred, gt): class MeanShift (line 82) | class MeanShift(nn.Conv2d): method __init__ (line 83) | def __init__(self, data_mean, data_std, data_range=1, norm=True): class VGGPerceptualLoss (line 98) | class VGGPerceptualLoss(torch.nn.Module): method __init__ (line 99) | def __init__(self, rank=0): # pylint: disable=unused-argument method forward (line 108) | def forward(self, X, Y, indices=None): FILE: modules/rife/model_ifnet.py function conv (line 14) | def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dila... function conv_bn (line 21) | def conv_bn(in_planes, out_planes, kernel_size=3, stride=1, padding=1, d... class ResConv (line 29) | class ResConv(nn.Module): method __init__ (line 30) | def __init__(self, c, dilation=1): method forward (line 37) | def forward(self, x): class IFBlock (line 40) | class IFBlock(nn.Module): method __init__ (line 41) | def __init__(self, in_planes, c=64): method forward (line 62) | def forward(self, x, flow=None, scale=1): class IFNet (line 75) | class IFNet(nn.Module): method __init__ (line 76) | def __init__(self): method forward (line 85) | def forward( self, x, timestep=0.5, scale_list=[8, 4, 2, 1], training=... FILE: modules/rife/model_rife.py class RifeModel (line 9) | class RifeModel: method __init__ (line 10) | def __init__(self, local_rank=-1): method train (line 21) | def train(self): method eval (line 24) | def eval(self): method device (line 27) | def device(self): method load_model (line 31) | def load_model(self, model_file, rank=0): method save_model (line 43) | def save_model(self, model_file, rank=0): method inference (line 47) | def inference(self, img0, img1, timestep=0.5, scale=1.0): method update (line 53) | def update(self, imgs, gt, learning_rate=0, mul=1, training=True, flow... FILE: modules/rife/refine.py function conv (line 10) | def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dila... function conv_woact (line 17) | def conv_woact(in_planes, out_planes, kernel_size=3, stride=1, padding=1... function deconv (line 23) | def deconv(in_planes, out_planes, kernel_size=4, stride=2, padding=1): #... class Conv2 (line 30) | class Conv2(nn.Module): method __init__ (line 31) | def __init__(self, in_planes, out_planes, stride=2): method forward (line 36) | def forward(self, x): class Contextnet (line 42) | class Contextnet(nn.Module): method __init__ (line 43) | def __init__(self): method forward (line 50) | def forward(self, x, flow): class Unet (line 66) | class Unet(nn.Module): method __init__ (line 67) | def __init__(self): method forward (line 79) | def forward(self, img0, img1, warped_img0, warped_img1, mask, flow, c0... FILE: modules/rife/ssim.py function gaussian (line 7) | def gaussian(window_size, sigma): function create_window (line 12) | def create_window(window_size, channel=1): function create_window_3d (line 19) | def create_window_3d(window_size, channel=1): function ssim (line 27) | def ssim(img1, img2, window_size=11, window=None, size_average=True, ful... function ssim_matlab (line 72) | def ssim_matlab(img1, img2, window_size=11, window=None, size_average=Tr... function msssim (line 117) | def msssim(img1, img2, window_size=11, size_average=True, val_range=None... class SSIM (line 143) | class SSIM(torch.nn.Module): method __init__ (line 144) | def __init__(self, window_size=11, size_average=True, val_range=None): method forward (line 153) | def forward(self, img1, img2): class MSSSIM (line 166) | class MSSSIM(torch.nn.Module): method __init__ (line 167) | def __init__(self, window_size=11, size_average=True, channel=3): method forward (line 173) | def forward(self, img1, img2): FILE: modules/rife/warplayer.py function warp (line 8) | def warp(tenInput, tenFlow): FILE: modules/rocm.py function resolve_link (line 18) | def resolve_link(path_: str) -> str: function dirname (line 24) | def dirname(path_: str, r: int = 1) -> str: function spawn (line 30) | def spawn(command: Union[str, list[str]], cwd: os.PathLike = '.') -> str: function load_library_global (line 35) | def load_library_global(path_: str): class Environment (line 39) | class Environment: class ROCmEnvironment (line 44) | class ROCmEnvironment(Environment): method __init__ (line 47) | def __init__(self, path: str): class PythonPackageEnvironment (line 52) | class PythonPackageEnvironment(Environment): method __init__ (line 55) | def __init__(self, rocm_sdk_module: ModuleType): class MicroArchitecture (line 65) | class MicroArchitecture(Enum): class Agent (line 71) | class Agent: method parse_gfx_version (line 79) | def parse_gfx_version(name: str) -> int: method __init__ (line 94) | def __init__(self, name: str): ... method __init__ (line 96) | def __init__(self, device: 'torch.types.Device'): ... method __init__ (line 98) | def __init__(self, arg): method __str__ (line 115) | def __str__(self) -> str: method therock (line 119) | def therock(self) -> Union[str, None]: method get_gfx_version (line 144) | def get_gfx_version(self) -> Union[str, None]: function find (line 156) | def find() -> Union[ROCmEnvironment, None]: function get_version (line 208) | def get_version() -> str: function get_flash_attention_command (line 230) | def get_flash_attention_command(agent: Agent) -> str: function refresh (line 239) | def refresh(): function get_agents (line 266) | def get_agents() -> list[Agent]: function postinstall (line 279) | def postinstall(): function rocm_init (line 292) | def rocm_init(): function get_agents (line 344) | def get_agents() -> list[Agent]: function postinstall (line 353) | def postinstall(): function rocm_init (line 365) | def rocm_init(): FILE: modules/rocm_triton_windows.py class DeviceProperties (line 37) | class DeviceProperties: method __init__ (line 44) | def __init__(self, props: torch._C._CudaDeviceProperties): method __getattr__ (line 47) | def __getattr__(self, name): function torch_cuda__get_device_properties (line 53) | def torch_cuda__get_device_properties(device): function torch__C__cuda_getCurrentRawStream (line 57) | def torch__C__cuda_getCurrentRawStream(device): function get_default_agent (line 61) | def get_default_agent() -> Union[Agent, None]: function apply_triton_patches (line 68) | def apply_triton_patches(): FILE: modules/safe.py function encode (line 16) | def encode(*args): class RestrictedUnpickler (line 21) | class RestrictedUnpickler(pickle.Unpickler): method persistent_load (line 24) | def persistent_load(self, pid): method find_class (line 31) | def find_class(self, module, name): function check_zip_filenames (line 68) | def check_zip_filenames(filename, names): function check_pt (line 76) | def check_pt(filename, extra_handler): function load (line 104) | def load(filename, *args, **kwargs): function load_with_extra (line 108) | def load_with_extra(filename, extra_handler=None, *args, **kwargs): # py... class Extra (line 142) | class Extra: method __init__ (line 162) | def __init__(self, handler): method __enter__ (line 165) | def __enter__(self): method __exit__ (line 171) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: modules/schedulers/perflow/pfode_solver.py class PFODESolver (line 5) | class PFODESolver(): method __init__ (line 6) | def __init__(self, scheduler, t_initial=1, t_terminal=0,) -> None: method get_timesteps (line 15) | def get_timesteps(self, t_start, t_end, num_steps): method solve (line 29) | def solve(self, class PFODESolverSDXL (line 121) | class PFODESolverSDXL(): method __init__ (line 122) | def __init__(self, scheduler, t_initial=1, t_terminal=0,) -> None: method get_timesteps (line 132) | def get_timesteps(self, t_start, t_end, num_steps): method _get_add_time_ids (line 146) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method solve (line 152) | def solve(self, FILE: modules/schedulers/perflow/scheduler_perflow.py class Time_Windows (line 28) | class Time_Windows(): method __init__ (line 29) | def __init__(self, t_initial=1, t_terminal=0, num_windows=4, precision... method get_window (line 37) | def get_window(self, tp): method lookup_window (line 44) | def lookup_window(self, timepoint): class PeRFlowSchedulerOutput (line 62) | class PeRFlowSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 80) | def betas_for_alpha_bar( class PeRFlowScheduler (line 125) | class PeRFlowScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 156) | def __init__( method scale_model_input (line 201) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 219) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method get_window_alpha (line 249) | def get_window_alpha(self, timepoints): method step (line 268) | def step( method add_noise (line 344) | def add_noise( method __len__ (line 367) | def __len__(self): FILE: modules/schedulers/perflow/utils_perflow.py function merge_delta_weights_into_unet (line 10) | def merge_delta_weights_into_unet(pipe, delta_weights): function load_delta_weights_into_unet (line 21) | def load_delta_weights_into_unet( function load_dreambooth_into_pipeline (line 60) | def load_dreambooth_into_pipeline(pipe, sd_dreambooth): FILE: modules/schedulers/scheduler_bdia.py class DDIMSchedulerOutput (line 33) | class DDIMSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 51) | def betas_for_alpha_bar( function rescale_zero_terminal_snr (line 95) | def rescale_zero_terminal_snr(betas): class BDIA_DDIMScheduler (line 130) | class BDIA_DDIMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 184) | def __init__( method scale_model_input (line 240) | def scale_model_input(self, sample: torch.Tensor, timestep: Optional[i... method _get_variance (line 257) | def _get_variance(self, timestep, prev_timestep): method _threshold_sample (line 268) | def _threshold_sample(self, sample: torch.Tensor) -> torch.Tensor: method set_timesteps (line 301) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method step (line 346) | def step( method add_noise (line 500) | def add_noise( method get_velocity (line 527) | def get_velocity(self, sample: torch.Tensor, noise: torch.Tensor, time... method update_next_sample_BDIA (line 546) | def update_next_sample_BDIA(self, new_value): method __len__ (line 550) | def __len__(self): FILE: modules/schedulers/scheduler_dc.py function betas_for_alpha_bar (line 33) | def betas_for_alpha_bar( class DCSolverMultistepScheduler (line 77) | class DCSolverMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 143) | def __init__( method step_index (line 226) | def step_index(self): method set_timesteps (line 232) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method _threshold_sample (line 298) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method _sigma_to_t (line 332) | def _sigma_to_t(self, sigma, log_sigmas): method _sigma_to_alpha_sigma_t (line 356) | def _sigma_to_alpha_sigma_t(self, sigma): method _convert_to_karras (line 363) | def _convert_to_karras(self, in_sigmas: torch.FloatTensor, num_inferen... method convert_model_output (line 376) | def convert_model_output( method multistep_uni_p_bh_update (line 447) | def multistep_uni_p_bh_update( method multistep_uni_c_bh_update (line 576) | def multistep_uni_c_bh_update( method _init_step_index (line 713) | def _init_step_index(self, timestep): method dynamic_compensation (line 732) | def dynamic_compensation(self, model_prev_list, t_prev_list, ratio): method find_optim_ratio (line 754) | def find_optim_ratio(self, sample, ratio_initial=1.0): method cascade_polynomial_regression (line 824) | def cascade_polynomial_regression(self, test_CFG, test_NFE, cpr_path): method step (line 862) | def step(self, *args, **kwargs): method _step_search (line 869) | def _step_search( method _step (line 961) | def _step( method scale_model_input (line 1049) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method add_noise (line 1065) | def add_noise( method __len__ (line 1091) | def __len__(self): FILE: modules/schedulers/scheduler_dpm_flowmatch.py class BatchedBrownianTree (line 18) | class BatchedBrownianTree: method __init__ (line 21) | def __init__(self, x, t0, t1, seed=None, **kwargs): method sort (line 50) | def sort(a, b): method __call__ (line 53) | def __call__(self, t0, t1): class BrownianTreeNoiseSampler (line 58) | class BrownianTreeNoiseSampler: method __init__ (line 73) | def __init__(self, x, sigma_min, sigma_max, seed=None, transform=lambd... method __call__ (line 78) | def __call__(self, sigma, sigma_next): class FlowMatchDPMSolverMultistepSchedulerOutput (line 83) | class FlowMatchDPMSolverMultistepSchedulerOutput(BaseOutput): class FlowMatchDPMSolverMultistepScheduler (line 95) | class FlowMatchDPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 147) | def __init__( method step_index (line 204) | def step_index(self): method begin_index (line 211) | def begin_index(self): method set_begin_index (line 217) | def set_begin_index(self, begin_index: int = 0): method time_shift (line 227) | def time_shift(self, mu: float, sigma: float, t: torch.FloatTensor): method set_timesteps (line 230) | def set_timesteps(self, method _convert_to_beta (line 379) | def _convert_to_beta(self, sigma_min, sigma_max, num_inference_steps, ... method _convert_to_lu (line 392) | def _convert_to_lu(self, in_lambdas: torch.Tensor, num_inference_steps... method _convert_to_karras (line 406) | def _convert_to_karras(self, sigma_min, sigma_max, num_inference_steps... method _convert_to_exponential (line 414) | def _convert_to_exponential(self, sigma_min, sigma_max, num_inference_... method index_for_timestep (line 418) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 432) | def _init_step_index(self, timestep): method step (line 440) | def step( method scale_model_input (line 809) | def scale_model_input(self, sample: torch.FloatTensor, *args, **kwargs... method scale_noise (line 824) | def scale_noise( method __len__ (line 872) | def __len__(self): FILE: modules/schedulers/scheduler_flashflow.py class FlashFlowMatchEulerDiscreteSchedulerOutput (line 33) | class FlashFlowMatchEulerDiscreteSchedulerOutput(BaseOutput): class FlashFlowMatchEulerDiscreteScheduler (line 46) | class FlashFlowMatchEulerDiscreteScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 67) | def __init__( method step_index (line 107) | def step_index(self): method begin_index (line 114) | def begin_index(self): method set_begin_index (line 121) | def set_begin_index(self, begin_index: int = 0): method scale_noise (line 131) | def scale_noise( method _sigma_to_t (line 179) | def _sigma_to_t(self, sigma): method time_shift (line 182) | def time_shift(self, mu: float, sigma: float, t: torch.Tensor): method set_timesteps (line 185) | def set_timesteps( method index_for_timestep (line 244) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 258) | def _init_step_index(self, timestep): method scale_model_input (line 266) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method step (line 282) | def step( method _convert_to_karras (line 366) | def _convert_to_karras(self, in_sigmas: torch.Tensor, num_inference_st... method _convert_to_exponential (line 391) | def _convert_to_exponential(self, in_sigmas: torch.Tensor, num_inferen... method _convert_to_beta (line 412) | def _convert_to_beta( method __len__ (line 442) | def __len__(self): FILE: modules/schedulers/scheduler_tcd.py class TCDSchedulerOutput (line 38) | class TCDSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 55) | def betas_for_alpha_bar( function rescale_zero_terminal_snr (line 100) | def rescale_zero_terminal_snr(betas: torch.FloatTensor) -> torch.FloatTe... class TCDScheduler (line 136) | class TCDScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 200) | def __init__( method _init_step_index (line 257) | def _init_step_index(self, timestep): method step_index (line 275) | def step_index(self): method scale_model_input (line 278) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method _get_variance (line 294) | def _get_variance(self, timestep, prev_timestep): method _threshold_sample (line 305) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method set_timesteps (line 338) | def set_timesteps( method step (line 495) | def step( method add_noise (line 598) | def add_noise( method get_velocity (line 622) | def get_velocity( method __len__ (line 642) | def __len__(self): method previous_timestep (line 646) | def previous_timestep(self, timestep): FILE: modules/schedulers/scheduler_tdd.py class TDDScheduler (line 16) | class TDDScheduler(DPMSolverSinglestepScheduler): method __init__ (line 18) | def __init__( method set_timesteps (line 101) | def set_timesteps(self, num_inference_steps: int, device: Union[str, t... method set_timesteps_s (line 173) | def set_timesteps_s(self, eta: float = 0.0): method step (line 222) | def step( method dpm_solver_first_order_update (line 281) | def dpm_solver_first_order_update( method singlestep_dpm_solver_second_order_update (line 320) | def singlestep_dpm_solver_second_order_update( method singlestep_dpm_solver_update (line 396) | def singlestep_dpm_solver_update( method convert_model_output (line 437) | def convert_model_output( FILE: modules/schedulers/scheduler_ufogen.py class UFOGenSchedulerOutput (line 35) | class UFOGenSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 53) | def betas_for_alpha_bar( function rescale_zero_terminal_snr (line 98) | def rescale_zero_terminal_snr(betas): class UFOGenScheduler (line 134) | class UFOGenScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 192) | def __init__( method scale_model_input (line 248) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method set_timesteps (line 265) | def set_timesteps( method _threshold_sample (line 345) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method step (line 378) | def step( method add_noise (line 462) | def add_noise( method get_velocity (line 486) | def get_velocity( method __len__ (line 506) | def __len__(self): method previous_timestep (line 510) | def previous_timestep(self, timestep): FILE: modules/schedulers/scheduler_unipc_flowmatch.py class FlowUniPCMultistepScheduler (line 17) | class FlowUniPCMultistepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 74) | def __init__( method step_index (line 133) | def step_index(self): method begin_index (line 140) | def begin_index(self): method set_begin_index (line 147) | def set_begin_index(self, begin_index: int = 0): method set_timesteps (line 158) | def set_timesteps( method _threshold_sample (line 228) | def _threshold_sample(self, sample: torch.Tensor) -> torch.Tensor: method _sigma_to_t (line 267) | def _sigma_to_t(self, sigma): method _sigma_to_alpha_sigma_t (line 270) | def _sigma_to_alpha_sigma_t(self, sigma): method time_shift (line 274) | def time_shift(self, mu: float, sigma: float, t: torch.Tensor): method convert_model_output (line 277) | def convert_model_output( method multistep_uni_p_bh_update (line 348) | def multistep_uni_p_bh_update( method multistep_uni_c_bh_update (line 484) | def multistep_uni_c_bh_update( method index_for_timestep (line 626) | def index_for_timestep(self, timestep, schedule_timesteps=None): method _init_step_index (line 641) | def _init_step_index(self, timestep): method step (line 653) | def step(self, method scale_model_input (line 739) | def scale_model_input(self, sample: torch.Tensor, *args, method add_noise (line 756) | def add_noise( method __len__ (line 797) | def __len__(self): FILE: modules/schedulers/scheduler_vdm.py function log_snr (line 32) | def log_snr(t: torch.Tensor, beta_schedule: str) -> torch.Tensor: class VDMSchedulerOutput (line 68) | class VDMSchedulerOutput(BaseOutput): class VDMScheduler (line 85) | class VDMScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 123) | def __init__( method log_snr (line 154) | def log_snr(self, timesteps: torch.Tensor) -> torch.Tensor: method get_timesteps (line 174) | def get_timesteps(self, num_steps: Optional[int] = None) -> np.ndarray: method set_timesteps (line 200) | def set_timesteps(self, num_inference_steps: int, device: Optional[Uni... method _threshold_sample (line 247) | def _threshold_sample(self, sample: torch.Tensor) -> torch.Tensor: method scale_model_input (line 281) | def scale_model_input(self, sample: torch.Tensor, timestep: Optional[i... method step (line 298) | def step( method add_noise (line 389) | def add_noise(self, original_samples: torch.Tensor, noise: torch.Tenso... method get_velocity (line 413) | def get_velocity(self, sample: torch.Tensor, noise: torch.Tensor, time... method __len__ (line 423) | def __len__(self) -> int: FILE: modules/script_callbacks.py function report_exception (line 11) | def report_exception(e, c, job): class ImageSaveParams (line 15) | class ImageSaveParams: method __init__ (line 16) | def __init__(self, image, p, filename, pnginfo): class ExtraNoiseParams (line 30) | class ExtraNoiseParams: method __init__ (line 31) | def __init__(self, noise, x, xi): class CFGDenoiserParams (line 42) | class CFGDenoiserParams: method __init__ (line 43) | def __init__(self, x, image_cond, sigma, sampling_step, total_sampling... class CFGDenoisedParams (line 66) | class CFGDenoisedParams: method __init__ (line 67) | def __init__(self, x, sampling_step, total_sampling_steps, inner_model): class AfterCFGCallbackParams (line 81) | class AfterCFGCallbackParams: method __init__ (line 82) | def __init__(self, x, sampling_step, total_sampling_steps): class UiTrainTabParams (line 93) | class UiTrainTabParams: method __init__ (line 94) | def __init__(self, txt2img_preview_params): class ImageGridLoopParams (line 98) | class ImageGridLoopParams: method __init__ (line 99) | def __init__(self, imgs, cols, rows): function timer (line 130) | def timer(t0: float, script, callback: str): function print_timers (line 138) | def print_timers(): function clear_callbacks (line 147) | def clear_callbacks(): function app_started_callback (line 152) | def app_started_callback(demo: Optional[Blocks], app: FastAPI): function before_process_callback (line 162) | def before_process_callback(p): function after_process_callback (line 172) | def after_process_callback(p): function app_reload_callback (line 182) | def app_reload_callback(): function model_loaded_callback (line 192) | def model_loaded_callback(sd_model): function ui_tabs_callback (line 202) | def ui_tabs_callback(): function ui_settings_callback (line 214) | def ui_settings_callback(): function before_image_saved_callback (line 224) | def before_image_saved_callback(params: ImageSaveParams): function image_saved_callback (line 234) | def image_saved_callback(params: ImageSaveParams): function image_save_btn_callback (line 244) | def image_save_btn_callback(filename: str): function extra_noise_callback (line 254) | def extra_noise_callback(params: ExtraNoiseParams): function cfg_denoiser_callback (line 262) | def cfg_denoiser_callback(params: CFGDenoiserParams): function cfg_denoised_callback (line 272) | def cfg_denoised_callback(params: CFGDenoisedParams): function cfg_after_cfg_callback (line 282) | def cfg_after_cfg_callback(params: AfterCFGCallbackParams): function before_component_callback (line 292) | def before_component_callback(component, **kwargs): function after_component_callback (line 302) | def after_component_callback(component, **kwargs): function image_grid_callback (line 312) | def image_grid_callback(params: ImageGridLoopParams): function infotext_pasted_callback (line 322) | def infotext_pasted_callback(infotext: str, params: Dict[str, Any]): function script_unloaded_callback (line 332) | def script_unloaded_callback(): function before_ui_callback (line 342) | def before_ui_callback(): function after_ui_callback (line 352) | def after_ui_callback(): function add_callback (line 362) | def add_callback(callbacks, fun): function remove_current_script_callbacks (line 369) | def remove_current_script_callbacks(): function remove_callbacks_for_function (line 380) | def remove_callbacks_for_function(callback_func): function on_app_started (line 386) | def on_app_started(callback): function on_before_process (line 392) | def on_before_process(callback): function on_after_process (line 397) | def on_after_process(callback): function on_before_reload (line 402) | def on_before_reload(callback): function on_model_loaded (line 407) | def on_model_loaded(callback): function on_ui_tabs (line 413) | def on_ui_tabs(callback): function on_ui_settings (line 426) | def on_ui_settings(callback): function on_before_image_saved (line 432) | def on_before_image_saved(callback): function on_image_saved (line 440) | def on_image_saved(callback): function on_image_save_btn (line 448) | def on_image_save_btn(callback): function on_extra_noise (line 456) | def on_extra_noise(callback): function on_cfg_denoiser (line 464) | def on_cfg_denoiser(callback): function on_cfg_denoised (line 472) | def on_cfg_denoised(callback): function on_cfg_after_cfg (line 480) | def on_cfg_after_cfg(callback): function on_before_component (line 488) | def on_before_component(callback): function on_after_component (line 500) | def on_after_component(callback): function on_image_grid (line 505) | def on_image_grid(callback): function on_infotext_pasted (line 513) | def on_infotext_pasted(callback): function on_script_unloaded (line 522) | def on_script_unloaded(callback): function on_before_ui (line 529) | def on_before_ui(callback): function on_after_ui (line 534) | def on_after_ui(callback): FILE: modules/script_loading.py function load_module (line 13) | def load_module(path): function preload_extensions (line 38) | def preload_extensions(extensions_dir, parser): FILE: modules/scripts.py function register_runners (line 13) | def register_runners(): FILE: modules/scripts_auto_postprocessing.py class ScriptPostprocessingForMainUI (line 4) | class ScriptPostprocessingForMainUI(scripts_manager.Script): method __init__ (line 5) | def __init__(self, script_postproc): method title (line 9) | def title(self): method show (line 12) | def show(self, is_img2img): # pylint: disable=unused-argument method ui (line 15) | def ui(self, is_img2img): # pylint: disable=unused-argument method postprocess_image (line 19) | def postprocess_image(self, p, script_pp, *args): # pylint: disable=ar... function create_auto_preprocessing_script_data (line 28) | def create_auto_preprocessing_script_data(): FILE: modules/scripts_manager.py class PostprocessImageArgs (line 18) | class PostprocessImageArgs: method __init__ (line 19) | def __init__(self, image): class PostprocessBatchListArgs (line 23) | class PostprocessBatchListArgs: method __init__ (line 24) | def __init__(self, images): class OnComponent (line 29) | class OnComponent: class Script (line 33) | class Script: method title (line 51) | def title(self): method ui (line 55) | def ui(self, is_img2img): method show (line 62) | def show(self, is_img2img): # pylint: disable=unused-argument method run (line 72) | def run(self, p, *args): method setup (line 82) | def setup(self, p, *args): method before_process (line 88) | def before_process(self, p, *args): method process (line 96) | def process(self, p, *args): method process_images (line 104) | def process_images(self, p, *args): method before_process_batch (line 112) | def before_process_batch(self, p, *args, **kwargs): method process_batch (line 124) | def process_batch(self, p, *args, **kwargs): method postprocess_batch (line 135) | def postprocess_batch(self, p, *args, **kwargs): method postprocess_image (line 144) | def postprocess_image(self, p, pp: PostprocessImageArgs, *args): method postprocess_batch_list (line 150) | def postprocess_batch_list(self, p, pp: PostprocessBatchListArgs, *arg... method postprocess (line 166) | def postprocess(self, p, processed, *args): method before_component (line 173) | def before_component(self, component, **kwargs): method after_component (line 182) | def after_component(self, component, **kwargs): method describe (line 188) | def describe(self): method elem_id (line 192) | def elem_id(self, item_id): function basedir (line 201) | def basedir(): function list_scripts (line 215) | def list_scripts(scriptdirname, extension): function list_files_with_name (line 248) | def list_files_with_name(filename): function load_scripts (line 260) | def load_scripts(): function wrap_call (line 303) | def wrap_call(func, filename, funcname, *args, default=None, **kwargs): class ScriptSummary (line 312) | class ScriptSummary: method __init__ (line 313) | def __init__(self, op): method record (line 319) | def record(self, script): method report (line 323) | def report(self): class ScriptRunner (line 331) | class ScriptRunner: method __init__ (line 332) | def __init__(self, name=''): method add_script (line 347) | def add_script(self, script_class, path, is_img2img, is_control): method initialize_scripts (line 373) | def initialize_scripts(self, is_img2img=False, is_control=False): method prepare_ui (line 404) | def prepare_ui(self): method setup_ui (line 407) | def setup_ui(self, parent='unknown', accordion=True): method run (line 535) | def run(self, p, *args): method after (line 560) | def after(self, p, processed, *args): method before_process (line 578) | def before_process(self, p, **kwargs): method process (line 590) | def process(self, p, **kwargs): method process_images (line 602) | def process_images(self, p, **kwargs): method before_process_batch (line 618) | def before_process_batch(self, p, **kwargs): method process_batch (line 630) | def process_batch(self, p, **kwargs): method postprocess (line 642) | def postprocess(self, p, processed): method postprocess_batch (line 654) | def postprocess_batch(self, p, images, **kwargs): method postprocess_batch_list (line 666) | def postprocess_batch_list(self, p, pp: PostprocessBatchListArgs, **kw... method postprocess_image (line 678) | def postprocess_image(self, p, pp: PostprocessImageArgs): method before_component (line 690) | def before_component(self, component, **kwargs): method after_component (line 700) | def after_component(self, component, **kwargs): method reload_sources (line 716) | def reload_sources(self, cache): function reload_script_body_only (line 745) | def reload_script_body_only(): FILE: modules/scripts_postprocessing.py class PostprocessedImage (line 6) | class PostprocessedImage: method __init__ (line 7) | def __init__(self, image, info = {}): class ScriptPostprocessing (line 12) | class ScriptPostprocessing: method ui (line 21) | def ui(self): method process (line 29) | def process(self, pp: PostprocessedImage, **args): method image_changed (line 36) | def image_changed(self): function wrap_call (line 40) | def wrap_call(func, filename, funcname, *args, default=None, **kwargs): class ScriptPostprocessingRunner (line 50) | class ScriptPostprocessingRunner: method __init__ (line 51) | def __init__(self): method initialize_scripts (line 55) | def initialize_scripts(self, scripts_data): method create_script_ui (line 64) | def create_script_ui(self, script, inputs): method scripts_in_preferred_order (line 73) | def scripts_in_preferred_order(self): method setup_ui (line 88) | def setup_ui(self): method run (line 97) | def run(self, pp: PostprocessedImage, args): method create_args_for_run (line 108) | def create_args_for_run(self, scripts_args): method image_changed (line 121) | def image_changed(self): method postprocess (line 125) | def postprocess(self, filenames, args): FILE: modules/sd_checkpoint.py class CheckpointInfo (line 24) | class CheckpointInfo: method __init__ (line 25) | def __init__(self, filename, sha=None, subfolder=None): method register (line 92) | def register(self): method calculate_shorthash (line 98) | def calculate_shorthash(self): method __str__ (line 109) | def __str__(self): function setup_model (line 113) | def setup_model(): function checkpoint_titles (line 119) | def checkpoint_titles(use_short=False): function list_models (line 131) | def list_models(): function update_model_hashes (line 161) | def update_model_hashes(): function remove_hash (line 200) | def remove_hash(s): function get_closest_checkpoint_match (line 204) | def get_closest_checkpoint_match(s: str) -> CheckpointInfo: function model_hash (line 290) | def model_hash(filename): function select_checkpoint (line 306) | def select_checkpoint(op='model', sd_model_checkpoint=None): function init_metadata (line 333) | def init_metadata(): function extract_thumbnail (line 339) | def extract_thumbnail(filename, data): function read_metadata_from_safetensors (line 353) | def read_metadata_from_safetensors(filename): function scrub_dict (line 410) | def scrub_dict(dict_obj, keys): function write_metadata (line 423) | def write_metadata(): FILE: modules/sd_detect.py function guess_by_size (line 11) | def guess_by_size(fn, current_guess): function guess_by_name (line 47) | def guess_by_name(fn, current_guess): function guess_by_diffusers (line 157) | def guess_by_diffusers(fn, current_guess): function guess_variant (line 208) | def guess_variant(fn, current_guess): function detect_pipeline (line 225) | def detect_pipeline(f: str, op: str = 'model'): function get_load_config (line 263) | def get_load_config(model_file, model_type, config_type='yaml'): FILE: modules/sd_hijack.py function model_hijack (line 7) | def model_hijack(): # a111 compatibility item function register_buffer (line 11) | def register_buffer(self, name, attr): function fft_fftn (line 26) | def fft_fftn(input, s=None, dim=None, norm=None, *, out=None): # pylint:... function fft_ifftn (line 36) | def fft_ifftn(input, s=None, dim=None, norm=None, *, out=None): # pylint... function fourier_filter (line 47) | def fourier_filter(x_in, threshold, scale): class AutoencoderKLOutput (line 70) | class AutoencoderKLOutput(diffusers.utils.BaseOutput): FILE: modules/sd_hijack_accelerate.py function hijack_set_module_tensor (line 17) | def hijack_set_module_tensor( function hijack_set_module_tensor_simple (line 46) | def hijack_set_module_tensor_simple( function hijack_accelerate (line 74) | def hijack_accelerate(): function restore_accelerate (line 80) | def restore_accelerate(): function hijack_hfhub (line 84) | def hijack_hfhub(): function torch_conv_forward (line 90) | def torch_conv_forward(self, input, weight, bias): # pylint: disable=red... function hijack_torch_conv (line 97) | def hijack_torch_conv(): function restore_torch_conv (line 100) | def restore_torch_conv(): FILE: modules/sd_hijack_dynamic_atten.py function find_split_size (line 11) | def find_split_size(original_size: int, slice_block_size: int, slice_rat... function find_sdpa_slice_sizes (line 24) | def find_sdpa_slice_sizes(query_shape: Tuple[int], key_shape: Tuple[int]... function dynamic_scaled_dot_product_attention (line 58) | def dynamic_scaled_dot_product_attention(query: torch.FloatTensor, key: ... function find_bmm_slice_sizes (line 123) | def find_bmm_slice_sizes(query_shape, query_element_size, slice_rate=2, ... class DynamicAttnProcessorBMM (line 156) | class DynamicAttnProcessorBMM: method __call__ (line 165) | def __call__(self, attn, hidden_states: torch.Tensor, encoder_hidden_s... FILE: modules/sd_hijack_freeu.py function to_denoising_step (line 21) | def to_denoising_step(number, steps=None) -> int: function get_schedule_ratio (line 29) | def get_schedule_ratio(): function lerp (line 42) | def lerp(a, b, r): function free_u_cat_hijack (line 46) | def free_u_cat_hijack(hs, *args, original_function, **kwargs): function get_fft_device (line 77) | def get_fft_device(): function no_gpu_complex_support (line 94) | def no_gpu_complex_support(): function filter_skip (line 105) | def filter_skip(x, threshold, scale, scale_high): function ratio_to_region (line 127) | def ratio_to_region(width: float, offset: float, n: int): function apply_freeu (line 146) | def apply_freeu(p): FILE: modules/sd_hijack_hypertile.py function iterative_closest_divisors (line 26) | def iterative_closest_divisors(hw:int, aspect_ratio:float) -> tuple[int,... function find_hw_candidates (line 40) | def find_hw_candidates(hw:int, aspect_ratio:float) -> tuple[int, int]: function possible_tile_sizes (line 61) | def possible_tile_sizes(dimension: int, tile_size: int, min_tile_size: i... function parse_list (line 73) | def parse_list(x: list[int], /) -> str: function split_attention (line 80) | def split_attention(layer: nn.Module, tile_size: int=256, min_tile_size:... function context_hypertile_vae (line 177) | def context_hypertile_vae(p): function context_hypertile_unet (line 206) | def context_hypertile_unet(p): function hypertile_set (line 235) | def hypertile_set(p, hr=False): function set_resolution (line 246) | def set_resolution(p, hr=False): FILE: modules/sd_hijack_safetensors.py function hijacked_load_file (line 11) | def hijacked_load_file(checkpoint_file, device="cpu"): function hijacked_load_state_dict (line 29) | def hijacked_load_state_dict(checkpoint_file, is_quantized: bool = False... function hijack_safetensors (line 47) | def hijack_safetensors(_diffusers: bool = True, _transformers: bool = Tr... function restore_safetensors (line 54) | def restore_safetensors(): FILE: modules/sd_hijack_te.py function hijack_encode_prompt (line 6) | def hijack_encode_prompt(*args, **kwargs): function init_hijack (line 29) | def init_hijack(pipe): FILE: modules/sd_hijack_utils.py class CondFunc (line 3) | class CondFunc: method __new__ (line 4) | def __new__(cls, orig_func, sub_func, cond_func): method __init__ (line 20) | def __init__(self, orig_func, sub_func, cond_func): method __call__ (line 24) | def __call__(self, *args, **kwargs): FILE: modules/sd_hijack_vae.py function hijack_vae_upscale (line 10) | def hijack_vae_upscale(*args, **kwargs): function hijack_vae_decode (line 18) | def hijack_vae_decode(*args, **kwargs): function hijack_vae_encode (line 48) | def hijack_vae_encode(*args, **kwargs): function init_hijack (line 72) | def init_hijack(pipe): FILE: modules/sd_models.py function set_huggingface_options (line 62) | def set_huggingface_options(): function set_vae_options (line 74) | def set_vae_options(sd_model, vae=None, op:str='model', quiet:bool=False): function set_diffuser_options (line 129) | def set_diffuser_options(sd_model, vae=None, op:str='model', offload:boo... function move_model (line 185) | def move_model(model, device=None, force=False): function move_base (line 276) | def move_base(model, device): function load_diffuser_initial (line 291) | def load_diffuser_initial(diffusers_load_config, op='model'): function load_diffuser_force (line 311) | def load_diffuser_force(detected_model_type, checkpoint_info, diffusers_... function load_diffuser_folder (line 508) | def load_diffuser_folder(model_type, pipeline, checkpoint_info, diffuser... function load_diffuser_file (line 583) | def load_diffuser_file(model_type, pipeline, checkpoint_info, diffusers_... function load_sdnq_module (line 640) | def load_sdnq_module(fn: str, module_name: str, load_method: str): function load_sdnq_model (line 669) | def load_sdnq_model(checkpoint_info, pipeline, diffusers_load_config, op): function set_overrides (line 714) | def set_overrides(sd_model, checkpoint_info, model_type): function set_defaults (line 758) | def set_defaults(sd_model, checkpoint_info): function load_diffuser (line 775) | def load_diffuser(checkpoint_info=None, op='model', revision=None): # py... class DiffusersTaskType (line 944) | class DiffusersTaskType(Enum): function get_diffusers_task (line 952) | def get_diffusers_task(pipe: diffusers.DiffusionPipeline) -> DiffusersTa... function switch_pipe (line 970) | def switch_pipe(cls: type[diffusers.DiffusionPipeline] | str, pipeline: ... function clean_diffuser_pipe (line 1079) | def clean_diffuser_pipe(pipe): function copy_diffuser_options (line 1089) | def copy_diffuser_options(new_pipe, orig_pipe): function backup_pipe_components (line 1113) | def backup_pipe_components(pipe): function restore_pipe_components (line 1133) | def restore_pipe_components(pipe, components): function set_diffuser_pipe (line 1161) | def set_diffuser_pipe(pipe, new_pipe_type): function add_noise_pred_to_diffusers_callback (line 1258) | def add_noise_pred_to_diffusers_callback(pipe): function get_native (line 1279) | def get_native(pipe: diffusers.DiffusionPipeline): function reload_text_encoder (line 1291) | def reload_text_encoder(initial=False): function reload_model_weights (line 1311) | def reload_model_weights(sd_model=None, info=None, op='model', force=Fal... function clear_caches (line 1347) | def clear_caches(full:bool=False): function unload_model_weights (line 1360) | def unload_model_weights(op='model'): function hf_auth_check (line 1384) | def hf_auth_check(checkpoint_info, force:bool=False): function save_model (line 1406) | def save_model(name: str, path: str = None, shard: str = None, overwrite... FILE: modules/sd_models_compile.py class CompiledModelState (line 9) | class CompiledModelState: method __init__ (line 10) | def __init__(self): function ipex_optimize (line 30) | def ipex_optimize(sd_model, apply_to_components=True, op="Model"): function optimize_openvino (line 66) | def optimize_openvino(sd_model, clear_cache=True): function compile_onediff (line 85) | def compile_onediff(sd_model): function compile_stablefast (line 119) | def compile_stablefast(sd_model): function compile_torch (line 159) | def compile_torch(sd_model, apply_to_components=True, op="Model"): function check_deepcache (line 236) | def check_deepcache(enable: bool): function compile_deepcache (line 244) | def compile_deepcache(sd_model): function compile_diffusers (line 264) | def compile_diffusers(sd_model, apply_to_components=True, op="Model"): function openvino_recompile_model (line 281) | def openvino_recompile_model(p, hires=False, refiner=False): # recompile... function openvino_post_compile (line 319) | def openvino_post_compile(op="base"): # delete unet after OpenVINO compile FILE: modules/sd_models_utils.py class NoWatermark (line 15) | class NoWatermark: method apply_watermark (line 16) | def apply_watermark(self, img): function get_signature (line 20) | def get_signature(cls): function get_call (line 27) | def get_call(cls): function path_to_repo (line 34) | def path_to_repo(checkpoint_info): function convert_to_faketensors (line 54) | def convert_to_faketensors(tensor): function read_state_dict (line 65) | def read_state_dict(checkpoint_file, map_location=None, what:str='model'... function get_state_dict_from_checkpoint (line 96) | def get_state_dict_from_checkpoint(pl_sd): function patch_diffuser_config (line 121) | def patch_diffuser_config(sd_model, model_file): function apply_function_to_model (line 159) | def apply_function_to_model(sd_model, function, options, op=None): FILE: modules/sd_modules.py class ModuleStats (line 7) | class ModuleStats: method __init__ (line 15) | def __init__(self, module: str, cls: str, params: float, size: float, ... method __str__ (line 23) | def __str__(self): function get_signature (line 27) | def get_signature(cls): function get_module_stats (line 32) | def get_module_stats(name, module): function get_model_stats (line 47) | def get_model_stats(model, exclude=None): FILE: modules/sd_offload.py function dtype_byte_size (line 30) | def dtype_byte_size(dtype: torch.dtype): function get_signature (line 39) | def get_signature(cls): function disable_offload (line 44) | def disable_offload(sd_model): function set_accelerate (line 60) | def set_accelerate(sd_model): function apply_group_offload (line 77) | def apply_group_offload(sd_model, op:str='model'): function apply_model_offload (line 99) | def apply_model_offload(sd_model, op:str='model', quiet:bool=False): function apply_sequential_offload (line 116) | def apply_sequential_offload(sd_model, op:str='model', quiet:bool=False): function apply_none_offload (line 138) | def apply_none_offload(sd_model, op:str='model', quiet:bool=False): function set_diffuser_offload (line 153) | def set_diffuser_offload(sd_model, op:str='model', quiet:bool=False, for... class OffloadHook (line 183) | class OffloadHook(accelerate.hooks.ModelHook): method __init__ (line 184) | def __init__(self, checkpoint_name): method validate (line 207) | def validate(self): method model_size (line 222) | def model_size(self): method init_hook (line 225) | def init_hook(self, module): method offload_allowed (line 228) | def offload_allowed(self, module): method pre_forward (line 238) | def pre_forward(self, module, *args, **kwargs): method post_forward (line 301) | def post_forward(self, module, output): method detach_hook (line 308) | def detach_hook(self, module): function get_pipe_variants (line 312) | def get_pipe_variants(pipe=None): function get_module_names (line 328) | def get_module_names(pipe=None, exclude=None): function get_module_sizes (line 362) | def get_module_sizes(pipe=None, exclude=None): function move_module_to_cpu (line 385) | def move_module_to_cpu(module, op='unk', force:bool=False): function apply_balanced_offload_to_module (line 433) | def apply_balanced_offload_to_module(module, op="apply", force:bool=False): function report_model_stats (line 459) | def report_model_stats(module_name, module): function apply_balanced_offload (line 469) | def apply_balanced_offload(sd_model=None, exclude:list[str]=None, force:... FILE: modules/sd_samplers.py function find_sampler (line 17) | def find_sampler(name:str): function list_samplers (line 28) | def list_samplers(): function find_sampler_config (line 44) | def find_sampler_config(name): function restore_default (line 52) | def restore_default(model): function create_sampler (line 69) | def create_sampler(name, model): function set_samplers (line 132) | def set_samplers(): FILE: modules/sd_samplers_common.py function warn_once (line 18) | def warn_once(message): function setup_img2img_steps (line 25) | def setup_img2img_steps(p, steps=None): function single_sample_to_image (line 37) | def single_sample_to_image(sample, approximation=None): function sample_to_image (line 96) | def sample_to_image(samples, index=0, approximation=None): function samples_to_image_grid (line 100) | def samples_to_image_grid(samples, approximation=None): function images_tensor_to_samples (line 104) | def images_tensor_to_samples(image, approximation=None, model=None): function store_latent (line 125) | def store_latent(decoded): function is_sampler_using_eta_noise_seed_delta (line 133) | def is_sampler_using_eta_noise_seed_delta(p): class InterruptedException (line 150) | class InterruptedException(BaseException): FILE: modules/sd_samplers_diffusers.py class DiffusionSampler (line 347) | class DiffusionSampler: method __init__ (line 348) | def __init__(self, name, constructor, model, **kwargs): FILE: modules/sd_te_remote.py function get_t5_prompt_embeds (line 10) | def get_t5_prompt_embeds( FILE: modules/sd_unet.py function load_unet_sdxl_nunchaku (line 14) | def load_unet_sdxl_nunchaku(repo_id): function load_unet (line 36) | def load_unet(model, repo_id:str=None): function refresh_unet_list (line 96) | def refresh_unet_list(): FILE: modules/sd_vae.py function get_vae_scale_factor (line 21) | def get_vae_scale_factor(model=None): function load_vae_dict (line 50) | def load_vae_dict(filename): function get_filename (line 56) | def get_filename(filepath): function refresh_vae_list (line 63) | def refresh_vae_list(): function find_vae_near_checkpoint (line 94) | def find_vae_near_checkpoint(checkpoint_file): function resolve_vae (line 102) | def resolve_vae(checkpoint_file): function apply_vae_config (line 127) | def apply_vae_config(model_file, vae_file, sd_model): function load_vae_diffusers (line 147) | def load_vae_diffusers(model_file, vae_file=None, vae_source="unknown-so... function reload_vae_weights (line 203) | def reload_vae_weights(sd_model=None, vae_file=unspecified): FILE: modules/sdnq/common.py function check_torch_compile (line 190) | def check_torch_compile(): # dynamo can be disabled after startup function fp_mm_torch (line 221) | def fp_mm_torch(x: torch.Tensor, y: torch.Tensor) -> torch.FloatTensor: function compile_func (line 239) | def compile_func(fn, **kwargs): function compile_func (line 246) | def compile_func(fn, **kwargs): # pylint: disable=unused-argument FILE: modules/sdnq/dequantizer.py function dequantize_asymmetric (line 16) | def dequantize_asymmetric(weight: torch.ByteTensor, scale: torch.FloatTe... function dequantize_symmetric (line 37) | def dequantize_symmetric(weight: torch.CharTensor, scale: torch.FloatTen... function dequantize_symmetric_with_bias (line 60) | def dequantize_symmetric_with_bias(weight: torch.CharTensor, scale: torc... function dequantize_packed_int_asymmetric (line 70) | def dequantize_packed_int_asymmetric(weight: torch.ByteTensor, scale: to... function dequantize_packed_int_symmetric (line 75) | def dequantize_packed_int_symmetric(weight: torch.ByteTensor, scale: tor... function dequantize_packed_float_asymmetric (line 80) | def dequantize_packed_float_asymmetric(weight: torch.ByteTensor, scale: ... function dequantize_packed_float_symmetric (line 85) | def dequantize_packed_float_symmetric(weight: torch.ByteTensor, scale: t... function quantize_int_mm (line 90) | def quantize_int_mm(input: torch.FloatTensor, dim: int = -1, matmul_dtyp... function quantize_int_mm_sr (line 97) | def quantize_int_mm_sr(input: torch.FloatTensor, dim: int = -1, matmul_d... function quantize_fp_mm (line 104) | def quantize_fp_mm(input: torch.FloatTensor, dim: int = -1, matmul_dtype... function quantize_fp_mm_sr (line 111) | def quantize_fp_mm_sr(input: torch.FloatTensor, dim: int = -1, matmul_dt... function re_quantize_int_mm (line 121) | def re_quantize_int_mm(weight: torch.FloatTensor) -> Tuple[torch.Tensor,... function re_quantize_fp_mm (line 133) | def re_quantize_fp_mm(weight: torch.FloatTensor, matmul_dtype: str = "fl... function re_quantize_matmul_asymmetric (line 144) | def re_quantize_matmul_asymmetric(weight: torch.ByteTensor, scale: torch... function re_quantize_matmul_symmetric (line 153) | def re_quantize_matmul_symmetric(weight: torch.CharTensor, scale: torch.... function re_quantize_matmul_packed_int_asymmetric (line 162) | def re_quantize_matmul_packed_int_asymmetric(weight: torch.ByteTensor, s... function re_quantize_matmul_packed_int_symmetric (line 167) | def re_quantize_matmul_packed_int_symmetric(weight: torch.ByteTensor, sc... function re_quantize_matmul_packed_float_asymmetric (line 172) | def re_quantize_matmul_packed_float_asymmetric(weight: torch.ByteTensor,... function re_quantize_matmul_packed_float_symmetric (line 177) | def re_quantize_matmul_packed_float_symmetric(weight: torch.ByteTensor, ... function dequantize_sdnq_module (line 182) | def dequantize_sdnq_module(model: torch.nn.Module): function dequantize_sdnq_model (line 197) | def dequantize_sdnq_model(model: torch.nn.Module): class SDNQDequantizer (line 219) | class SDNQDequantizer: method __init__ (line 239) | def __init__( method re_quantize_matmul (line 276) | def re_quantize_matmul(self, weight, scale, zero_point, svd_up, svd_do... method __call__ (line 295) | def __call__(self, weight, scale, zero_point, svd_up, svd_down, skip_q... FILE: modules/sdnq/file_loader.py function map_keys (line 6) | def map_keys(key: str, key_mapping: dict) -> str: function load_safetensors (line 16) | def load_safetensors(files: list[str], state_dict: dict = None, key_mapp... function load_threaded (line 26) | def load_threaded(files: list[str], state_dict: dict = None, key_mapping... function load_streamer (line 37) | def load_streamer(files: list[str], state_dict: dict = None, key_mapping... function load_files (line 48) | def load_files(files: list[str], state_dict: dict = None, key_mapping: d... FILE: modules/sdnq/forward.py function get_forward_func (line 8) | def get_forward_func(layer_class_name: str, quantized_matmul_dtype: str,... FILE: modules/sdnq/layers/__init__.py class SDNQLayer (line 4) | class SDNQLayer(torch.nn.Module): method __init__ (line 5) | def __init__(self, original_layer, forward_func): method dequantize (line 13) | def dequantize(self: torch.nn.Module): method forward (line 23) | def forward(self, *args, **kwargs) -> torch.Tensor: method __repr__ (line 26) | def __repr__(self): class SDNQLinear (line 30) | class SDNQLinear(SDNQLayer, torch.nn.Linear): class SDNQConv1d (line 33) | class SDNQConv1d(SDNQLayer, torch.nn.Conv1d): class SDNQConv2d (line 36) | class SDNQConv2d(SDNQLayer, torch.nn.Conv2d): class SDNQConv3d (line 39) | class SDNQConv3d(SDNQLayer, torch.nn.Conv3d): class SDNQConvTranspose1d (line 42) | class SDNQConvTranspose1d(SDNQLayer, torch.nn.ConvTranspose1d): class SDNQConvTranspose2d (line 45) | class SDNQConvTranspose2d(SDNQLayer, torch.nn.ConvTranspose2d): class SDNQConvTranspose3d (line 48) | class SDNQConvTranspose3d(SDNQLayer, torch.nn.ConvTranspose3d): function get_sdnq_wrapper_class (line 62) | def get_sdnq_wrapper_class(original_layer, forward_func): FILE: modules/sdnq/layers/conv/conv_fp16.py function conv_fp16_matmul (line 16) | def conv_fp16_matmul( function quantized_conv_forward_fp16_matmul (line 71) | def quantized_conv_forward_fp16_matmul(self, input) -> torch.FloatTensor: FILE: modules/sdnq/layers/conv/conv_fp8.py function conv_fp8_matmul (line 15) | def conv_fp8_matmul( function quantized_conv_forward_fp8_matmul (line 75) | def quantized_conv_forward_fp8_matmul(self, input) -> torch.FloatTensor: FILE: modules/sdnq/layers/conv/conv_fp8_tensorwise.py function conv_fp8_matmul_tensorwise (line 16) | def conv_fp8_matmul_tensorwise( function quantized_conv_forward_fp8_matmul_tensorwise (line 70) | def quantized_conv_forward_fp8_matmul_tensorwise(self, input) -> torch.F... FILE: modules/sdnq/layers/conv/conv_int8.py function conv_int8_matmul (line 16) | def conv_int8_matmul( function quantized_conv_forward_int8_matmul (line 69) | def quantized_conv_forward_int8_matmul(self, input) -> torch.FloatTensor: FILE: modules/sdnq/layers/conv/forward.py function get_conv_args (line 8) | def get_conv_args(input_ndim: int, stride, padding, dilation): function process_conv_input (line 28) | def process_conv_input(conv_type, input, reversed_padding_repeated_twice... function quantized_conv_forward (line 77) | def quantized_conv_forward(self, input) -> torch.FloatTensor: function quantized_conv_transpose_1d_forward (line 81) | def quantized_conv_transpose_1d_forward(self, input: torch.FloatTensor, ... function quantized_conv_transpose_2d_forward (line 86) | def quantized_conv_transpose_2d_forward(self, input: torch.FloatTensor, ... function quantized_conv_transpose_3d_forward (line 91) | def quantized_conv_transpose_3d_forward(self, input: torch.FloatTensor, ... FILE: modules/sdnq/layers/linear/forward.py function check_mats (line 10) | def check_mats(input: torch.Tensor, weight: torch.Tensor, allow_contiguo... function quantized_linear_forward (line 19) | def quantized_linear_forward(self, input: torch.FloatTensor) -> torch.Fl... FILE: modules/sdnq/layers/linear/linear_fp16.py function fp16_matmul (line 13) | def fp16_matmul( function quantized_linear_forward_fp16_matmul (line 44) | def quantized_linear_forward_fp16_matmul(self, input: torch.FloatTensor)... FILE: modules/sdnq/layers/linear/linear_fp8.py function quantize_fp_mm_input (line 14) | def quantize_fp_mm_input(input: torch.FloatTensor, matmul_dtype: str = "... function fp8_matmul (line 20) | def fp8_matmul( function quantized_linear_forward_fp8_matmul (line 49) | def quantized_linear_forward_fp8_matmul(self, input: torch.FloatTensor) ... FILE: modules/sdnq/layers/linear/linear_fp8_tensorwise.py function quantize_fp_mm_input_tensorwise (line 14) | def quantize_fp_mm_input_tensorwise(input: torch.FloatTensor, scale: tor... function fp8_matmul_tensorwise (line 23) | def fp8_matmul_tensorwise( function quantized_linear_forward_fp8_matmul_tensorwise (line 53) | def quantized_linear_forward_fp8_matmul_tensorwise(self, input: torch.Fl... FILE: modules/sdnq/layers/linear/linear_int8.py function quantize_int_mm_input (line 14) | def quantize_int_mm_input(input: torch.FloatTensor, scale: torch.FloatTe... function int8_matmul (line 23) | def int8_matmul( function quantized_linear_forward_int8_matmul (line 52) | def quantized_linear_forward_int8_matmul(self, input: torch.FloatTensor)... FILE: modules/sdnq/loader.py function get_module_names (line 12) | def get_module_names(model: ModelMixin) -> list: function unset_config_on_save (line 20) | def unset_config_on_save(quantization_config: SDNQConfig) -> SDNQConfig: function save_sdnq_model (line 28) | def save_sdnq_model(model: ModelMixin, model_path: str, max_shard_size: ... function load_sdnq_model (line 66) | def load_sdnq_model(model_path: str, model_cls: ModelMixin = None, file_... function post_process_model (line 143) | def post_process_model(model): function apply_sdnq_options_to_module (line 165) | def apply_sdnq_options_to_module(model, dtype: torch.dtype = None, dequa... function apply_sdnq_options_to_model (line 225) | def apply_sdnq_options_to_model(model, dtype: torch.dtype = None, dequan... FILE: modules/sdnq/packed_float.py function pack_float (line 18) | def pack_float(x: torch.FloatTensor, weights_dtype: str) -> torch.Tensor: function unpack_float (line 62) | def unpack_float(x: torch.Tensor, shape: torch.Size, weights_dtype: str)... FILE: modules/sdnq/packed_int.py function pack_int_symetric (line 10) | def pack_int_symetric(tensor: torch.CharTensor, weights_dtype: str) -> t... function pack_int_asymetric (line 14) | def pack_int_asymetric(tensor: torch.CharTensor, weights_dtype: str) -> ... function unpack_int_symetric (line 18) | def unpack_int_symetric(packed_tensor: torch.ByteTensor, shape: torch.Si... function unpack_int_asymetric (line 24) | def unpack_int_asymetric(packed_tensor: torch.ByteTensor, shape: torch.S... function pack_uint7 (line 28) | def pack_uint7(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint6 (line 51) | def pack_uint6(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint5 (line 75) | def pack_uint5(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint4 (line 100) | def pack_uint4(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint3 (line 106) | def pack_uint3(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint2 (line 124) | def pack_uint2(tensor: torch.ByteTensor) -> torch.ByteTensor: function pack_uint1 (line 133) | def pack_uint1(tensor: torch.Tensor) -> torch.Tensor: function unpack_uint7 (line 148) | def unpack_uint7(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint6 (line 177) | def unpack_uint6(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint5 (line 194) | def unpack_uint5(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint4 (line 216) | def unpack_uint4(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint3 (line 221) | def unpack_uint3(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint2 (line 248) | def unpack_uint2(packed_tensor: torch.ByteTensor, shape: torch.Size) -> ... function unpack_uint1 (line 264) | def unpack_uint1(packed_tensor: torch.Tensor, shape: torch.Size) -> torc... FILE: modules/sdnq/quantizer.py class QuantizationMethod (line 26) | class QuantizationMethod(str, Enum): function get_scale_asymmetric (line 32) | def get_scale_asymmetric(weight: torch.FloatTensor, reduction_axes: Unio... function get_scale_symmetric (line 41) | def get_scale_symmetric(weight: torch.FloatTensor, reduction_axes: Union... function quantize_weight (line 46) | def quantize_weight(weight: torch.FloatTensor, reduction_axes: Union[int... function apply_svdquant (line 76) | def apply_svdquant(weight: torch.FloatTensor, rank: int = 32, niter: int... function prepare_weight_for_matmul (line 96) | def prepare_weight_for_matmul(weight: torch.Tensor) -> torch.Tensor: function prepare_svd_for_matmul (line 105) | def prepare_svd_for_matmul(svd_up: torch.FloatTensor, svd_down: torch.Fl... function check_param_name_in (line 116) | def check_param_name_in(param_name: str, param_list: List[str]) -> str: function get_quant_args_from_config (line 133) | def get_quant_args_from_config(quantization_config: Union["SDNQConfig", ... function get_minimum_dtype (line 156) | def get_minimum_dtype(weights_dtype: str, param_name: str, modules_dtype... function get_quant_kwargs (line 183) | def get_quant_kwargs(quant_kwargs: dict, modules_quant_config: Dict[str,... function add_module_skip_keys (line 192) | def add_module_skip_keys(model, modules_to_not_convert: List[str] = None... function sdnq_quantize_layer_weight (line 228) | def sdnq_quantize_layer_weight(weight, layer_class_name=None, weights_dt... function sdnq_quantize_layer_weight_dynamic (line 419) | def sdnq_quantize_layer_weight_dynamic(weight, layer_class_name=None, we... function sdnq_quantize_layer (line 471) | def sdnq_quantize_layer(layer, weights_dtype="int8", quantized_matmul_dt... function apply_sdnq_to_module (line 555) | def apply_sdnq_to_module(model, weights_dtype="int8", quantized_matmul_d... function sdnq_post_load_quant (line 633) | def sdnq_post_load_quant( class SDNQQuantize (line 736) | class SDNQQuantize(): method __init__ (line 737) | def __init__(self, hf_quantizer): method convert (line 740) | def convert( method reverse_op (line 756) | def reverse_op(self): class SDNQQuantizer (line 760) | class SDNQQuantizer(DiffusersQuantizer, HfQuantizer): method check_if_quantized_param (line 771) | def check_if_quantized_param( method check_quantized_param (line 793) | def check_quantized_param(self, *args, **kwargs) -> bool: method param_needs_quantization (line 799) | def param_needs_quantization(self, model, param_name: str, *args, **kw... method create_quantized_param (line 806) | def create_quantized_param( # pylint: disable=arguments-differ method get_quantize_ops (line 887) | def get_quantize_ops(self): method adjust_max_memory (line 890) | def adjust_max_memory(self, max_memory: Dict[str, Union[int, str]]) ->... method adjust_target_dtype (line 894) | def adjust_target_dtype(self, target_dtype: torch.dtype) -> torch.dtyp... method update_torch_dtype (line 897) | def update_torch_dtype(self, torch_dtype: torch.dtype = None) -> torch... method update_dtype (line 901) | def update_dtype(self, dtype: torch.dtype = None) -> torch.dtype: method _process_model_before_weight_loading (line 907) | def _process_model_before_weight_loading( # pylint: disable=arguments-... method _process_model_after_weight_loading (line 943) | def _process_model_after_weight_loading(self, model, **kwargs): # pyli... method get_accelerator_warm_up_factor (line 966) | def get_accelerator_warm_up_factor(self): method get_cuda_warm_up_factor (line 969) | def get_cuda_warm_up_factor(self): method _dequantize (line 975) | def _dequantize(self, model): method is_serializable (line 978) | def is_serializable(self, *args, **kwargs) -> bool: # pylint: disable... method is_trainable (line 982) | def is_trainable(self): method is_qat_trainable (line 986) | def is_qat_trainable(self) -> bool: method is_compileable (line 990) | def is_compileable(self): class SDNQConfig (line 995) | class SDNQConfig(QuantizationConfigMixin): method __init__ (line 1051) | def __init__( # pylint: disable=super-init-not-called method post_init (line 1109) | def post_init(self): method to_dict (line 1152) | def to_dict(self): FILE: modules/sdnq/triton_mm.py function get_autotune_config (line 14) | def get_autotune_config(): function int_mm_kernel (line 59) | def int_mm_kernel( function int_mm (line 108) | def int_mm(a, b): function fp_mm_kernel (line 128) | def fp_mm_kernel( function fp_mm (line 177) | def fp_mm(a, b): FILE: modules/seedvr/rotary_embedding.py function exists (line 12) | def exists(val): function default (line 15) | def default(val, d): function broadcat (line 20) | def broadcat(tensors, dim = -1): function slice_at_dim (line 24) | def slice_at_dim(t, dim_slice: slice, *, dim): function rotate_half (line 32) | def rotate_half(x): function apply_rotary_emb (line 39) | def apply_rotary_emb( function apply_learned_rotations (line 75) | def apply_learned_rotations(rotations, t, start_index = 0, freq_ranges =... class RotaryEmbedding (line 85) | class RotaryEmbedding(Module): method __init__ (line 86) | def __init__( method device (line 164) | def device(self): method get_seq_pos (line 167) | def get_seq_pos(self, seq_len, device = None, dtype = None, offset = 0): method rotate_queries_or_keys (line 173) | def rotate_queries_or_keys(self, t, seq_dim = None, offset = 0, scale ... method rotate_queries_with_cached_keys (line 189) | def rotate_queries_with_cached_keys(self, q, k, seq_dim = None, offset... method rotate_queries_and_keys (line 211) | def rotate_queries_and_keys(self, q, k, seq_dim = None): method get_scale (line 234) | def get_scale( method get_axial_freqs (line 267) | def get_axial_freqs( method forward (line 316) | def forward( FILE: modules/seedvr/src/common/cache.py class Cache (line 4) | class Cache: method __init__ (line 7) | def __init__(self, disable=False, prefix="", cache=None): method __call__ (line 12) | def __call__(self, key: str, fn: Callable): method namespace (line 24) | def namespace(self, namespace: str): method get (line 31) | def get(self, key: str): FILE: modules/seedvr/src/common/config.py function load_config (line 13) | def load_config(path: str, argv: List[str] = None) -> Union[DictConfig, ... function resolve_recursive (line 26) | def resolve_recursive( function resolve_inheritance (line 44) | def resolve_inheritance(config: Union[DictConfig, ListConfig]) -> Any: function import_item (line 71) | def import_item(path: Union[str, List[str]], name: str) -> Any: function create_object (line 107) | def create_object(config: DictConfig) -> Any: FILE: modules/seedvr/src/common/decorators.py function log_on_entry (line 12) | def log_on_entry(func: Callable) -> Callable: function barrier_on_entry (line 25) | def barrier_on_entry(func: Callable) -> Callable: function _conditional_execute_wrapper_factory (line 37) | def _conditional_execute_wrapper_factory(execute: bool, func: Callable) ... function _asserted_wrapper_factory (line 53) | def _asserted_wrapper_factory(condition: bool, func: Callable, err_msg: ... function local_rank_zero_only (line 68) | def local_rank_zero_only(func: Callable) -> Callable: function global_rank_zero_only (line 75) | def global_rank_zero_only(func: Callable) -> Callable: function assert_only_global_rank_zero (line 82) | def assert_only_global_rank_zero(func: Callable) -> Callable: function assert_only_local_rank_zero (line 91) | def assert_only_local_rank_zero(func: Callable) -> Callable: function new_thread (line 100) | def new_thread(func: Callable) -> Callable: function log_runtime (line 114) | def log_runtime(func: Callable) -> Callable: FILE: modules/seedvr/src/common/diffusion/config.py function create_schedule_from_config (line 30) | def create_schedule_from_config( function create_sampler_from_config (line 42) | def create_sampler_from_config( function create_sampling_timesteps_from_config (line 59) | def create_sampling_timesteps_from_config( FILE: modules/seedvr/src/common/diffusion/samplers/base.py class SamplerModelArgs (line 32) | class SamplerModelArgs: class Sampler (line 38) | class Sampler(ABC): method __init__ (line 43) | def __init__( method sample (line 60) | def sample( method get_next_timestep (line 69) | def get_next_timestep( method get_endpoint (line 88) | def get_endpoint( method get_progress_bar (line 100) | def get_progress_bar(self): FILE: modules/seedvr/src/common/diffusion/samplers/euler.py class EulerSampler (line 32) | class EulerSampler(Sampler): method sample (line 38) | def sample( method step (line 77) | def step( method step_to (line 88) | def step_to( FILE: modules/seedvr/src/common/diffusion/schedules/base.py class Schedule (line 27) | class Schedule(ABC): method T (line 37) | def T(self) -> Union[int, float]: method A (line 44) | def A(self, t: torch.Tensor) -> torch.Tensor: method B (line 51) | def B(self, t: torch.Tensor) -> torch.Tensor: method snr (line 59) | def snr(self, t: torch.Tensor) -> torch.Tensor: method isnr (line 66) | def isnr(self, snr: torch.Tensor) -> torch.Tensor: method is_continuous (line 76) | def is_continuous(self) -> bool: method forward (line 82) | def forward(self, x_0: torch.Tensor, x_T: torch.Tensor, t: torch.Tenso... method convert_from_pred (line 89) | def convert_from_pred( method convert_to_pred (line 116) | def convert_to_pred( FILE: modules/seedvr/src/common/diffusion/schedules/lerp.py class LinearInterpolationSchedule (line 25) | class LinearInterpolationSchedule(Schedule): method __init__ (line 37) | def __init__(self, T: Union[int, float] = 1.0): method T (line 41) | def T(self) -> Union[int, float]: method A (line 44) | def A(self, t: torch.Tensor) -> torch.Tensor: method B (line 47) | def B(self, t: torch.Tensor) -> torch.Tensor: method isnr (line 52) | def isnr(self, snr: torch.Tensor) -> torch.Tensor: FILE: modules/seedvr/src/common/diffusion/timesteps/base.py class Timesteps (line 8) | class Timesteps(ABC): method __init__ (line 13) | def __init__(self, T: Union[int, float]): method T (line 18) | def T(self) -> Union[int, float]: method is_continuous (line 25) | def is_continuous(self) -> bool: class SamplingTimesteps (line 32) | class SamplingTimesteps(Timesteps): method __init__ (line 38) | def __init__( method __len__ (line 49) | def __len__(self) -> int: method __getitem__ (line 55) | def __getitem__(self, idx: Union[int, torch.IntTensor]) -> torch.Tensor: method index (line 63) | def index(self, t: torch.Tensor) -> torch.Tensor: FILE: modules/seedvr/src/common/diffusion/timesteps/sampling/trailing.py class UniformTrailingSamplingTimesteps (line 21) | class UniformTrailingSamplingTimesteps(SamplingTimesteps): method __init__ (line 30) | def __init__( FILE: modules/seedvr/src/common/diffusion/types.py class PredictionType (line 22) | class PredictionType(str, Enum): class SamplingDirection (line 44) | class SamplingDirection(str, Enum): method reverse (line 54) | def reverse(direction): FILE: modules/seedvr/src/common/diffusion/utils.py function expand_dims (line 23) | def expand_dims(tensor: torch.Tensor, ndim: int): function assert_schedule_timesteps_compatible (line 32) | def assert_schedule_timesteps_compatible(schedule, timesteps): function classifier_free_guidance (line 42) | def classifier_free_guidance( function classifier_free_guidance_dispatcher (line 65) | def classifier_free_guidance_dispatcher( FILE: modules/seedvr/src/common/distributed/advanced.py function get_data_parallel_group (line 38) | def get_data_parallel_group() -> Optional[dist.ProcessGroup]: function get_sequence_parallel_group (line 45) | def get_sequence_parallel_group() -> Optional[dist.ProcessGroup]: function get_sequence_parallel_cpu_group (line 52) | def get_sequence_parallel_cpu_group() -> Optional[dist.ProcessGroup]: function get_data_parallel_rank (line 59) | def get_data_parallel_rank() -> int: function get_data_parallel_world_size (line 67) | def get_data_parallel_world_size() -> int: function get_sequence_parallel_rank (line 75) | def get_sequence_parallel_rank() -> int: function get_sequence_parallel_world_size (line 83) | def get_sequence_parallel_world_size() -> int: function get_model_shard_cpu_intra_group (line 91) | def get_model_shard_cpu_intra_group() -> Optional[dist.ProcessGroup]: function get_model_shard_cpu_inter_group (line 98) | def get_model_shard_cpu_inter_group() -> Optional[dist.ProcessGroup]: function get_model_shard_intra_group (line 105) | def get_model_shard_intra_group() -> Optional[dist.ProcessGroup]: function get_model_shard_inter_group (line 112) | def get_model_shard_inter_group() -> Optional[dist.ProcessGroup]: function init_sequence_parallel (line 119) | def init_sequence_parallel(sequence_parallel_size: int): function init_model_shard_group (line 143) | def init_model_shard_group( function get_sequence_parallel_global_ranks (line 179) | def get_sequence_parallel_global_ranks() -> List[int]: function get_next_sequence_parallel_rank (line 189) | def get_next_sequence_parallel_rank() -> int: function get_prev_sequence_parallel_rank (line 200) | def get_prev_sequence_parallel_rank() -> int: FILE: modules/seedvr/src/common/distributed/basic.py function get_global_rank (line 23) | def get_global_rank() -> int: function get_local_rank (line 30) | def get_local_rank() -> int: function get_world_size (line 37) | def get_world_size() -> int: function get_device (line 44) | def get_device() -> torch.device: function barrier_if_distributed (line 51) | def barrier_if_distributed(*args, **kwargs): function convert_to_ddp (line 60) | def convert_to_ddp(module: torch.nn.Module, **kwargs): FILE: modules/seedvr/src/common/distributed/meta_init_utils.py function meta_non_persistent_buffer_init_fn (line 22) | def meta_non_persistent_buffer_init_fn(module: nn.Module) -> nn.Module: FILE: modules/seedvr/src/common/distributed/ops.py function single_all_to_all (line 40) | def single_all_to_all( function _all_to_all (line 76) | def _all_to_all( class SeqAllToAll (line 91) | class SeqAllToAll(torch.autograd.Function): method forward (line 93) | def forward( method backward (line 115) | def backward(ctx: Any, *grad_output: Tensor) -> Tuple[None, Tensor, No... class Slice (line 131) | class Slice(torch.autograd.Function): method forward (line 133) | def forward(ctx: Any, group: dist.ProcessGroup, local_input: Tensor, d... method backward (line 143) | def backward(ctx: Any, grad_output: Tensor) -> Tuple[None, Tensor, None]: class Gather (line 152) | class Gather(torch.autograd.Function): method forward (line 154) | def forward( method backward (line 176) | def backward(ctx: Any, grad_output: Tensor) -> Tuple[None, Tensor]: function gather_seq_scatter_heads_qkv (line 187) | def gather_seq_scatter_heads_qkv( function slice_inputs (line 231) | def slice_inputs(x: Tensor, dim: int, padding: bool = True): function remove_seqeunce_parallel_padding (line 250) | def remove_seqeunce_parallel_padding(x: Tensor, dim: int, unpad_dim_size... function gather_heads_scatter_seq (line 265) | def gather_heads_scatter_seq(x: Tensor, head_dim: int, seq_dim: int) -> ... function gather_seq_scatter_heads (line 280) | def gather_seq_scatter_heads(x: Tensor, seq_dim: int, head_dim: int) -> ... function scatter_heads (line 290) | def scatter_heads(x: Tensor, dim: int) -> Tensor: function gather_heads (line 300) | def gather_heads(x: Tensor, dim: int, grad_scale: Optional[bool] = False... function gather_outputs (line 310) | def gather_outputs( function _pad_tensor (line 334) | def _pad_tensor(x: Tensor, dim: int, padding_size: int): function _unpad_tensor (line 341) | def _unpad_tensor(x: Tensor, dim: int, padding_size): function _broadcast_data (line 347) | def _broadcast_data(data, shape, dtype, src, group, async_op): function _traverse (line 360) | def _traverse(data: Any, op: Callable) -> Union[None, List, Dict, Any]: function _get_shapes (line 371) | def _get_shapes(data): function _get_dtypes (line 375) | def _get_dtypes(data): function _construct_broadcast_buffer (line 379) | def _construct_broadcast_buffer(shapes, dtypes, device): class SPDistForward (line 396) | class SPDistForward: method __init__ (line 407) | def __init__( method __call__ (line 420) | def __call__(self, inputs) -> Any: function sync_data (line 482) | def sync_data(data, sp_idx, name="tmp"): FILE: modules/seedvr/src/common/half_precision_fixes.py function safe_pad_operation (line 4) | def safe_pad_operation(x, padding, mode='constant', value=0.0): function safe_interpolate_operation (line 23) | def safe_interpolate_operation(x, size=None, scale_factor=None, mode='ne... FILE: modules/seedvr/src/common/logger.py function get_logger (line 37) | def get_logger(name: Optional[str] = None) -> logging.Logger: FILE: modules/seedvr/src/common/partition.py function partition_by_size (line 22) | def partition_by_size(data: List[Any], size: int) -> List[List[Any]]: function partition_by_groups (line 36) | def partition_by_groups(data: List[Any], groups: int) -> List[List[Any]]: function shift_list (line 50) | def shift_list(data: List[Any], n: int) -> List[Any]: FILE: modules/seedvr/src/common/seed.py function set_seed (line 22) | def set_seed(seed: Optional[int], same_across_ranks: bool = False): FILE: modules/seedvr/src/core/generation.py function generation_step (line 11) | def generation_step(runner, text_embeds_dict, cond_latents, temporal_ove... function cut_videos (line 97) | def cut_videos(videos): function generation_loop (line 109) | def generation_loop(runner, images, cfg_scale=1.0, seed=666, res_w=720, ... function prepare_video_transforms (line 273) | def prepare_video_transforms(res_w): function calculate_optimal_batch_params (line 301) | def calculate_optimal_batch_params(total_frames, batch_size, temporal_ov... FILE: modules/seedvr/src/core/infer.py function optimized_channels_to_last (line 9) | def optimized_channels_to_last(tensor: torch.Tensor) -> torch.Tensor: function optimized_channels_to_second (line 25) | def optimized_channels_to_second(tensor): class VideoDiffusionInfer (line 42) | class VideoDiffusionInfer(): method __init__ (line 43) | def __init__(self, config: DictConfig, device: str, dtype: torch.dtype): method get_condition (line 51) | def get_condition(self, latent: torch.Tensor, latent_blur: torch.Tenso... method configure_diffusion (line 77) | def configure_diffusion(self): method vae_encode (line 95) | def vae_encode(self, samples: List[torch.Tensor]) -> List[torch.Tensor]: method vae_decode (line 139) | def vae_decode(self, latents: List[torch.Tensor], target_dtype: torch.... method timestep_transform (line 189) | def timestep_transform(self, timesteps: torch.Tensor, latents_shapes: ... method inference (line 222) | def inference( FILE: modules/seedvr/src/core/model_manager.py function configure_runner (line 11) | def configure_runner(model_name, cache_dir, device:str='cpu', dtype:torc... FILE: modules/seedvr/src/data/image/transforms/area_resize.py class AreaResize (line 24) | class AreaResize: method __init__ (line 25) | def __init__( method __call__ (line 35) | def __call__(self, image: Union[torch.Tensor, Image.Image]): class AreaRandomCrop (line 58) | class AreaRandomCrop: method __init__ (line 59) | def __init__( method get_params (line 65) | def get_params(self, input_size, output_size): method __call__ (line 85) | def __call__(self, image: Union[torch.Tensor, Image.Image]): class ScaleResize (line 101) | class ScaleResize: method __init__ (line 102) | def __init__( method __call__ (line 108) | def __call__(self, image: Union[torch.Tensor, Image.Image]): FILE: modules/seedvr/src/data/image/transforms/divisible_crop.py class DivisibleCrop (line 21) | class DivisibleCrop: method __init__ (line 22) | def __init__(self, factor): method __call__ (line 28) | def __call__(self, image: Union[torch.Tensor, Image.Image]): FILE: modules/seedvr/src/data/image/transforms/na_resize.py function NaResize (line 22) | def NaResize( FILE: modules/seedvr/src/data/image/transforms/side_resize.py class SideResize (line 22) | class SideResize: method __init__ (line 23) | def __init__( method __call__ (line 33) | def __call__(self, image: Union[torch.Tensor, Image.Image]): FILE: modules/seedvr/src/models/dit/attention.py function pytorch_varlen_attention (line 23) | def pytorch_varlen_attention(q, k, v, cu_seqlens_q, cu_seqlens_k, max_se... class TorchAttention (line 65) | class TorchAttention(nn.Module): method tflops (line 66) | def tflops(self, args, kwargs, output) -> float: method forward (line 74) | def forward(self, *args, **kwargs): class FlashAttentionVarlen (line 79) | class FlashAttentionVarlen(nn.Module): method tflops (line 80) | def tflops(self, args, kwargs, output) -> float: method forward (line 88) | def forward(self, *args, **kwargs): FILE: modules/seedvr/src/models/dit/blocks/__init__.py function get_block (line 22) | def get_block(block_type: str): FILE: modules/seedvr/src/models/dit/blocks/mmdit_window_block.py class MMWindowAttention (line 31) | class MMWindowAttention(nn.Module): method __init__ (line 32) | def __init__( method forward (line 63) | def forward( class MMWindowTransformerBlock (line 157) | class MMWindowTransformerBlock(nn.Module): method __init__ (line 158) | def __init__( method forward (line 205) | def forward( FILE: modules/seedvr/src/models/dit/embedding.py function emb_add (line 21) | def emb_add(emb1: torch.Tensor, emb2: Optional[torch.Tensor]): class TimeEmbedding (line 25) | class TimeEmbedding(nn.Module): method __init__ (line 26) | def __init__( method forward (line 39) | def forward( FILE: modules/seedvr/src/models/dit/mlp.py function get_mlp (line 21) | def get_mlp(mlp_type: Optional[str] = "normal"): class MLP (line 28) | class MLP(nn.Module): method __init__ (line 29) | def __init__( method forward (line 39) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: class SwiGLUMLP (line 46) | class SwiGLUMLP(nn.Module): method __init__ (line 47) | def __init__( method forward (line 60) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: FILE: modules/seedvr/src/models/dit/mm.py class MMArg (line 22) | class MMArg: function get_args (line 27) | def get_args(key: str, args: List[Any]) -> List[Any]: function get_kwargs (line 31) | def get_kwargs(key: str, kwargs: Dict[str, Any]) -> Dict[str, Any]: class MMModule (line 35) | class MMModule(nn.Module): method __init__ (line 36) | def __init__( method forward (line 53) | def forward( FILE: modules/seedvr/src/models/dit/modulation.py function get_ada_layer (line 27) | def get_ada_layer(ada_layer: str) -> ada_layer_type: function expand_dims (line 33) | def expand_dims(x: torch.Tensor, dim: int, ndim: int): class AdaSingle (line 43) | class AdaSingle(nn.Module): method __init__ (line 44) | def __init__( method forward (line 60) | def forward( method extra_repr (line 96) | def extra_repr(self) -> str: FILE: modules/seedvr/src/models/dit/na.py function flatten (line 21) | def flatten( function unflatten (line 33) | def unflatten( function concat (line 43) | def concat( function concat_idx (line 54) | def concat_idx( function unconcat (line 72) | def unconcat( function repeat_concat (line 87) | def repeat_concat( function repeat_concat_idx (line 101) | def repeat_concat_idx( function rearrange (line 143) | def rearrange( function rearrange_idx (line 155) | def rearrange_idx( function repeat (line 171) | def repeat( function pack (line 185) | def pack( function unpack (line 205) | def unpack( function window (line 216) | def window( function window_idx (line 228) | def window_idx( FILE: modules/seedvr/src/models/dit/nablocks/__init__.py function get_nablock (line 22) | def get_nablock(block_type: str): FILE: modules/seedvr/src/models/dit/nablocks/mmsr_block.py class NaSwinAttention (line 34) | class NaSwinAttention(MMWindowAttention): method __init__ (line 35) | def __init__( method forward (line 67) | def forward( class NaMMSRTransformerBlock (line 158) | class NaMMSRTransformerBlock(MMWindowTransformerBlock): method __init__ (line 159) | def __init__( method forward (line 211) | def forward( FILE: modules/seedvr/src/models/dit/nadit.py function gradient_checkpointing (line 31) | def gradient_checkpointing(module: Union[Callable, nn.Module], *args, en... class NaDiTOutput (line 35) | class NaDiTOutput: class NaDiT (line 39) | class NaDiT(nn.Module): method __init__ (line 46) | def __init__( method set_gradient_checkpointing (line 147) | def set_gradient_checkpointing(self, enable: bool): method forward (line 150) | def forward( class NaDiTUpscaler (line 191) | class NaDiTUpscaler(nn.Module): method __init__ (line 198) | def __init__( method set_gradient_checkpointing (line 305) | def set_gradient_checkpointing(self, enable: bool): method forward (line 308) | def forward( FILE: modules/seedvr/src/models/dit/normalization.py class CustomLayerNorm (line 28) | class CustomLayerNorm(nn.Module): method __init__ (line 32) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method reset_parameters (line 49) | def reset_parameters(self): method forward (line 54) | def forward(self, input): class CustomRMSNorm (line 59) | class CustomRMSNorm(nn.Module): method __init__ (line 63) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method forward (line 77) | def forward(self, input): function get_norm_layer (line 93) | def get_norm_layer(norm_type: Optional[str]) -> norm_layer_type: FILE: modules/seedvr/src/models/dit/patch.py class PatchIn (line 27) | class PatchIn(nn.Module): method __init__ (line 28) | def __init__( method forward (line 39) | def forward( class PatchOut (line 49) | class PatchOut(nn.Module): method __init__ (line 50) | def __init__( method forward (line 61) | def forward( class NaPatchIn (line 71) | class NaPatchIn(PatchIn): method forward (line 72) | def forward( class NaPatchOut (line 88) | class NaPatchOut(PatchOut): method forward (line 89) | def forward( FILE: modules/seedvr/src/models/dit/rope.py class RotaryEmbeddingBase (line 24) | class RotaryEmbeddingBase(nn.Module): method __init__ (line 25) | def __init__(self, dim: int, rope_dim: int): method get_axial_freqs (line 44) | def get_axial_freqs(self, *dims): class RotaryEmbedding3d (line 48) | class RotaryEmbedding3d(RotaryEmbeddingBase): method __init__ (line 49) | def __init__(self, dim: int): method forward (line 52) | def forward( class NaRotaryEmbedding3d (line 72) | class NaRotaryEmbedding3d(RotaryEmbedding3d): method forward (line 73) | def forward( method get_freqs (line 93) | def get_freqs( FILE: modules/seedvr/src/models/dit/window.py function get_window_op (line 19) | def get_window_op(name: str): function make_720Pwindows_bysize (line 28) | def make_720Pwindows_bysize(size: Tuple[int, int, int], num_windows: Tup... function make_shifted_720Pwindows_bysize (line 51) | def make_shifted_720Pwindows_bysize(size: Tuple[int, int, int], num_wind... FILE: modules/seedvr/src/models/dit_v2/attention.py function pytorch_varlen_attention (line 23) | def pytorch_varlen_attention(q, k, v, cu_seqlens_q, cu_seqlens_k, max_se... class TorchAttention (line 64) | class TorchAttention(nn.Module): method tflops (line 65) | def tflops(self, args, kwargs, output) -> float: method forward (line 73) | def forward(self, *args, **kwargs): class FlashAttentionVarlen (line 77) | class FlashAttentionVarlen(nn.Module): method tflops (line 78) | def tflops(self, args, kwargs, output) -> float: method forward (line 86) | def forward(self, *args, **kwargs): FILE: modules/seedvr/src/models/dit_v2/embedding.py function emb_add (line 21) | def emb_add(emb1: torch.Tensor, emb2: Optional[torch.Tensor]): class TimeEmbedding (line 25) | class TimeEmbedding(nn.Module): method __init__ (line 26) | def __init__( method forward (line 39) | def forward( FILE: modules/seedvr/src/models/dit_v2/mlp.py function get_mlp (line 21) | def get_mlp(mlp_type: Optional[str] = "normal"): class MLP (line 28) | class MLP(nn.Module): method __init__ (line 29) | def __init__( method forward (line 39) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: class SwiGLUMLP (line 46) | class SwiGLUMLP(nn.Module): method __init__ (line 47) | def __init__( method forward (line 60) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: FILE: modules/seedvr/src/models/dit_v2/mm.py class MMArg (line 22) | class MMArg: function get_args (line 27) | def get_args(key: str, args: List[Any]) -> List[Any]: function get_kwargs (line 31) | def get_kwargs(key: str, kwargs: Dict[str, Any]) -> Dict[str, Any]: class MMModule (line 35) | class MMModule(nn.Module): method __init__ (line 36) | def __init__( method forward (line 59) | def forward( FILE: modules/seedvr/src/models/dit_v2/modulation.py function get_ada_layer (line 27) | def get_ada_layer(ada_layer: str) -> ada_layer_type: function expand_dims (line 33) | def expand_dims(x: torch.Tensor, dim: int, ndim: int): class AdaSingle (line 43) | class AdaSingle(nn.Module): method __init__ (line 44) | def __init__( method forward (line 65) | def forward( method extra_repr (line 117) | def extra_repr(self) -> str: FILE: modules/seedvr/src/models/dit_v2/na.py function flatten (line 21) | def flatten( function unflatten (line 33) | def unflatten( function concat (line 43) | def concat( function concat_idx (line 54) | def concat_idx( function unconcat (line 72) | def unconcat( function repeat_concat (line 87) | def repeat_concat( function repeat_concat_idx (line 101) | def repeat_concat_idx( function rearrange (line 143) | def rearrange( function rearrange_idx (line 155) | def rearrange_idx( function repeat (line 171) | def repeat( function pack (line 185) | def pack( function unpack (line 205) | def unpack( function window (line 216) | def window( function window_idx (line 228) | def window_idx( FILE: modules/seedvr/src/models/dit_v2/nablocks/__init__.py function get_nablock (line 23) | def get_nablock(block_type: str): FILE: modules/seedvr/src/models/dit_v2/nablocks/attention/__init__.py function get_attn (line 22) | def get_attn(attn_type: str): FILE: modules/seedvr/src/models/dit_v2/nablocks/attention/mmattn.py class NaMMAttention (line 35) | class NaMMAttention(nn.Module): method __init__ (line 36) | def __init__( method forward (line 77) | def forward( class NaSwinAttention (line 143) | class NaSwinAttention(NaMMAttention): method __init__ (line 144) | def __init__( method forward (line 158) | def forward( FILE: modules/seedvr/src/models/dit_v2/nablocks/mmsr_block.py class NaMMSRTransformerBlock (line 30) | class NaMMSRTransformerBlock(nn.Module): method __init__ (line 31) | def __init__( method forward (line 82) | def forward( FILE: modules/seedvr/src/models/dit_v2/nadit.py function gradient_checkpointing (line 31) | def gradient_checkpointing(module: Union[Callable, nn.Module], *args, en... class NaDiTOutput (line 35) | class NaDiTOutput: class NaDiT (line 39) | class NaDiT(nn.Module): method __init__ (line 46) | def __init__( method set_gradient_checkpointing (line 185) | def set_gradient_checkpointing(self, enable: bool): method forward (line 188) | def forward( FILE: modules/seedvr/src/models/dit_v2/normalization.py class CustomLayerNorm (line 28) | class CustomLayerNorm(nn.Module): method __init__ (line 32) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method reset_parameters (line 49) | def reset_parameters(self): method forward (line 54) | def forward(self, input): class CustomRMSNorm (line 70) | class CustomRMSNorm(nn.Module): method __init__ (line 74) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method forward (line 88) | def forward(self, input): function get_norm_layer (line 109) | def get_norm_layer(norm_type: Optional[str]) -> norm_layer_type: FILE: modules/seedvr/src/models/dit_v2/patch/__init__.py function get_na_patch_layers (line 15) | def get_na_patch_layers(patch_type="v1"): FILE: modules/seedvr/src/models/dit_v2/patch/patch_v1.py class PatchIn (line 27) | class PatchIn(nn.Module): method __init__ (line 28) | def __init__( method forward (line 39) | def forward( class PatchOut (line 52) | class PatchOut(nn.Module): method __init__ (line 53) | def __init__( method forward (line 64) | def forward( class NaPatchIn (line 76) | class NaPatchIn(PatchIn): method forward (line 77) | def forward( class NaPatchOut (line 100) | class NaPatchOut(PatchOut): method forward (line 101) | def forward( FILE: modules/seedvr/src/models/dit_v2/rope.py class RotaryEmbeddingBase (line 24) | class RotaryEmbeddingBase(nn.Module): method __init__ (line 25) | def __init__(self, dim: int, rope_dim: int): method get_axial_freqs (line 44) | def get_axial_freqs(self, *dims): class RotaryEmbedding3d (line 48) | class RotaryEmbedding3d(RotaryEmbeddingBase): method __init__ (line 49) | def __init__(self, dim: int): method forward (line 53) | def forward( class MMRotaryEmbeddingBase (line 73) | class MMRotaryEmbeddingBase(RotaryEmbeddingBase): method __init__ (line 74) | def __init__(self, dim: int, rope_dim: int): class NaMMRotaryEmbedding3d (line 87) | class NaMMRotaryEmbedding3d(MMRotaryEmbeddingBase): method __init__ (line 88) | def __init__(self, dim: int): method forward (line 91) | def forward( method get_freqs (line 130) | def get_freqs( function get_na_rope (line 149) | def get_na_rope(rope_type: Optional[str], dim: int): FILE: modules/seedvr/src/models/dit_v2/window.py function get_window_op (line 19) | def get_window_op(name: str): function make_720Pwindows_bysize (line 28) | def make_720Pwindows_bysize(size: Tuple[int, int, int], num_windows: Tup... function make_shifted_720Pwindows_bysize (line 51) | def make_shifted_720Pwindows_bysize(size: Tuple[int, int, int], num_wind... FILE: modules/seedvr/src/models/video_vae_v3/modules/attn_video_vae.py class Upsample3D (line 40) | class Upsample3D(Upsample2D): method __init__ (line 43) | def __init__( method forward (line 92) | def forward( class Downsample3D (line 145) | class Downsample3D(Downsample2D): method __init__ (line 148) | def __init__( method forward (line 197) | def forward( class ResnetBlock3D (line 221) | class ResnetBlock3D(ResnetBlock2D): method __init__ (line 222) | def __init__( method forward (line 278) | def forward( class DownEncoderBlock3D (line 327) | class DownEncoderBlock3D(DownEncoderBlock2D): method __init__ (line 328) | def __init__( method forward (line 407) | def forward( class UpDecoderBlock3D (line 424) | class UpDecoderBlock3D(UpDecoderBlock2D): method __init__ (line 425) | def __init__( method forward (line 508) | def forward( class UNetMidBlock3D (line 525) | class UNetMidBlock3D(nn.Module): method __init__ (line 526) | def __init__( method forward (line 618) | def forward(self, hidden_states, temb=None, memory_state: MemoryState ... class Encoder3D (line 633) | class Encoder3D(nn.Module): method __init__ (line 662) | def __init__( method forward (line 770) | def forward( class Decoder3D (line 821) | class Decoder3D(nn.Module): method __init__ (line 847) | def __init__( method forward (line 944) | def forward( class AutoencoderKL (line 1004) | class AutoencoderKL(diffusers.AutoencoderKL): method __init__ (line 1009) | def __init__(self, attention: bool = True, *args, **kwargs): method load_state_dict (line 1017) | def load_state_dict(self, state_dict, strict=True): class VideoAutoencoderKL (line 1029) | class VideoAutoencoderKL(diffusers.AutoencoderKL): method __init__ (line 1034) | def __init__( method encode (line 1148) | def encode(self, x: torch.FloatTensor, return_dict: bool = True) -> Au... method decode (line 1159) | def decode( method _encode (line 1170) | def _encode( method _decode (line 1183) | def _decode( method slicing_encode (line 1194) | def slicing_encode(self, x: torch.Tensor) -> torch.Tensor: method slicing_decode (line 1212) | def slicing_decode(self, z: torch.Tensor) -> torch.Tensor: method blend_v (line 1230) | def blend_v(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method blend_h (line 1236) | def blend_h(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method tiled_encode (line 1242) | def tiled_encode(self, x: torch.Tensor) -> torch.Tensor: method tiled_decode (line 1267) | def tiled_decode(self, z: torch.Tensor) -> torch.Tensor: method forward (line 1292) | def forward( method load_state_dict (line 1307) | def load_state_dict(self, state_dict, strict=False): class VideoAutoencoderKLWrapper (line 1320) | class VideoAutoencoderKLWrapper(VideoAutoencoderKL): method __init__ (line 1321) | def __init__( method forward (line 1334) | def forward(self, x: torch.FloatTensor) -> CausalAutoencoderOutput: method encode (line 1340) | def encode(self, x: torch.FloatTensor) -> CausalEncoderOutput: method decode (line 1347) | def decode(self, z: torch.FloatTensor) -> CausalDecoderOutput: method preprocess (line 1353) | def preprocess(self, x: torch.Tensor): method postprocess (line 1358) | def postprocess(self, x: torch.Tensor): method set_causal_slicing (line 1362) | def set_causal_slicing( method set_memory_limit (line 1381) | def set_memory_limit(self, conv_max_mem: Optional[float], norm_max_mem... FILE: modules/seedvr/src/models/video_vae_v3/modules/causal_inflation_lib.py function ignore_padding (line 31) | def ignore_padding(model): class InflatedCausalConv3d (line 40) | class InflatedCausalConv3d(Conv3d): method __init__ (line 41) | def __init__( method set_memory_limit (line 56) | def set_memory_limit(self, value: float): method set_memory_device (line 59) | def set_memory_device(self, memory_device: _memory_device_t): method memory_limit_conv (line 62) | def memory_limit_conv( method forward (line 145) | def forward( method basic_forward (line 160) | def basic_forward(self, input: Tensor, memory_state: MemoryState = Mem... method slicing_forward (line 181) | def slicing_forward( method tflops (line 238) | def tflops(self, args, kwargs, output) -> float: method _load_from_state_dict (line 247) | def _load_from_state_dict( function init_causal_conv3d (line 269) | def init_causal_conv3d( function causal_norm_wrapper (line 285) | def causal_norm_wrapper(norm_layer: nn.Module, x: torch.Tensor) -> torch... function remove_head (line 326) | def remove_head(tensor: Tensor, times: int = 1) -> Tensor: function extend_head (line 336) | def extend_head(tensor: Tensor, times: int = 2, memory: Optional[Tensor]... function inflate_weight (line 354) | def inflate_weight(weight_2d: torch.Tensor, weight_3d: torch.Tensor, inf... function inflate_bias (line 374) | def inflate_bias(bias_2d: torch.Tensor, bias_3d: torch.Tensor, inflation... function modify_state_dict (line 388) | def modify_state_dict(layer, state_dict, prefix, inflate_weight_fn, infl... FILE: modules/seedvr/src/models/video_vae_v3/modules/context_parallel_lib.py function causal_conv_slice_inputs (line 22) | def causal_conv_slice_inputs(x, split_size, memory_state): function causal_conv_gather_outputs (line 27) | def causal_conv_gather_outputs(x): function get_output_len (line 32) | def get_output_len(conv_module, input_len, pad_len, dim=0): function get_cache_size (line 38) | def get_cache_size(conv_module, input_len, pad_len, dim=0): function cache_send_recv (line 51) | def cache_send_recv(tensor: List[Tensor], cache_size, times, memory=None): FILE: modules/seedvr/src/models/video_vae_v3/modules/global_config.py function get_norm_limit (line 20) | def get_norm_limit(): function set_norm_limit (line 24) | def set_norm_limit(value: Optional[float] = None): FILE: modules/seedvr/src/models/video_vae_v3/modules/inflated_layers.py class InflatedCausalConv3d (line 26) | class InflatedCausalConv3d(Conv3d): method __init__ (line 27) | def __init__( method set_memory_device (line 41) | def set_memory_device(self, memory_device: _memory_device_t): method forward (line 44) | def forward(self, input: Tensor, memory_state: MemoryState = MemorySta... method _load_from_state_dict (line 65) | def _load_from_state_dict( function init_causal_conv3d (line 87) | def init_causal_conv3d( FILE: modules/seedvr/src/models/video_vae_v3/modules/inflated_lib.py class MemoryState (line 28) | class MemoryState(Enum): function causal_norm_wrapper (line 41) | def causal_norm_wrapper(norm_layer: nn.Module, x: torch.Tensor) -> torch... function remove_head (line 65) | def remove_head(tensor: Tensor, times: int = 1) -> Tensor: function extend_head (line 74) | def extend_head( function inflate_weight (line 93) | def inflate_weight(weight_2d: torch.Tensor, weight_3d: torch.Tensor, inf... function inflate_bias (line 113) | def inflate_bias(bias_2d: torch.Tensor, bias_3d: torch.Tensor, inflation... function modify_state_dict (line 127) | def modify_state_dict(layer, state_dict, prefix, inflate_weight_fn, infl... FILE: modules/seedvr/src/models/video_vae_v3/modules/types.py class DiagonalGaussianDistribution (line 25) | class DiagonalGaussianDistribution: method __init__ (line 26) | def __init__(self, mean: torch.Tensor, logvar: torch.Tensor): method mode (line 32) | def mode(self) -> torch.Tensor: method sample (line 35) | def sample(self) -> torch.FloatTensor: method kl (line 38) | def kl(self) -> torch.Tensor: class MemoryState (line 44) | class MemoryState(Enum): class QuantizerOutput (line 58) | class QuantizerOutput(NamedTuple): class CausalAutoencoderOutput (line 64) | class CausalAutoencoderOutput(NamedTuple): class CausalEncoderOutput (line 70) | class CausalEncoderOutput(NamedTuple): class CausalDecoderOutput (line 75) | class CausalDecoderOutput(NamedTuple): FILE: modules/seedvr/src/optimization/memory_manager.py function preinitialize_rope_cache (line 13) | def preinitialize_rope_cache(runner) -> None: function clear_rope_cache (line 80) | def clear_rope_cache(runner) -> None: FILE: modules/seedvr/src/optimization/performance.py function optimized_video_rearrange (line 12) | def optimized_video_rearrange(video_tensors: List[torch.Tensor]) -> List... function optimized_single_video_rearrange (line 80) | def optimized_single_video_rearrange(video: torch.Tensor) -> torch.Tensor: function optimized_sample_to_image_format (line 105) | def optimized_sample_to_image_format(sample: torch.Tensor) -> torch.Tensor: function temporal_latent_blending (line 130) | def temporal_latent_blending(latents1: torch.Tensor, latents2: torch.Ten... FILE: modules/seedvr/src/utils/color_fix.py function adain_color_fix (line 8) | def adain_color_fix(target: Image, source: Image): function wavelet_color_fix (line 23) | def wavelet_color_fix(target: Image, source: Image): function calc_mean_std (line 38) | def calc_mean_std(feat: Tensor, eps=1e-5): function adaptive_instance_normalization (line 53) | def adaptive_instance_normalization(content_feat:Tensor, style_feat:Tens... function wavelet_blur (line 67) | def wavelet_blur(image: Tensor, radius: int): function wavelet_decomposition (line 88) | def wavelet_decomposition(image: Tensor, levels=5): function wavelet_reconstruction (line 104) | def wavelet_reconstruction(content_feat:Tensor, style_feat:Tensor): FILE: modules/seedvr/test.py function upscale_image (line 25) | def upscale_image(model_name:str, image_path:str): FILE: modules/server.py class UvicornServer (line 7) | class UvicornServer(uvicorn.Server): method __init__ (line 8) | def __init__(self, app: fastapi.FastAPI, listen = None, port = None, k... method start (line 29) | def start(self): method stop (line 34) | def stop(self): method restart (line 38) | def restart(self): class HypercornServer (line 44) | class HypercornServer(): method __init__ (line 45) | def __init__(self, app: fastapi.FastAPI, listen = None, port = None, k... method run (line 65) | def run(self): method start (line 70) | def start(self): FILE: modules/shared.py class Backend (line 66) | class Backend(Enum): function list_checkpoint_titles (line 148) | def list_checkpoint_titles(): function is_url (line 157) | def is_url(string): function refresh_checkpoints (line 163) | def refresh_checkpoints(): function refresh_vaes (line 168) | def refresh_vaes(): function refresh_upscalers (line 173) | def refresh_upscalers(): function list_samplers (line 178) | def list_samplers(): function restart_server (line 908) | def restart_server(restart=True): function restore_defaults (line 932) | def restore_defaults(restart=True): FILE: modules/shared_defaults.py function get_default_modes (line 5) | def get_default_modes(cmd_opts, mem_stat): FILE: modules/shared_helpers.py function listdir (line 11) | def listdir(path): function walk_files (line 23) | def walk_files(path, allowed_extensions=None): function html_path (line 37) | def html_path(filename): function html (line 41) | def html(filename): function req (line 49) | def req(url_addr, headers = None, **kwargs): class TotalTQDM (line 62) | class TotalTQDM: # compatibility with previous global-tqdm method __init__ (line 64) | def __init__(self): method reset (line 66) | def reset(self): method update (line 68) | def update(self): method updateTotal (line 70) | def updateTotal(self, new_total): method clear (line 72) | def clear(self): FILE: modules/shared_items.py function postprocessing_scripts (line 86) | def postprocessing_scripts(): function sd_vae_items (line 91) | def sd_vae_items(): function sd_taesd_items (line 96) | def sd_taesd_items(): function refresh_vae_list (line 100) | def refresh_vae_list(): function sd_unet_items (line 105) | def sd_unet_items(): function refresh_unet_list (line 110) | def refresh_unet_list(): function sd_te_items (line 115) | def sd_te_items(): function refresh_te_list (line 121) | def refresh_te_list(): function list_crossattention (line 126) | def list_crossattention(): function get_pipelines (line 135) | def get_pipelines(): function get_repo (line 145) | def get_repo(model): FILE: modules/shared_legacy.py class LegacyOption (line 7) | class LegacyOption(OptionInfo): method __init__ (line 8) | def __init__(self, *args, **kwargs): function get_legacy_options (line 77) | def get_legacy_options(): FILE: modules/shared_state.py class State (line 14) | class State: method __init__ (line 53) | def __init__(self): method __str__ (line 56) | def __str__(self) -> str: method sampling_step (line 68) | def sampling_step(self): method sampling_step (line 72) | def sampling_step(self, value): method skip (line 77) | def skip(self): method interrupt (line 81) | def interrupt(self): method pause (line 85) | def pause(self): method nextjob (line 89) | def nextjob(self): method dict (line 99) | def dict(self): method status (line 112) | def status(self): method find (line 145) | def find(self, task_id:str): method history (line 151) | def history(self, op:str, task_id:str=None, results:list=[]): method outputs (line 167) | def outputs(self, results): method get_id (line 175) | def get_id(self, task_id:str=None): method clear (line 183) | def clear(self): method begin (line 194) | def begin(self, title="", task_id=0, api=None): method end (line 226) | def end(self, task_id=None): method step (line 241) | def step(self, step:int=1): method update (line 244) | def update(self, job:str, steps:int=0, jobs:int=0): method set_current_image (line 259) | def set_current_image(self): method do_set_current_image (line 269) | def do_set_current_image(self): method assign_current_image (line 296) | def assign_current_image(self, image): FILE: modules/styles.py class Style (line 15) | class Style(): method __init__ (line 16) | def __init__(self, name: str, desc: str = "", prompt: str = "", negati... function merge_prompts (line 28) | def merge_prompts(style_prompt: str, prompt: str) -> str: function apply_styles_to_prompt (line 42) | def apply_styles_to_prompt(prompt, styles): function select_from_weighted_list (line 48) | def select_from_weighted_list(inner: str) -> str: function apply_curly_braces_to_prompt (line 109) | def apply_curly_braces_to_prompt(prompt, seed=-1): function apply_file_wildcards (line 133) | def apply_file_wildcards(prompt, replaced = [], not_found = [], recursio... function apply_wildcards_to_prompt (line 187) | def apply_wildcards_to_prompt(prompt, all_wildcards, seed=-1, silent=Fal... function get_reference_style (line 220) | def get_reference_style(): function apply_styles_to_extra (line 232) | def apply_styles_to_extra(p, style: Style): class StyleDatabase (line 291) | class StyleDatabase: method __init__ (line 292) | def __init__(self, opts): method load_style (line 319) | def load_style(self, fn, prefix=None): method reload (line 351) | def reload(self): method find_style (line 378) | def find_style(self, name): method get_style_prompts (line 382) | def get_style_prompts(self, styles): method get_negative_style_prompts (line 390) | def get_negative_style_prompts(self, styles): method apply_styles_to_prompts (line 398) | def apply_styles_to_prompts(self, prompts, negatives, styles, seeds): method apply_styles_to_prompt (line 436) | def apply_styles_to_prompt(self, prompt, styles, wildcards:bool=True): method apply_negative_styles_to_prompt (line 447) | def apply_negative_styles_to_prompt(self, prompt, styles, wildcards:bo... method apply_styles_to_extra (line 458) | def apply_styles_to_extra(self, p): method extract_comments (line 476) | def extract_comments(self, p): method save_styles (line 485) | def save_styles(self, path, verbose=False): method load_csv (line 508) | def load_csv(self, legacy_file): FILE: modules/sub_quadratic_attention.py function narrow_trunc (line 21) | def narrow_trunc( class AttnChunk (line 30) | class AttnChunk(NamedTuple): class SummarizeChunk (line 36) | class SummarizeChunk: method __call__ (line 38) | def __call__( class ComputeQueryChunkAttn (line 45) | class ComputeQueryChunkAttn: method __call__ (line 47) | def __call__( function _summarize_chunk (line 54) | def _summarize_chunk( function _query_chunk_attention (line 75) | def _query_chunk_attention( function _get_attention_scores_no_kv_chunking (line 116) | def _get_attention_scores_no_kv_chunking( class ScannedChunk (line 135) | class ScannedChunk(NamedTuple): function efficient_dot_product_attention (line 140) | def efficient_dot_product_attention( FILE: modules/taesd/hybrid_small.py class AutoencoderSmall (line 38) | class AutoencoderSmall(ModelMixin, ConfigMixin, FromOriginalModelMixin): method __init__ (line 73) | def __init__( method _set_gradient_checkpointing (line 145) | def _set_gradient_checkpointing(self, module, value=False): method enable_tiling (line 149) | def enable_tiling(self, use_tiling: bool = True): method disable_tiling (line 157) | def disable_tiling(self): method enable_slicing (line 164) | def enable_slicing(self): method disable_slicing (line 171) | def disable_slicing(self): method attn_processors (line 180) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 204) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 239) | def set_default_attn_processor(self): method encode (line 255) | def encode( method _decode (line 287) | def _decode(self, z: torch.FloatTensor, return_dict: bool = True) -> U... method decode (line 300) | def decode( method blend_v (line 328) | def blend_v(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method blend_h (line 334) | def blend_h(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method tiled_encode (line 340) | def tiled_encode(self, x: torch.FloatTensor, return_dict: bool = True)... method tiled_decode (line 394) | def tiled_decode(self, z: torch.FloatTensor, return_dict: bool = True)... method forward (line 442) | def forward( method fuse_qkv_projections (line 471) | def fuse_qkv_projections(self): method unfuse_qkv_projections (line 495) | def unfuse_qkv_projections(self): FILE: modules/taesd/taehv.py function conv (line 15) | def conv(n_in, n_out, **kwargs): class Clamp (line 18) | class Clamp(nn.Module): method forward (line 19) | def forward(self, x): class MemBlock (line 22) | class MemBlock(nn.Module): method __init__ (line 23) | def __init__(self, n_in, n_out): method forward (line 28) | def forward(self, x, past): class TPool (line 31) | class TPool(nn.Module): method __init__ (line 32) | def __init__(self, n_f, stride): method forward (line 36) | def forward(self, x): class TGrow (line 40) | class TGrow(nn.Module): method __init__ (line 41) | def __init__(self, n_f, stride): method forward (line 45) | def forward(self, x): function apply_model_with_memblocks (line 50) | def apply_model_with_memblocks(model, x, parallel, show_progress_bar): class TAEHV (line 150) | class TAEHV(nn.Module): method __init__ (line 153) | def __init__(self, checkpoint_path="taehv.pth", decoder_time_upscale=(... method patch_tgrow_layers (line 201) | def patch_tgrow_layers(self, sd): method encode_video (line 216) | def encode_video(self, x, parallel=True, show_progress_bar=True): method decode_video (line 228) | def decode_video(self, x, parallel=True, show_progress_bar=True): method forward (line 241) | def forward(self, x): method decode (line 244) | def decode(self, x, parallel=True, show_progress_bar=False, return_dic... method encode (line 248) | def encode(self, x, parallel=True, show_progress_bar=False, return_dic... FILE: modules/taesd/taem1.py function conv (line 15) | def conv(n_in, n_out, **kwargs): class Clamp (line 18) | class Clamp(nn.Module): method forward (line 19) | def forward(self, x): class MemBlock (line 22) | class MemBlock(nn.Module): method __init__ (line 23) | def __init__(self, n_in, n_out): method forward (line 28) | def forward(self, x, past): class TPool (line 31) | class TPool(nn.Module): method __init__ (line 32) | def __init__(self, n_f, stride): method forward (line 36) | def forward(self, x): class TGrow (line 40) | class TGrow(nn.Module): method __init__ (line 41) | def __init__(self, n_f, stride): method forward (line 45) | def forward(self, x): function apply_model_with_memblocks (line 50) | def apply_model_with_memblocks(model, x, parallel, show_progress_bar): class TAEM1 (line 146) | class TAEM1(nn.Module): method __init__ (line 149) | def __init__(self, checkpoint_path="taem1.pth"): method encode_video (line 170) | def encode_video(self, x, parallel=True, show_progress_bar=True): method decode_video (line 182) | def decode_video(self, x, parallel=True, show_progress_bar=True): method forward (line 205) | def forward(self, x): FILE: modules/taesd/taesd.py function conv (line 6) | def conv(n_in, n_out, **kwargs): class Clamp (line 9) | class Clamp(nn.Module): method forward (line 10) | def forward(self, x): class Block (line 13) | class Block(nn.Module): method __init__ (line 14) | def __init__(self, n_in, n_out): method forward (line 19) | def forward(self, x): function Encoder (line 22) | def Encoder(latent_channels=4): function Decoder (line 31) | def Decoder(latent_channels=4): class TAESD (line 59) | class TAESD(nn.Module): # pylint: disable=abstract-method method __init__ (line 63) | def __init__(self, encoder_path=None, decoder_path=None, latent_channe... method guess_latent_channels (line 79) | def guess_latent_channels(self, decoder_path, encoder_path): method scale_latents (line 87) | def scale_latents(x): method unscale_latents (line 91) | def unscale_latents(x): FILE: modules/teacache/__init__.py function apply_teacache (line 13) | def apply_teacache(p): FILE: modules/teacache/teacache_chroma.py function teacache_chroma_forward (line 11) | def teacache_chroma_forward( FILE: modules/teacache/teacache_cogvideox.py function teacache_cog_forward (line 11) | def teacache_cog_forward( FILE: modules/teacache/teacache_flux.py function teacache_flux_forward (line 11) | def teacache_flux_forward( FILE: modules/teacache/teacache_hidream.py function teacache_hidream_forward (line 12) | def teacache_hidream_forward( FILE: modules/teacache/teacache_ltx.py function teacache_ltx_forward (line 11) | def teacache_ltx_forward( FILE: modules/teacache/teacache_lumina2.py function teacache_lumina2_forward (line 11) | def teacache_lumina2_forward( FILE: modules/teacache/teacache_mochi.py function teacache_mochi_forward (line 11) | def teacache_mochi_forward( FILE: modules/textual_inversion.py function list_embeddings (line 16) | def list_embeddings(*dirs): function open_embeddings (line 22) | def open_embeddings(filename): function convert_bundled (line 61) | def convert_bundled(data): function get_text_encoders (line 75) | def get_text_encoders(): function deref_tokenizers (line 99) | def deref_tokenizers(tokens, tokenizers): function insert_tokens (line 118) | def insert_tokens(embeddings: list, tokenizers: list): function insert_vectors (line 130) | def insert_vectors(embedding, tokenizers, text_encoders, hiddensizes): class Embedding (line 151) | class Embedding: method __init__ (line 152) | def __init__(self, vec, name, filename=None, step=None): method save (line 167) | def save(self, filename): method checksum (line 184) | def checksum(self): class DirWithTextualInversionEmbeddings (line 196) | class DirWithTextualInversionEmbeddings: method __init__ (line 197) | def __init__(self, path): method has_changed (line 201) | def has_changed(self): method update (line 206) | def update(self): function convert_embedding (line 212) | def convert_embedding(tensor, text_encoder, text_encoder_2): class EmbeddingDatabase (line 231) | class EmbeddingDatabase: method __init__ (line 232) | def __init__(self): method add_embedding_dir (line 240) | def add_embedding_dir(self, path): method register_embedding (line 243) | def register_embedding(self, embedding, model): method load_diffusers_embedding (line 257) | def load_diffusers_embedding(self, filename: Union[str, List[str]] = N... method load_from_dir (line 308) | def load_from_dir(self, embdir): method load_textual_inversion_embeddings (line 317) | def load_textual_inversion_embeddings(self, force_reload=False): FILE: modules/theme.py function list_builtin_themes (line 11) | def list_builtin_themes(): function refresh_themes (line 16) | def refresh_themes(no_update=False): function list_locales (line 39) | def list_locales(): function list_themes (line 43) | def list_themes(): function reload_gradio_theme (line 87) | def reload_gradio_theme(): FILE: modules/timer.py class Timer (line 12) | class Timer: method __init__ (line 13) | def __init__(self): method elapsed (line 19) | def elapsed(self, reset=True): method add (line 26) | def add(self, name, t): method ts (line 31) | def ts(self, name, t): method record (line 35) | def record(self, category=None, extra_time=0, reset=True): method summary (line 44) | def summary(self, min_time=default_min_time, total=True): method get_total (line 56) | def get_total(self): method dct (line 59) | def dct(self, min_time=default_min_time): method reset (line 68) | def reset(self): FILE: modules/todo/__init__.py function apply_todo (line 4) | def apply_todo(model, p, method='todo'): FILE: modules/todo/todo_merge.py function init_generator (line 24) | def init_generator(device: torch.device, fallback: torch.Generator = None): function do_nothing (line 41) | def do_nothing(x: torch.Tensor, mode: str = None): # pylint: disable=unu... function mps_gather_workaround (line 45) | def mps_gather_workaround(input, dim, index): # pylint: disable=redefine... function up_or_downsample (line 56) | def up_or_downsample(item, cur_w, cur_h, new_w, new_h, method): function compute_merge (line 74) | def compute_merge(x: torch.Tensor, tome_info): function bipartite_soft_matching_random2d (line 132) | def bipartite_soft_matching_random2d(metric: torch.Tensor, class TokenMergeAttentionProcessor (line 246) | class TokenMergeAttentionProcessor: method __init__ (line 247) | def __init__(self): method torch2_attention (line 256) | def torch2_attention(self, attn, query, key, value, attention_mask, ba... method xformers_attention (line 272) | def xformers_attention(self, attn, query, key, value, attention_mask, ... method regular_attention (line 289) | def regular_attention(self, attn, query, key, value, attention_mask, b... method __call__ (line 304) | def __call__( FILE: modules/todo/todo_utils.py function hook_tome_model (line 12) | def hook_tome_model(model: torch.nn.Module): function remove_tome_patch (line 22) | def remove_tome_patch(pipe: torch.nn.Module): function patch_attention_proc (line 32) | def patch_attention_proc(unet, token_merge_args={}): function remove_patch (line 62) | def remove_patch(pipe: torch.nn.Module): FILE: modules/token_merge.py function apply_token_merging (line 4) | def apply_token_merging(sd_model): function remove_token_merging (line 61) | def remove_token_merging(sd_model): FILE: modules/transformer_cache.py function set_cache (line 9) | def set_cache(faster_cache=None, pyramid_attention_broadcast=None): FILE: modules/txt2img.py function txt2img (line 12) | def txt2img(id_task, state, FILE: modules/ui.py function create_override_settings_dropdown (line 37) | def create_override_settings_dropdown(a, _b): function gr_show (line 41) | def gr_show(visible=True): function create_output_panel (line 45) | def create_output_panel(tabname, outdir): # pylint: disable=unused-argum... function send_gradio_gallery_to_image (line 50) | def send_gradio_gallery_to_image(x): function create_refresh_button (line 56) | def create_refresh_button(refresh_component, refresh_method, refreshed_a... function connect_clear_prompt (line 60) | def connect_clear_prompt(button): # pylint: disable=unused-argument function setup_progressbar (line 64) | def setup_progressbar(*args, **kwargs): # pylint: disable=unused-argument function create_ui (line 68) | def create_ui(startup_timer = None): FILE: modules/ui_caption.py function vlm_caption_wrapper (line 8) | def vlm_caption_wrapper(question, system_prompt, prompt, image, model_na... function update_vlm_prompts_for_model (line 18) | def update_vlm_prompts_for_model(model_name): function update_vlm_prompt_placeholder (line 25) | def update_vlm_prompt_placeholder(question): function update_vlm_params (line 32) | def update_vlm_params(*args): function tagger_tag_wrapper (line 46) | def tagger_tag_wrapper(image, model_name, general_threshold, character_t... function tagger_batch_wrapper (line 63) | def tagger_batch_wrapper(model_name, batch_files, batch_folder, batch_st... function update_tagger_ui (line 85) | def update_tagger_ui(model_name): function update_tagger_params (line 99) | def update_tagger_params(model_name, general_threshold, character_thresh... function update_clip_params (line 114) | def update_clip_params(*args): function update_clip_model_params (line 127) | def update_clip_model_params(clip_model, blip_model, clip_mode): function update_vlm_model_params (line 135) | def update_vlm_model_params(vlm_model, vlm_system): function update_default_caption_type (line 142) | def update_default_caption_type(caption_type): function create_ui (line 148) | def create_ui(): FILE: modules/ui_common.py function gr_show (line 16) | def gr_show(visible=True): function update_generation_info (line 20) | def update_generation_info(generation_info, html_info, img_index): function plaintext_to_html (line 41) | def plaintext_to_html(text, elem_classes=[]): function infotext_to_html (line 46) | def infotext_to_html(text): function delete_files (line 64) | def delete_files(js_data, files, all_files, index): function save_files (line 107) | def save_files(js_data, files, html_info, index): function open_folder (line 233) | def open_folder(result_gallery, gallery_index = 0): function create_output_panel (line 257) | def create_output_panel(tabname, preview=True, prompt=None, height=None,... function create_refresh_button (line 346) | def create_refresh_button(refresh_component, refresh_method, refreshed_a... function create_override_inputs (line 364) | def create_override_inputs(tab): # pylint: disable=unused-argument function reuse_seed (line 372) | def reuse_seed(seed_component: gr.Number, reuse_button: gr.Button, subse... function connect_reuse_seed (line 392) | def connect_reuse_seed(seed: gr.Number, reuse_seed_btn: gr.Button, gener... function update_token_counter (line 425) | def update_token_counter(text): FILE: modules/ui_components.py class FormComponent (line 4) | class FormComponent: method get_expected_parent (line 5) | def get_expected_parent(self): class ToolButton (line 12) | class ToolButton(FormComponent, gr.Button): # small button with single e... method __init__ (line 13) | def __init__(self, *args, **kwargs): method get_block_name (line 17) | def get_block_name(self): class FormRow (line 22) | class FormRow(FormComponent, gr.Row): # unused method get_block_name (line 23) | def get_block_name(self): class FormColumn (line 27) | class FormColumn(FormComponent, gr.Column): # unused method get_block_name (line 28) | def get_block_name(self): class FormGroup (line 32) | class FormGroup(FormComponent, gr.Group): # unused method get_block_name (line 33) | def get_block_name(self): class FormHTML (line 37) | class FormHTML(FormComponent, gr.HTML): # unused method get_block_name (line 38) | def get_block_name(self): class FormColorPicker (line 42) | class FormColorPicker(FormComponent, gr.ColorPicker): # unused method get_block_name (line 43) | def get_block_name(self): class DropdownMulti (line 47) | class DropdownMulti(FormComponent, gr.Dropdown): # unused method __init__ (line 48) | def __init__(self, **kwargs): method get_block_name (line 50) | def get_block_name(self): class DropdownEditable (line 54) | class DropdownEditable(FormComponent, gr.Dropdown): # unused method __init__ (line 55) | def __init__(self, **kwargs): method get_block_name (line 57) | def get_block_name(self): class InputAccordion (line 61) | class InputAccordion(gr.Checkbox): # unused method __init__ (line 63) | def __init__(self, value, **kwargs): method extra (line 80) | def extra(self): method __enter__ (line 83) | def __enter__(self): method __exit__ (line 87) | def __exit__(self, exc_type, exc_val, exc_tb): method get_block_name (line 90) | def get_block_name(self): class ResizeHandleRow (line 94) | class ResizeHandleRow(gr.Row): # unusued method __init__ (line 95) | def __init__(self, **kwargs): method get_block_name (line 98) | def get_block_name(self): FILE: modules/ui_control.py function return_stats (line 19) | def return_stats(t: float = None): function return_controls (line 48) | def return_controls(res, t: float = None): function get_units (line 73) | def get_units(*values): function generate_click (line 90) | def generate_click(job_id: str, state: str, active_tab: str, *args): function generate_click_alt (line 118) | def generate_click_alt(job_id: str, state: str, active_tab: str, *args): function create_ui (line 146) | def create_ui(_blocks: gr.Blocks=None): FILE: modules/ui_control_elements.py function create_ui_elements (line 14) | def create_ui_elements(units, result_txt, preview_process): FILE: modules/ui_control_helpers.py function initialize (line 20) | def initialize(): function interrogate (line 51) | def interrogate(): function display_units (line 64) | def display_units(num_units): function get_video (line 69) | def get_video(filepath: str): function process_kanvas (line 83) | def process_kanvas(x): # only used when kanvas overrides gr.Image object function select_input (line 131) | def select_input(input_mode, input_image, init_image, init_type, input_v... function copy_input (line 209) | def copy_input(mode_from, mode_to, input_image, input_resize, input_inpa... function transfer_input (line 229) | def transfer_input(dst): FILE: modules/ui_docs.py class Page (line 8) | class Page(): method __init__ (line 9) | def __init__(self, fn, full: bool = True): method read (line 20) | def read(self, full: bool = True): method search (line 36) | def search(self, text): method get (line 78) | def get(self): method __str__ (line 90) | def __str__(self): class Pages (line 94) | class Pages(): method __init__ (line 95) | def __init__(self): method build (line 101) | def build(self, full: bool = True): method search (line 111) | def search(self, text: str, topk: int = 10, full: bool = True) -> list... method get (line 127) | def get(self, title: str) -> Page: function get_docs_page (line 139) | def get_docs_page(page_title: str) -> str: function search_html (line 148) | def search_html(pages: list[Page]) -> str: function search_docs (line 165) | def search_docs(search_term): function get_github_page (line 178) | def get_github_page(page): function search_github (line 189) | def search_github(search_term): function create_ui_logs (line 231) | def create_ui_logs(): function create_ui_github (line 248) | def create_ui_github(): function create_ui_docs (line 262) | def create_ui_docs(): function create_ui (line 277) | def create_ui(): FILE: modules/ui_extensions.py function get_installed (line 37) | def get_installed(ext): function list_extensions (line 42) | def list_extensions(): function apply_changes (line 75) | def apply_changes(disable_list, update_list, disable_all): function check_updates (line 98) | def check_updates(_id_task, disable_list, search_text, sort_column): function normalize_git_url (line 128) | def normalize_git_url(url: str | None) -> str: function install_extension_from_url (line 132) | def install_extension_from_url(dirname, url, branch_name, search_text, s... function install_extension (line 189) | def install_extension(extension_to_install, search_text, sort_column): function uninstall_extension (line 195) | def uninstall_extension(extension_path, search_text, sort_column): function update_extension (line 225) | def update_extension(extension_path, search_text, sort_column): function refresh_extensions_list (line 252) | def refresh_extensions_list(search_text, sort_column): function search_extensions (line 273) | def search_extensions(search_text, sort_column): function make_wrappable_html (line 278) | def make_wrappable_html(text: str) -> str: function create_html (line 284) | def create_html(search_text, sort_column): function create_ui (line 436) | def create_ui(): FILE: modules/ui_extra_networks.py function init_api (line 54) | def init_api(): class DateTimeEncoder (line 125) | class DateTimeEncoder(json.JSONEncoder): method default (line 126) | def default(self, o): class ExtraNetworksPage (line 133) | class ExtraNetworksPage: method __init__ (line 134) | def __init__(self, title): method __str__ (line 153) | def __str__(self): method switch_view (line 156) | def switch_view(self, tabname: str): method refresh (line 166) | def refresh(self): method patch (line 169) | def patch(self, text: str, tabname: str): method create_xyz_grid (line 172) | def create_xyz_grid(self): method find_version (line 175) | def find_version(self, item, info): method link_preview (line 198) | def link_preview(self, filename): method get_exif (line 204) | def get_exif(self, image: Image.Image): method create_thumb (line 221) | def create_thumb(self): method create_items (line 256) | def create_items(self, tabname): method create_page (line 276) | def create_page(self, tabname, skip = False): method list_items (line 379) | def list_items(self): method allowed_directories_for_previews (line 382) | def allowed_directories_for_previews(self): method create_html (line 385) | def create_html(self, item, tabname): method find_preview_file (line 426) | def find_preview_file(self, path): method find_preview (line 447) | def find_preview(self, filename): method update_all_previews (line 453) | def update_all_previews(self, items): method find_description (line 500) | def find_description(self, path, info=None): method find_info (line 532) | def find_info(self, path): function initialize (line 549) | def initialize(): function register_page (line 553) | def register_page(page: ExtraNetworksPage): function register_pages (line 567) | def register_pages(): function get_pages (line 590) | def get_pages(title=None): class ExtraNetworksUi (line 613) | class ExtraNetworksUi: method __init__ (line 614) | def __init__(self): function create_ui (line 642) | def create_ui(container, button_parent, tabname, skip_indexing = False): function setup_ui (line 1102) | def setup_ui(ui, gallery: gr.Gallery = None): FILE: modules/ui_extra_networks_checkpoints.py class ExtraNetworksPageCheckpoints (line 26) | class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage): method __init__ (line 27) | def __init__(self): method refresh (line 30) | def refresh(self): method list_reference (line 33) | def list_reference(self): # pylint: disable=inconsistent-return-statem... method create_item (line 122) | def create_item(self, name): method list_items (line 153) | def list_items(self): method allowed_directories_for_previews (line 166) | def allowed_directories_for_previews(self): FILE: modules/ui_extra_networks_history.py class ExtraNetworksPageHistory (line 7) | class ExtraNetworksPageHistory(ui_extra_networks.ExtraNetworksPage): method __init__ (line 8) | def __init__(self): method refresh (line 13) | def refresh(self): method list_items (line 20) | def list_items(self): method find_description (line 35) | def find_description(self, path, info=None): FILE: modules/ui_extra_networks_lora.py class ExtraNetworksPageLora (line 11) | class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage): method __init__ (line 12) | def __init__(self): method refresh (line 16) | def refresh(self): method get_tags (line 20) | def get_tags(l, info, version): method cleanup_version (line 67) | def cleanup_version(self, dct, lora): method create_item (line 72) | def create_item(self, name): method list_items (line 106) | def list_items(self): method allowed_directories_for_previews (line 117) | def allowed_directories_for_previews(self): FILE: modules/ui_extra_networks_styles.py class ExtraNetworksPageStyles (line 8) | class ExtraNetworksPageStyles(ui_extra_networks.ExtraNetworksPage): method __init__ (line 9) | def __init__(self): method refresh (line 12) | def refresh(self): method parse_desc (line 15) | def parse_desc(self, desc): method create_style (line 47) | def create_style(self, params): method create_item (line 69) | def create_item(self, k): method list_items (line 101) | def list_items(self): method allowed_directories_for_previews (line 107) | def allowed_directories_for_previews(self): class ExtraNetworkStyles (line 111) | class ExtraNetworkStyles(extra_networks.ExtraNetwork): method __init__ (line 112) | def __init__(self): method activate (line 116) | def activate(self, p, params_list): method deactivate (line 138) | def deactivate(self, p, force=False): FILE: modules/ui_extra_networks_textual_inversion.py class ExtraNetworksPageTextualInversion (line 7) | class ExtraNetworksPageTextualInversion(ui_extra_networks.ExtraNetworksP... method __init__ (line 8) | def __init__(self): method refresh (line 13) | def refresh(self): method create_item (line 19) | def create_item(self, embedding: Embedding): method list_items (line 44) | def list_items(self): method allowed_directories_for_previews (line 62) | def allowed_directories_for_previews(self): FILE: modules/ui_extra_networks_vae.py class ExtraNetworksPageVAEs (line 7) | class ExtraNetworksPageVAEs(ui_extra_networks.ExtraNetworksPage): method __init__ (line 8) | def __init__(self): method refresh (line 11) | def refresh(self): method list_items (line 14) | def list_items(self): method allowed_directories_for_previews (line 41) | def allowed_directories_for_previews(self): FILE: modules/ui_extra_networks_wildcards.py class ExtraNetworksPageWildcards (line 9) | class ExtraNetworksPageWildcards(ui_extra_networks.ExtraNetworksPage): method __init__ (line 10) | def __init__(self): method parents (line 13) | def parents(self, file): method refresh (line 19) | def refresh(self): method list_items (line 26) | def list_items(self): method allowed_directories_for_previews (line 49) | def allowed_directories_for_previews(self): FILE: modules/ui_gallery.py function read_media (line 9) | def read_media(fn): function create_ui (line 56) | def create_ui(): FILE: modules/ui_guidance.py function create_guidance_inputs (line 9) | def create_guidance_inputs(tab): FILE: modules/ui_history.py function create_ui (line 4) | def create_ui(): FILE: modules/ui_img2img.py function process_interrogate (line 6) | def process_interrogate(mode, ii_input_files, ii_input_dir, ii_output_di... function create_ui (line 35) | def create_ui(): FILE: modules/ui_javascript.py function webpath (line 9) | def webpath(fn): function html_head (line 20) | def html_head(): function html_body (line 47) | def html_body(): function html_login (line 56) | def html_login(): function html_css (line 64) | def html_css(css: list[str]): function reload_javascript (line 100) | def reload_javascript(): FILE: modules/ui_loadsave.py class UiLoadsave (line 11) | class UiLoadsave: method __init__ (line 14) | def __init__(self, filename): method add_component (line 26) | def add_component(self, path, x): method add_block (line 107) | def add_block(self, x, path=""): method read_from_file (line 121) | def read_from_file(self): method write_to_file (line 125) | def write_to_file(self, current_ui_settings): method dump_defaults (line 129) | def dump_defaults(self): method iter_all (line 134) | def iter_all(self, values): method iter_changes (line 159) | def iter_changes(self, values): method iter_menus (line 182) | def iter_menus(self): method ui_view (line 194) | def ui_view(self, *values): method ui_apply (line 225) | def ui_apply(self, *values): method ui_submenu_apply (line 246) | def ui_submenu_apply(self, items): method ui_restore (line 280) | def ui_restore(self): method create_ui (line 286) | def create_ui(self): method setup_ui (line 294) | def setup_ui(self): FILE: modules/ui_models.py function create_ui (line 15) | def create_ui(): FILE: modules/ui_models_load.py function load_model (line 17) | def load_model(model: str, cls: str, repo: str, dataframes: list): function unload_model (line 78) | def unload_model(): function process_huggingface_url (line 83) | def process_huggingface_url(url): class Component (line 104) | class Component(): method __init__ (line 105) | def __init__(self, signature, name=None, cls=None, val=None, local=Non... method __str__ (line 148) | def __str__(self): method save (line 151) | def save(self): method dataframe (line 154) | def dataframe(self): method load (line 157) | def load(self): function create_ui (line 215) | def create_ui(gr_status, gr_file): FILE: modules/ui_postprocessing.py function submit_info (line 5) | def submit_info(image): function submit_process (line 14) | def submit_process(tab_index, extras_image, image_batch, extras_batch_in... function create_ui (line 20) | def create_ui(): FILE: modules/ui_prompt_styles.py function select_style (line 10) | def select_style(name): function save_style (line 19) | def save_style(name, prompt, negative_prompt): function delete_style (line 28) | def delete_style(name): function materialize_styles (line 36) | def materialize_styles(prompt, negative_prompt, styles): # pylint: disab... function refresh_styles (line 42) | def refresh_styles(): class UiPromptStyles (line 46) | class UiPromptStyles: method __init__ (line 47) | def __init__(self, tabname, main_ui_prompt, main_ui_negative_prompt): ... FILE: modules/ui_sections.py function create_toprow (line 7) | def create_toprow(is_img2img: bool = False, id_part: str = None, generat... function ar_change (line 66) | def ar_change(ar, width, height): function create_resolution_inputs (line 82) | def create_resolution_inputs(tab, default_width=1024, default_height=1024): function create_interrogate_button (line 94) | def create_interrogate_button(tab: str, inputs: list = None, outputs: st... function create_batch_inputs (line 101) | def create_batch_inputs(tab, accordion=True): function create_seed_inputs (line 109) | def create_seed_inputs(tab, reuse_visible=True, accordion=True, subseed_... function create_video_inputs (line 128) | def create_video_inputs(tab:str, show_always:bool=False): function create_advanced_inputs (line 149) | def create_advanced_inputs(tab): function create_correction_inputs (line 162) | def create_correction_inputs(tab): function create_sampler_and_steps_selection (line 186) | def create_sampler_and_steps_selection(choices, tabname, default_steps:i... function create_sampler_options (line 196) | def create_sampler_options(tabname): function create_hires_inputs (line 299) | def create_hires_inputs(tab): function create_resize_inputs (line 319) | def create_resize_inputs(tab, images, accordion=True, latent=False, non_... FILE: modules/ui_settings.py function apply_setting (line 17) | def apply_setting(key, value): function get_value_for_setting (line 44) | def get_value_for_setting(key): function create_setting_component (line 52) | def create_setting_component(key, is_quicksettings=False): function create_dirty_indicator (line 108) | def create_dirty_indicator(key, keys_to_reset, **kwargs): function run_settings (line 120) | def run_settings(*args): function run_settings_single (line 159) | def run_settings_single(value, key, progress=False): function create_ui (line 176) | def create_ui(disabled_tabs=[]): function reset_quicksettings (line 313) | def reset_quicksettings(quick_components): function create_quicksettings (line 322) | def create_quicksettings(interfaces): FILE: modules/ui_symbols.py class SVGSymbol (line 54) | class SVGSymbol: method __stylize (line 60) | def __stylize(cls, svg: str, color: str | None = None, display: str | ... method __init__ (line 67) | def __init__(self, svg: str): method style (line 81) | def style(self, color: str | None = None, display: str | None = None) ... method __str__ (line 88) | def __str__(self): FILE: modules/ui_txt2img.py function create_ui (line 6) | def create_ui(): FILE: modules/ui_video.py function create_ui (line 9) | def create_ui(): FILE: modules/ui_video_vlm.py function enhance_prompt (line 24) | def enhance_prompt(enable:bool, model:str=None, image=None, prompt:str='... function create_ui (line 54) | def create_ui(prompt_element:gr.Textbox, image_element:gr.Image): FILE: modules/update.py function get_version (line 16) | def get_version(): function apply_update (line 47) | def apply_update(update_rebase, update_submodules, update_extensions): function create_ui (line 87) | def create_ui(): FILE: modules/upscaler.py class Upscaler (line 10) | class Upscaler: method __init__ (line 23) | def __init__(self, create_dirs=True): method find_folder (line 54) | def find_folder(self, folder, scalers, loaded): method find_scalers (line 70) | def find_scalers(self): method do_upscale (line 89) | def do_upscale(self, img: Image, selected_model: str): method upscale (line 92) | def upscale(self, img: Image, scale, selected_model: str = None): method load_model (line 117) | def load_model(self, path: str): method find_models (line 120) | def find_models(self, ext_filter=None) -> list: # pylint: disable=unus... method update_status (line 123) | def update_status(self, prompt): method find_model (line 126) | def find_model(self, path): class UpscalerData (line 144) | class UpscalerData: method __init__ (line 152) | def __init__(self, name: str, path: str = None, upscaler: Upscaler = N... function compile_upscaler (line 161) | def compile_upscaler(model): FILE: modules/upscaler_algo.py class UpscalerDCC (line 7) | class UpscalerDCC(Upscaler): method __init__ (line 8) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 16) | def do_upscale(self, img: Image, selected_model=None): class UpscalerVIPS (line 32) | class UpscalerVIPS(Upscaler): method __init__ (line 33) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 44) | def do_upscale(self, img: Image, selected_model=None): class UpscalerHQX (line 79) | class UpscalerHQX(Upscaler): method __init__ (line 80) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 87) | def do_upscale(self, img: Image, selected_model=None): class UpscalerICBI (line 99) | class UpscalerICBI(Upscaler): method __init__ (line 100) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 107) | def do_upscale(self, img: Image, selected_model=None): FILE: modules/upscaler_simple.py class UpscalerNone (line 6) | class UpscalerNone(Upscaler): method __init__ (line 7) | def __init__(self, dirname=None): # pylint: disable=unused-argument method load_model (line 12) | def load_model(self, path): method do_upscale (line 15) | def do_upscale(self, img, selected_model=None): class UpscalerResize (line 19) | class UpscalerResize(Upscaler): method __init__ (line 20) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 32) | def do_upscale(self, img: Image, selected_model=None): method load_model (line 51) | def load_model(self, _): class UpscalerLatent (line 55) | class UpscalerLatent(Upscaler): method __init__ (line 56) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 69) | def do_upscale(self, img: Image, selected_model=None): FILE: modules/upscaler_spandrel.py class UpscalerSpandrel (line 14) | class UpscalerSpandrel(Upscaler): method __init__ (line 15) | def __init__(self, dirname=None): # pylint: disable=unused-argument method process (line 27) | def process(self, img: Image.Image) -> Image.Image: method do_upscale (line 40) | def do_upscale(self, img: Image, selected_model=None): FILE: modules/upscaler_vae.py class UpscalerAsymmetricVAE (line 6) | class UpscalerAsymmetricVAE(Upscaler): method __init__ (line 7) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 17) | def do_upscale(self, img: Image, selected_model=None): class UpscalerWanUpscale (line 46) | class UpscalerWanUpscale(Upscaler): method __init__ (line 47) | def __init__(self, dirname=None): # pylint: disable=unused-argument method do_upscale (line 57) | def do_upscale(self, img: Image, selected_model=None): FILE: modules/vae/sd_vae_approx.py class VAEApprox (line 10) | class VAEApprox(nn.Module): method __init__ (line 11) | def __init__(self): method forward (line 22) | def forward(self, x): function nn_approximation (line 35) | def nn_approximation(sample): # Approximate NN function cheap_approximation (line 61) | def cheap_approximation(sample): # Approximate simple FILE: modules/vae/sd_vae_fal.py function is_compatile (line 16) | def is_compatile(): function load_fal_vae (line 20) | def load_fal_vae(): function unload_fal_vae (line 35) | def unload_fal_vae(): class Flux2TinyAutoEncoder (line 45) | class Flux2TinyAutoEncoder(ModelMixin, ConfigMixin): method __init__ (line 47) | def __init__( method encode (line 100) | def encode(self, x: torch.Tensor, return_dict: bool = True) -> Encoder... method decode (line 108) | def decode(self, z: torch.Tensor, return_dict: bool = True) -> Decoder... method forward (line 116) | def forward(self, sample: torch.Tensor, return_dict: bool = True) -> D... FILE: modules/vae/sd_vae_natten.py function init (line 12) | def init(): function fuse_qkv (line 23) | def fuse_qkv(attn: Attention) -> None: function fuse_vae_qkv (line 33) | def fuse_vae_qkv(vae) -> None: class NattenAttnProcessor (line 38) | class NattenAttnProcessor: method __init__ (line 41) | def __init__(self, kernel_size: int): method __call__ (line 44) | def __call__( function enable_natten (line 82) | def enable_natten(pipe): FILE: modules/vae/sd_vae_ostris.py function load_vae (line 13) | def load_vae(pipe): FILE: modules/vae/sd_vae_remote.py function remote_decode (line 49) | def remote_decode(latents: torch.Tensor, width: int = 0, height: int = 0... function remote_encode (line 130) | def remote_encode(images: list[Image.Image], model_type: str | None = No... FILE: modules/vae/sd_vae_repa.py function repa_load (line 16) | def repa_load(latents): FILE: modules/vae/sd_vae_stablecascade.py class Previewer (line 11) | class Previewer(nn.Module): method __init__ (line 12) | def __init__(self, c_in=16, c_hidden=512, c_out=3): method forward (line 50) | def forward(self, x): function download_model (line 54) | def download_model(model_path): function load_model (line 63) | def load_model(model_path): function decode (line 70) | def decode(latents): FILE: modules/vae/sd_vae_taesd.py function warn_once (line 50) | def warn_once(msg, variant=None): function get_model (line 59) | def get_model(model_type = 'decoder', variant = None): function decode (line 152) | def decode(latents): function encode (line 187) | def encode(image): FILE: modules/video.py function interpolate_frames (line 9) | def interpolate_frames(images, count: int = 0, scale: float = 1.0, pad: ... function save_video_atomic (line 26) | def save_video_atomic(images, filename, video_type: str = 'none', durati... function save_video (line 63) | def save_video(p, images, filename = None, video_type: str = 'none', dur... function get_video_params (line 92) | def get_video_params(filepath: str, capture: bool = False): FILE: modules/video_models/google_veo.py function google_requirements (line 31) | def google_requirements(): function get_size_buckets (line 37) | def get_size_buckets(width: int, height: int) -> str: class GoogleVeoVideoPipeline (line 46) | class GoogleVeoVideoPipeline(): method __init__ (line 47) | def __init__(self, model_name: str): method txt2vid (line 54) | def txt2vid(self, prompt): method img2vid (line 61) | def img2vid(self, prompt, image): method get_args (line 72) | def get_args(self): method __call__ (line 112) | def __call__(self, prompt: list[str], width: int, height: int, image: ... function load_veo (line 171) | def load_veo(model_name): # pylint: disable=unused-argument FILE: modules/video_models/models_def.py class Model (line 9) | class Model(): method __str__ (line 29) | def __str__(self): FILE: modules/video_models/video_cache.py function apply_teacache_patch (line 5) | def apply_teacache_patch(cls): FILE: modules/video_models/video_load.py function _loader (line 11) | def _loader(component): function load_custom (line 23) | def load_custom(model_name: str): function load_model (line 32) | def load_model(selected: models_def.Model): function load_upscale_vae (line 195) | def load_upscale_vae(): FILE: modules/video_models/video_overrides.py function load_override (line 11) | def load_override(selected: Model, **load_args): function set_overrides (line 35) | def set_overrides(p: processing.StableDiffusionProcessingVideo, selected... FILE: modules/video_models/video_prompt.py function prepare_prompt (line 4) | def prepare_prompt(p, init_image, prompt:str, vlm_enhance:bool, vlm_mode... FILE: modules/video_models/video_run.py function generate (line 12) | def generate(*args, **kwargs): FILE: modules/video_models/video_save.py function get_video_filename (line 13) | def get_video_filename(p:processing.StableDiffusionProcessingVideo): function save_params (line 31) | def save_params(p, filename: str = None): function images_to_tensor (line 55) | def images_to_tensor(images): function numpy_to_tensor (line 67) | def numpy_to_tensor(images): function write_audio (line 80) | def write_audio( function atomic_save_video (line 131) | def atomic_save_video(filename: str, function save_video (line 193) | def save_video( FILE: modules/video_models/video_ui.py function engine_change (line 12) | def engine_change(engine): function get_selected (line 18) | def get_selected(engine, model): function model_change (line 26) | def model_change(engine, model): function model_load (line 34) | def model_load(engine, model): function run_video (line 52) | def run_video(*args): function create_ui_inputs (line 80) | def create_ui_inputs(): function create_ui_outputs (line 91) | def create_ui_outputs(): function create_ui_size (line 109) | def create_ui_size(): function create_ui (line 123) | def create_ui(prompt, negative, styles, overrides, init_image, init_stre... FILE: modules/video_models/video_utils.py function queue_err (line 12) | def queue_err(msg): function get_url (line 17) | def get_url(url): function check_av (line 21) | def check_av(): function set_prompt (line 32) | def set_prompt(p): function hijack_encode_image (line 41) | def hijack_encode_image(*args, **kwargs): function get_codecs (line 57) | def get_codecs(): function decode_fourcc (line 80) | def decode_fourcc(cc): function get_video_frames (line 86) | def get_video_frames(fn: str, num_frames: int = -1, skip_frames: int = 0): FILE: modules/video_models/video_vae.py function set_vae_params (line 9) | def set_vae_params(p, slicing:bool=True, tiling:bool=True, framewise:boo... function vae_decode_tiny (line 32) | def vae_decode_tiny(latents): FILE: modules/zluda.py function test (line 10) | def test(device) -> Union[Exception, None]: function zluda_init (line 23) | def zluda_init(): FILE: modules/zluda_installer.py class ZLUDAResult (line 30) | class ZLUDAResult(ctypes.Structure): class ZLUDALibrary (line 37) | class ZLUDALibrary: method __init__ (line 40) | def __init__(self, internal: ctypes.CDLL): class Core (line 44) | class Core(ZLUDALibrary): method __init__ (line 45) | def __init__(self, internal: ctypes.CDLL): method to_hip_stream (line 57) | def to_hip_stream(self, zluda_object: ctypes.c_void_p): method get_nightly_flag (line 60) | def get_nightly_flag(self) -> int: function set_default_agent (line 68) | def set_default_agent(agent: rocm.Agent): function is_reinstall_needed (line 73) | def is_reinstall_needed() -> bool: # ZLUDA<3.9.4 function install (line 77) | def install(): function uninstall (line 107) | def uninstall(): function set_blaslt_enabled (line 112) | def set_blaslt_enabled(enabled: bool): function get_blaslt_enabled (line 117) | def get_blaslt_enabled() -> bool: function link_or_copy (line 121) | def link_or_copy(src: os.PathLike, dst: os.PathLike): function load (line 131) | def load(): FILE: pipelines/bria/bria_pipeline.py class BriaPipeline (line 63) | class BriaPipeline(FluxPipeline): method __init__ (line 81) | def __init__( method encode_prompt (line 112) | def encode_prompt( method guidance_scale (line 213) | def guidance_scale(self): method do_classifier_free_guidance (line 221) | def do_classifier_free_guidance(self): method joint_attention_kwargs (line 225) | def joint_attention_kwargs(self): method num_timesteps (line 229) | def num_timesteps(self): method interrupt (line 233) | def interrupt(self): method __call__ (line 238) | def __call__( method check_inputs (line 516) | def check_inputs( method to (line 567) | def to(self, *args, **kwargs): method prepare_latents (line 580) | def prepare_latents( method _pack_latents (line 616) | def _pack_latents(latents, batch_size, num_channels_latents, height, w... method _unpack_latents (line 624) | def _unpack_latents(latents, height, width, vae_scale_factor): method _prepare_latent_image_ids (line 638) | def _prepare_latent_image_ids(batch_size, height, width, device, dtype): FILE: pipelines/bria/bria_utils.py function get_text (line 23) | def get_text(caption): function get_by_t5_prompt_embeds (line 55) | def get_by_t5_prompt_embeds( function get_t5_prompt_embeds (line 99) | def get_t5_prompt_embeds( function get_original_sigmas (line 149) | def get_original_sigmas(num_train_timesteps=1000,num_inference_steps=1000): function is_ng_none (line 157) | def is_ng_none(negative_prompt): class CudaTimerContext (line 160) | class CudaTimerContext: method __init__ (line 161) | def __init__(self, times_arr): method __enter__ (line 164) | def __enter__(self): method __exit__ (line 169) | def __exit__(self, type, value, traceback): function get_env_prefix (line 176) | def get_env_prefix(): function compute_density_for_timestep_sampling (line 186) | def compute_density_for_timestep_sampling( function compute_loss_weighting_for_sd3 (line 206) | def compute_loss_weighting_for_sd3(weighting_scheme: str, sigmas=None): function initialize_distributed (line 223) | def initialize_distributed(): function get_clip_prompt_embeds (line 234) | def get_clip_prompt_embeds( function get_1d_rotary_pos_embed (line 287) | def get_1d_rotary_pos_embed( class FluxPosEmbed (line 353) | class FluxPosEmbed(torch.nn.Module): method __init__ (line 355) | def __init__(self, theta: int, axes_dim: List[int]): method forward (line 360) | def forward(self, ids: torch.Tensor) -> torch.Tensor: function get_cosine_schedule_with_warmup_and_decay (line 387) | def get_cosine_schedule_with_warmup_and_decay( function get_lr_scheduler (line 429) | def get_lr_scheduler( FILE: pipelines/bria/transformer_block.py class FluxSingleTransformerBlock (line 46) | class FluxSingleTransformerBlock(nn.Module): method __init__ (line 47) | def __init__(self, dim: int, num_attention_heads: int, attention_head_... method forward (line 79) | def forward( class FluxTransformerBlock (line 107) | class FluxTransformerBlock(nn.Module): method __init__ (line 108) | def __init__( method forward (line 136) | def forward( class FluxTransformer2DModel (line 193) | class FluxTransformer2DModel( method __init__ (line 232) | def __init__( method attn_processors (line 291) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 315) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method fuse_qkv_projections (line 350) | def fuse_qkv_projections(self): method unfuse_qkv_projections (line 376) | def unfuse_qkv_projections(self): method forward (line 389) | def forward( FILE: pipelines/bria/transformer_bria.py class Timesteps (line 17) | class Timesteps(nn.Module): method __init__ (line 18) | def __init__(self, num_channels: int, flip_sin_to_cos: bool, downscale... method forward (line 26) | def forward(self, timesteps): class TimestepProjEmbeddings (line 37) | class TimestepProjEmbeddings(nn.Module): method __init__ (line 38) | def __init__(self, embedding_dim, time_theta): method forward (line 44) | def forward(self, timestep, dtype): class BriaTransformer2DModel (line 55) | class BriaTransformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMixin, ... method __init__ (line 76) | def __init__( method _set_gradient_checkpointing (line 138) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 142) | def forward( FILE: pipelines/f_lite/f_lite.model.py function timestep_embedding (line 17) | def timestep_embedding(t, dim, max_period=10000): class RMSNorm (line 28) | class RMSNorm(nn.Module): method __init__ (line 29) | def __init__(self, dim, eps=1e-6, trainable=False): method forward (line 37) | def forward(self, x): class QKNorm (line 47) | class QKNorm(nn.Module): method __init__ (line 50) | def __init__(self, dim, trainable=False): method forward (line 55) | def forward(self, q, k): class Attention (line 61) | class Attention(nn.Module): method __init__ (line 62) | def __init__( method forward (line 94) | def forward(self, x, context=None, v_0=None, rope=None): class DiTBlock (line 136) | class DiTBlock(nn.Module): method __init__ (line 137) | def __init__( method forward (line 187) | def forward(self, x, context, c, v_0=None, rope=None): class PatchEmbed (line 229) | class PatchEmbed(nn.Module): method __init__ (line 230) | def __init__(self, patch_size=16, in_channels=3, embed_dim=768): method forward (line 235) | def forward(self, x): class TwoDimRotary (line 242) | class TwoDimRotary(torch.nn.Module): method __init__ (line 243) | def __init__(self, dim, base=10000, h=256, w=256): method forward (line 261) | def forward(self, x, height_width=None, extend_with_register_tokens=0): function apply_rotary_emb (line 294) | def apply_rotary_emb(x, cos, sin): class DiT (line 306) | class DiT(ModelMixin, ConfigMixin, FromOriginalModelMixin, PeftAdapterMi... method __init__ (line 308) | def __init__( method save_lora_weights (line 371) | def save_lora_weights(self, save_directory): method load_lora_weights (line 376) | def load_lora_weights(self, load_directory): method forward (line 382) | def forward(self, x, context, timesteps): FILE: pipelines/f_lite/model.py function timestep_embedding (line 17) | def timestep_embedding(t, dim, max_period=10000): class RMSNorm (line 28) | class RMSNorm(nn.Module): method __init__ (line 29) | def __init__(self, dim, eps=1e-6, trainable=False): method forward (line 37) | def forward(self, x): class QKNorm (line 47) | class QKNorm(nn.Module): method __init__ (line 50) | def __init__(self, dim, trainable=False): method forward (line 55) | def forward(self, q, k): class Attention (line 61) | class Attention(nn.Module): method __init__ (line 62) | def __init__( method forward (line 94) | def forward(self, x, context=None, v_0=None, rope=None): class DiTBlock (line 136) | class DiTBlock(nn.Module): method __init__ (line 137) | def __init__( method forward (line 187) | def forward(self, x, context, c, v_0=None, rope=None): class PatchEmbed (line 229) | class PatchEmbed(nn.Module): method __init__ (line 230) | def __init__(self, patch_size=16, in_channels=3, embed_dim=768): method forward (line 235) | def forward(self, x): class TwoDimRotary (line 242) | class TwoDimRotary(torch.nn.Module): method __init__ (line 243) | def __init__(self, dim, base=10000, h=256, w=256): method forward (line 261) | def forward(self, x, height_width=None, extend_with_register_tokens=0): function apply_rotary_emb (line 294) | def apply_rotary_emb(x, cos, sin): class DiT (line 306) | class DiT(ModelMixin, ConfigMixin, FromOriginalModelMixin, PeftAdapterMi... method __init__ (line 308) | def __init__( method save_lora_weights (line 371) | def save_lora_weights(self, save_directory): method load_lora_weights (line 376) | def load_lora_weights(self, load_directory): method forward (line 382) | def forward(self, x, context, timesteps): FILE: pipelines/f_lite/pipeline.py class APGConfig (line 22) | class APGConfig: class FLitePipelineOutput (line 30) | class FLitePipelineOutput(BaseOutput): class FLitePipeline (line 42) | class FLitePipeline(DiffusionPipeline): method __init__ (line 56) | def __init__( method enable_vae_slicing (line 79) | def enable_vae_slicing(self): method enable_vae_tiling (line 84) | def enable_vae_tiling(self): method set_progress_bar_config (line 89) | def set_progress_bar_config(self, **kwargs): method progress_bar (line 93) | def progress_bar(self, iterable=None, **kwargs): method encode_prompt (line 99) | def encode_prompt( method to (line 148) | def to(self, torch_device=None, torch_dtype=None, silence_dtype_warnin... method __call__ (line 159) | def __call__( FILE: pipelines/flex2/__init__.py class Flex2Pipeline (line 12) | class Flex2Pipeline(FluxControlPipeline): method __init__ (line 13) | def __init__( method check_inputs (line 25) | def check_inputs( method __call__ (line 61) | def __call__( FILE: pipelines/flux/flux_bnb.py function load_flux_bnb (line 6) | def load_flux_bnb(checkpoint_info, diffusers_load_config): # pylint: dis... FILE: pipelines/flux/flux_legacy_loader.py function load_flux_quanto (line 14) | def load_flux_quanto(checkpoint_info): function load_flux_bnb (line 76) | def load_flux_bnb(checkpoint_info, diffusers_load_config): # pylint: dis... function load_quants (line 107) | def load_quants(kwargs, repo_id, cache_dir, allow_quant): # pylint: disa... function load_transformer (line 156) | def load_transformer(file_path): # triggered by opts.sd_unet change function load_flux (line 206) | def load_flux(checkpoint_info, diffusers_load_config): # triggered by op... FILE: pipelines/flux/flux_lora.py function calculate_module_shape (line 1) | def calculate_module_shape(model, base_module=None, base_weight_param_na... function apply_patch (line 29) | def apply_patch(): FILE: pipelines/flux/flux_nf4.py function _replace_with_bnb_linear (line 20) | def _replace_with_bnb_linear( function check_quantized_param (line 69) | def check_quantized_param( function create_quantized_param (line 86) | def create_quantized_param( function load_flux_nf4 (line 145) | def load_flux_nf4(checkpoint_info, prequantized: bool = True): FILE: pipelines/flux/flux_nunchaku.py function load_flux_nunchaku (line 4) | def load_flux_nunchaku(repo_id): FILE: pipelines/flux/flux_quanto.py function load_flux_quanto (line 14) | def load_flux_quanto(checkpoint_info): FILE: pipelines/generic.py function _loader (line 12) | def _loader(component): function load_transformer (line 21) | def load_transformer(repo_id, cls_name, load_config=None, subfolder="tra... function load_text_encoder (line 102) | def load_text_encoder(repo_id, cls_name, load_config=None, subfolder="te... FILE: pipelines/hdm/hdm/data/base.py class BaseDataset (line 10) | class BaseDataset(Data.Dataset): method collate (line 11) | def collate(self, batch): class DummyDataset (line 31) | class DummyDataset(BaseDataset): method __init__ (line 32) | def __init__( method __len__ (line 48) | def __len__(self): method __getitem__ (line 51) | def __getitem__(self, index): class CombineDataset (line 71) | class CombineDataset(Data.Dataset): method __init__ (line 72) | def __init__( method collate (line 109) | def collate(self, batch): method __len__ (line 148) | def __len__(self): method __getitem__ (line 152) | def __getitem__(self, index): FILE: pipelines/hdm/hdm/data/kohya.py function get_files (line 21) | def get_files(folder): function load_npy (line 32) | def load_npy(path): function load_pickle (line 45) | def load_pickle(path): function conver_rgb (line 52) | def conver_rgb(x): class KohyaDataset (line 56) | class KohyaDataset(Data.Dataset): method __init__ (line 57) | def __init__( method __len__ (line 117) | def __len__(self): method get_caption (line 120) | def get_caption(self, txt_file): method get_data_from_files (line 152) | def get_data_from_files(self, img_file, txt_file, resize=None): method make_cropped_pos (line 163) | def make_cropped_pos(self, img_t, target_h, target_w): method _getitem (line 180) | def _getitem(self, img_file, txt_file): method __getitem__ (line 188) | def __getitem__(self, index): FILE: pipelines/hdm/hdm/loader.py function model_loader (line 13) | def model_loader( function load_trainer (line 79) | def load_trainer(conf: dict, unet=None, te=None, vae=None, scheduler=Non... function load_model (line 100) | def load_model(conf: dict): function load_dataset (line 109) | def load_dataset(conf: dict): function load_all (line 114) | def load_all(conf: dict): FILE: pipelines/hdm/hdm/modules/base.py class BasicUNet (line 12) | class BasicUNet(ModelMixin, ConfigMixin): method enable_gradient_checkpointing (line 13) | def enable_gradient_checkpointing(self): method disable_gradient_checkpointing (line 16) | def disable_gradient_checkpointing(self): method forward (line 19) | def forward( class UNetWithPos (line 38) | class UNetWithPos(UNet2DConditionModel): method __init__ (line 40) | def __init__( method forward (line 159) | def forward( FILE: pipelines/hdm/hdm/modules/rope.py function bounding_box (line 10) | def bounding_box(h, w, pixel_aspect_ratio=1.0): function make_grid (line 29) | def make_grid(h_pos, w_pos): function centers (line 36) | def centers(start, stop, num, dtype=None, device=None): function make_axial_pos (line 42) | def make_axial_pos( function rotate_half (line 55) | def rotate_half(x): function apply_rotary_emb (line 60) | def apply_rotary_emb(freqs, t, start_index=0, scale=1.0): function freqs_pixel_log (line 73) | def freqs_pixel_log(max_freq=10.0): class AxialRoPE (line 82) | class AxialRoPE(nn.Module): method __init__ (line 83) | def __init__( method extra_repr (line 93) | def extra_repr(self): method get_freqs (line 97) | def get_freqs(self, pos): method forward (line 105) | def forward(self, x, pos): FILE: pipelines/hdm/hdm/modules/text_encoders.py class BaseTextEncoder (line 11) | class BaseTextEncoder(nn.Module): method __init__ (line 12) | def __init__(self): method tokenize (line 17) | def tokenize(self, text: str) -> list[int] | list[list[int]] | torch.L... method encode (line 20) | def encode(self, text: str) -> torch.Tensor: method forward (line 23) | def forward(self, tokenizer_outputs: list[dict[str, torch.Tensor]]): class SimpleTextEncoder (line 27) | class SimpleTextEncoder(BaseTextEncoder): method __init__ (line 28) | def __init__( method tokenize (line 49) | def tokenize(self, text, **kwargs): method encode (line 52) | def encode(self, text, **kwargs): method forward (line 55) | def forward(self, tokenizers_outputs): class ConcatTextEncoders (line 83) | class ConcatTextEncoders(BaseTextEncoder): method __init__ (line 92) | def __init__( method trainable_modules (line 154) | def trainable_modules(self): method trainable_params (line 162) | def trainable_params(self): method device (line 171) | def device(self): method tokenize (line 174) | def tokenize(self, text, **kwargs): method encode (line 180) | def encode(self, text, **kwargs): method forward (line 183) | def forward( FILE: pipelines/hdm/hdm/modules/unet_patch.py class RoPEAttention (line 33) | class RoPEAttention(Attention): method __init__ (line 34) | def __init__(self, *args, **kwargs): method apply_to (line 42) | def apply_to(cls, original: Attention): method forward (line 52) | def forward( class RoPEAttnProcessor2_0 (line 70) | class RoPEAttnProcessor2_0(AttnProcessor2_0): method __call__ (line 71) | def __call__( class RoPEXFormersAttnProcessor (line 171) | class RoPEXFormersAttnProcessor(XFormersAttnProcessor): method __call__ (line 172) | def __call__( class RoPEBasicTransformerBlock (line 273) | class RoPEBasicTransformerBlock(BasicTransformerBlock): method apply_to (line 275) | def apply_to(cls, original: BasicTransformerBlock): method forward (line 283) | def forward( class RoPETransformer2DModel (line 413) | class RoPETransformer2DModel(Transformer2DModel): method __init__ (line 416) | def __init__(self, *args, **kwargs): method forward (line 422) | def forward( function apply_patch (line 550) | def apply_patch(): function restore (line 557) | def restore(): class HDUNet2DConditionModel (line 564) | class HDUNet2DConditionModel(UNet2DConditionModel): method __init__ (line 565) | def __init__(self, *args, **kwargs): method from_config (line 584) | def from_config(cls, arch: dict): class RoPEUNet2DConditionModel (line 591) | class RoPEUNet2DConditionModel(HDUNet2DConditionModel): method __init__ (line 592) | def __init__(self, *args, **kwargs): method from_config (line 600) | def from_config(cls, arch: dict): method forward (line 606) | def forward(self, *args, **kwargs): FILE: pipelines/hdm/hdm/modules/xut.py class XUDiTConditionModel (line 11) | class XUDiTConditionModel(ModelMixin, ConfigMixin): method __init__ (line 15) | def __init__( method from_config (line 61) | def from_config(cls, config: Dict[str, Any] | str) -> "XUDiTConditionM... method enable_gradient_checkpointing (line 67) | def enable_gradient_checkpointing(self): method disable_gradient_checkpointing (line 70) | def disable_gradient_checkpointing(self): method forward (line 73) | def forward( FILE: pipelines/hdm/hdm/pipeline.py class HDMXUTPipeline (line 13) | class HDMXUTPipeline(DiffusionPipeline): method __init__ (line 19) | def __init__( method apply_compile (line 38) | def apply_compile(self, *args, **kwargs): method __call__ (line 52) | def __call__( FILE: pipelines/hdm/hdm/trainer/callbacks.py class ImageGenCallback (line 11) | class ImageGenCallback(Callback): method __init__ (line 12) | def __init__(self, config, img_gen_func): method on_train_batch_start (line 24) | def on_train_batch_start( FILE: pipelines/hdm/hdm/trainer/diffusion.py function get_noise_noisy_latents_and_timesteps (line 10) | def get_noise_noisy_latents_and_timesteps( function apply_snr_weight (line 36) | def apply_snr_weight(loss, timesteps, noise_scheduler, gamma, v_predicti... function apply_debiased_estimation (line 47) | def apply_debiased_estimation(loss, timesteps, noise_scheduler): function prepare_scheduler_for_custom_training (line 57) | def prepare_scheduler_for_custom_training(noise_scheduler, device): FILE: pipelines/hdm/hdm/trainer/trainer.py class BaseTrainer (line 25) | class BaseTrainer(pl.LightningModule): method __init__ (line 26) | def __init__( method configure_optimizers (line 57) | def configure_optimizers(self): class DMTrainer (line 92) | class DMTrainer(BaseTrainer): method __init__ (line 93) | def __init__( method on_train_epoch_end (line 173) | def on_train_epoch_end(self) -> None: method training_step (line 202) | def training_step(self, batch, idx): class FlowTrainer (line 268) | class FlowTrainer(BaseTrainer): method __init__ (line 269) | def __init__( method on_train_epoch_end (line 362) | def on_train_epoch_end(self) -> None: method training_step (line 391) | def training_step(self, batch, idx): FILE: pipelines/hdm/hdm/utils/__init__.py function get_obj_from_str (line 10) | def get_obj_from_str(string, reload=False): function instantiate (line 18) | def instantiate(obj): function exists (line 31) | def exists(val): function uniq (line 35) | def uniq(arr): function default (line 39) | def default(val, d): function zero_module (line 45) | def zero_module(module: nn.Module): function random_choice (line 54) | def random_choice( function count_params (line 64) | def count_params(model, verbose=False): function remove_none (line 71) | def remove_none(list_x): FILE: pipelines/hdm/hdm/utils/config.py function load_train_config (line 6) | def load_train_config(file): FILE: pipelines/hdm/xut/modules/adaln.py class AdaLN (line 9) | class AdaLN(nn.Module): method __init__ (line 10) | def __init__(self, dim, y_dim, gate=True, norm_layer=RMSNorm, shared=F... method forward (line 21) | def forward(self, x, y, shared_adaln=None): FILE: pipelines/hdm/xut/modules/attention.py function memory_efficient_attention (line 29) | def memory_efficient_attention(query, key, value, attn_bias=None, p=0.0): class SelfAttention (line 44) | class SelfAttention(nn.Module): method __init__ (line 45) | def __init__(self, dim, n_heads=8, head_dim=-1, pos_dim=2): method forward (line 61) | def forward(self, x, pos_map=None, mask=None): class CrossAttention (line 104) | class CrossAttention(nn.Module): method __init__ (line 105) | def __init__(self, dim, ctx_dim, n_heads=8, head_dim=-1, pos_dim=2): method forward (line 122) | def forward(self, x, ctx, pos_map=None, ctx_pos_map=None, mask=None): class AttentionPooling (line 166) | class AttentionPooling(CrossAttention): method __init__ (line 167) | def __init__(self, dim, n_heads=8, head_dim=-1, pos_dim=2): method forward (line 171) | def forward(self, x, pos_map=None, mask=None): class AttentiveProbe (line 176) | class AttentiveProbe(CrossAttention): method __init__ (line 177) | def __init__(self, dim, out_dim, n_heads=8, head_dim=-1, pos_dim=2, n_... method forward (line 182) | def forward(self, x, pos_map=None, mask=None): function prefix_causal_attention_mask (line 190) | def prefix_causal_attention_mask( FILE: pipelines/hdm/xut/modules/axial_rope.py function rotate_half (line 11) | def rotate_half(x): function apply_rotary_emb (line 19) | def apply_rotary_emb(freqs, t, start_index=0, scale=1.0): function centers (line 35) | def centers(start, stop, num, dtype=None, device=None): function make_grid (line 40) | def make_grid(h_pos, w_pos): function bounding_box (line 45) | def bounding_box(h, w, pixel_aspect_ratio=1.0): function make_axial_pos (line 64) | def make_axial_pos( function make_axial_pos_no_cache (line 77) | def make_axial_pos_no_cache( function make_cropped_pos (line 90) | def make_cropped_pos(crop_h, crop_w, target_h, target_w): function freqs_pixel (line 101) | def freqs_pixel(max_freq=10.0): function freqs_pixel_log (line 109) | def freqs_pixel_log(max_freq=10.0): class AxialRoPE (line 118) | class AxialRoPE(nn.Module): method __init__ (line 119) | def __init__( method extra_repr (line 133) | def extra_repr(self): method get_freqs (line 137) | def get_freqs(self, pos): method forward (line 145) | def forward(self, x, pos): class AdditiveAxialRoPE (line 150) | class AdditiveAxialRoPE(AxialRoPE): method __init__ (line 155) | def __init__( method forward (line 166) | def forward(self, x, pos): FILE: pipelines/hdm/xut/modules/layers.py class SwiGLUTorch (line 16) | class SwiGLUTorch(nn.Module): method __init__ (line 17) | def __init__( method forward (line 32) | def forward(self, x): FILE: pipelines/hdm/xut/modules/norm.py class DyT (line 14) | class DyT(nn.Module): method __init__ (line 20) | def __init__(self, hidden_size, init_alpha=1.0): method forward (line 26) | def forward(self, hidden_states): class RMSNormTorch (line 31) | class RMSNormTorch(nn.RMSNorm): method __init__ (line 32) | def __init__(self, hidden_size, *args, eps=1e-6, offset=0.0, **kwargs): method forward (line 37) | def forward(self, hidden_states): class RMSNorm (line 54) | class RMSNorm(LigerRMSNorm): method __init__ (line 55) | def __init__( method forward (line 73) | def forward(self, hidden_states): function Norm (line 77) | def Norm(module: nn.Module): FILE: pipelines/hdm/xut/modules/patch.py class PatchEmbed (line 6) | class PatchEmbed(nn.Module): method __init__ (line 7) | def __init__( method forward (line 23) | def forward(self, x, pos_map=None): class UnPatch (line 44) | class UnPatch(nn.Module): method __init__ (line 45) | def __init__(self, patch_size=4, input_dim=512, out_channel=3, proj=Tr... method forward (line 55) | def forward(self, x: torch.Tensor, axis1=None, axis2=None, loss_mask=N... FILE: pipelines/hdm/xut/modules/time_emb.py class TimestepEmbedding (line 9) | class TimestepEmbedding(nn.Module): method __init__ (line 10) | def __init__(self, dim, max_period=10000, time_factor: float = 1000.0): method forward (line 26) | def forward(self, t): FILE: pipelines/hdm/xut/modules/transformer.py class TransformerBlock (line 9) | class TransformerBlock(nn.Module): method __init__ (line 10) | def __init__( method forward (line 51) | def forward( FILE: pipelines/hdm/xut/utils/__init__.py function isiterable (line 5) | def isiterable(obj): function compile_wrapper (line 13) | def compile_wrapper(func, **kwargs): FILE: pipelines/hdm/xut/xut.py class TBackBone (line 15) | class TBackBone(nn.Module): method __init__ (line 20) | def __init__( method init_weight (line 52) | def init_weight(self): method forward (line 67) | def forward( class XUTBackBone (line 100) | class XUTBackBone(nn.Module): method __init__ (line 105) | def __init__( method init_weight (line 173) | def init_weight(self): method forward (line 188) | def forward( class XUDiT (line 274) | class XUDiT(nn.Module): method __init__ (line 279) | def __init__( method init_weight (line 401) | def init_weight(self): method set_grad_ckpt (line 409) | def set_grad_ckpt(self, grad_ckpt): method forward (line 416) | def forward( FILE: pipelines/hidream/pipeline_hidream_image_editing.py function retrieve_latents (line 81) | def retrieve_latents( function calculate_shift (line 95) | def calculate_shift( function retrieve_timesteps (line 109) | def retrieve_timesteps( class HiDreamImageEditingPipeline (line 168) | class HiDreamImageEditingPipeline(DiffusionPipeline, HiDreamImageLoraLoa... method __init__ (line 172) | def __init__( method _get_t5_prompt_embeds (line 211) | def _get_t5_prompt_embeds( method _get_clip_prompt_embeds (line 248) | def _get_clip_prompt_embeds( method _get_llama3_prompt_embeds (line 285) | def _get_llama3_prompt_embeds( method encode_prompt (line 329) | def encode_prompt( method enable_vae_slicing (line 528) | def enable_vae_slicing(self): method disable_vae_slicing (line 535) | def disable_vae_slicing(self): method enable_vae_tiling (line 542) | def enable_vae_tiling(self): method disable_vae_tiling (line 550) | def disable_vae_tiling(self): method check_inputs (line 557) | def check_inputs( method prepare_latents (line 666) | def prepare_latents( method prepare_image_latents (line 693) | def prepare_image_latents( method guidance_scale (line 736) | def guidance_scale(self): method image_guidance_scale (line 740) | def image_guidance_scale(self): method do_classifier_free_guidance (line 744) | def do_classifier_free_guidance(self): method attention_kwargs (line 748) | def attention_kwargs(self): method num_timesteps (line 752) | def num_timesteps(self): method interrupt (line 756) | def interrupt(self): method __call__ (line 761) | def __call__( FILE: pipelines/meissonic/pipeline.py function _prepare_latent_image_ids (line 37) | def _prepare_latent_image_ids(batch_size, height, width, device, dtype): class MeissonicPipeline (line 51) | class MeissonicPipeline(DiffusionPipeline): method __init__ (line 63) | def __init__( method __call__ (line 89) | def __call__( FILE: pipelines/meissonic/pipeline_img2img.py function _prepare_latent_image_ids (line 34) | def _prepare_latent_image_ids(batch_size, height, width, device, dtype): class MeissonicImg2ImgPipeline (line 49) | class MeissonicImg2ImgPipeline(DiffusionPipeline): method __init__ (line 61) | def __init__( method __call__ (line 83) | def __call__( FILE: pipelines/meissonic/pipeline_inpaint.py function _prepare_latent_image_ids (line 31) | def _prepare_latent_image_ids(batch_size, height, width, device, dtype): class MeissonicInpaintPipeline (line 46) | class MeissonicInpaintPipeline(DiffusionPipeline): method __init__ (line 58) | def __init__( method __call__ (line 88) | def __call__( FILE: pipelines/meissonic/scheduler.py function gumbel_noise (line 25) | def gumbel_noise(t, generator=None): function mask_by_random_topk (line 35) | def mask_by_random_topk(mask_len, probs, temperature=1.0, generator=None): class SchedulerOutput (line 44) | class SchedulerOutput(BaseOutput): class Scheduler (line 61) | class Scheduler(SchedulerMixin, ConfigMixin): method __init__ (line 67) | def __init__( method set_timesteps (line 75) | def set_timesteps( method step (line 88) | def step( method add_noise (line 163) | def add_noise(self, sample, timesteps, generator=None): FILE: pipelines/meissonic/transformer.py function get_3d_rotary_pos_embed (line 46) | def get_3d_rotary_pos_embed( function get_2d_rotary_pos_embed (line 130) | def get_2d_rotary_pos_embed(embed_dim, crops_coords, grid_size, use_real... function get_2d_rotary_pos_embed_from_grid (line 158) | def get_2d_rotary_pos_embed_from_grid(embed_dim, grid, use_real=False): function get_2d_rotary_pos_embed_lumina (line 178) | def get_2d_rotary_pos_embed_lumina(embed_dim, len_h, len_w, linear_facto... function get_1d_rotary_pos_embed (line 194) | def get_1d_rotary_pos_embed( class FluxPosEmbed (line 251) | class FluxPosEmbed(nn.Module): method __init__ (line 253) | def __init__(self, theta: int, axes_dim: List[int]): method forward (line 258) | def forward(self, ids: torch.Tensor) -> torch.Tensor: class FusedFluxAttnProcessor2_0 (line 277) | class FusedFluxAttnProcessor2_0: method __init__ (line 280) | def __init__(self): method __call__ (line 286) | def __call__( class SingleTransformerBlock (line 367) | class SingleTransformerBlock(nn.Module): method __init__ (line 381) | def __init__(self, dim, num_attention_heads, attention_head_dim, mlp_r... method forward (line 404) | def forward( class TransformerBlock (line 429) | class TransformerBlock(nn.Module): method __init__ (line 443) | def __init__(self, dim, num_attention_heads, attention_head_dim, qk_no... method forward (line 482) | def forward( class UVit2DConvEmbed (line 529) | class UVit2DConvEmbed(nn.Module): method __init__ (line 530) | def __init__(self, in_channels, block_out_channels, vocab_size, elemen... method forward (line 536) | def forward(self, input_ids): class ConvMlmLayer (line 543) | class ConvMlmLayer(nn.Module): method __init__ (line 544) | def __init__( method forward (line 558) | def forward(self, hidden_states): class SwiGLU (line 564) | class SwiGLU(nn.Module): method __init__ (line 575) | def __init__(self, dim_in: int, dim_out: int, bias: bool = True): method forward (line 580) | def forward(self, hidden_states): class ConvNextBlock (line 585) | class ConvNextBlock(nn.Module): method __init__ (line 586) | def __init__( method forward (line 606) | def forward(self, x, cond_embeds): class Simple_UVitBlock (line 629) | class Simple_UVitBlock(nn.Module): method __init__ (line 630) | def __init__( method forward (line 672) | def forward(self, x): class UVitBlock (line 681) | class UVitBlock(nn.Module): method __init__ (line 682) | def __init__( method forward (line 760) | def forward(self, x, pooled_text_emb, encoder_hidden_states, cross_att... class Transformer2DModel (line 779) | class Transformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMixin, From... method __init__ (line 803) | def __init__( method attn_processors (line 900) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 924) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method fuse_qkv_projections (line 959) | def fuse_qkv_projections(self): method unfuse_qkv_projections (line 985) | def unfuse_qkv_projections(self): method _set_gradient_checkpointing (line 998) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 1002) | def forward( FILE: pipelines/model_anima.py function _import_from_file (line 10) | def _import_from_file(module_name, file_path): function load_anima (line 17) | def load_anima(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_auraflow.py function load_auraflow (line 7) | def load_auraflow(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_bria.py function load_bria (line 9) | def load_bria(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_chroma.py function load_chroma (line 7) | def load_chroma(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_chrono.py function postprocess (line 7) | def postprocess(p, result): # pylint: disable=unused-argument function load_chrono (line 14) | def load_chrono(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_cogview.py function load_cogview3 (line 7) | def load_cogview3(checkpoint_info, diffusers_load_config=None): function load_cogview4 (line 33) | def load_cogview4(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_cosmos.py function load_cosmos_t2i (line 7) | def load_cosmos_t2i(checkpoint_info, diffusers_load_config=None): class Fake_safety_checker (line 40) | class Fake_safety_checker: method __init__ (line 41) | def __init__(self): method __call__ (line 45) | def __call__(self, *args, **kwargs): # pylint: disable=unused-argument method to (line 48) | def to(self, _device): method check_text_safety (line 51) | def check_text_safety(self, _prompt): method check_video_safety (line 54) | def check_video_safety(self, vid): FILE: pipelines/model_flex.py function load_flex (line 7) | def load_flex(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_flite.py function load_flite (line 8) | def load_flite(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_flux.py function load_flux (line 8) | def load_flux(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_flux2.py function load_flux2 (line 7) | def load_flux2(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_flux2_klein.py function load_flux2_klein (line 7) | def load_flux2_klein(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_glm.py class GLMTokenProgressProcessor (line 9) | class GLMTokenProgressProcessor(transformers.LogitsProcessor): method __init__ (line 12) | def __init__(self): method set_total (line 20) | def set_total(self, total_tokens: int): method __call__ (line 24) | def __call__(self, input_ids, scores): function hijack_vision_language_generate (line 57) | def hijack_vision_language_generate(pipe): function load_glm_image (line 83) | def load_glm_image(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_google.py function google_requirements (line 28) | def google_requirements(): function get_size_buckets (line 34) | def get_size_buckets(width: int, height: int) -> str: class GoogleNanoBananaPipeline (line 43) | class GoogleNanoBananaPipeline(): method __init__ (line 44) | def __init__(self, model_name: str): method txt2img (line 51) | def txt2img(self, prompt): method img2img (line 58) | def img2img(self, prompt, image): method get_args (line 71) | def get_args(self): method __call__ (line 111) | def __call__(self, prompt: list[str], width: int, height: int, image: ... function load_nanobanana (line 165) | def load_nanobanana(checkpoint_info, diffusers_load_config): # pylint: d... FILE: pipelines/model_hdm.py function load_hdm (line 7) | def load_hdm(checkpoint_info, diffusers_load_config=None): # pylint: dis... FILE: pipelines/model_hidream.py function load_llama (line 7) | def load_llama(diffusers_load_config=None): function load_hidream (line 33) | def load_hidream(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_hunyuandit.py function load_hunyuandit (line 7) | def load_hunyuandit(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_hyimage.py function load_hyimage (line 9) | def load_hyimage(checkpoint_info, diffusers_load_config=None): # pylint:... function load_hyimage3 (line 44) | def load_hyimage3(checkpoint_info, diffusers_load_config=None): # pylint... class HunyuanImage3Wrapper (line 75) | class HunyuanImage3Wrapper(torch.nn.Module): method __init__ (line 76) | def __init__(self, model): method __call__ (line 80) | def __call__( FILE: pipelines/model_kandinsky.py function load_kandinsky21 (line 7) | def load_kandinsky21(checkpoint_info, diffusers_load_config=None): function load_kandinsky22 (line 25) | def load_kandinsky22(checkpoint_info, diffusers_load_config=None): function load_kandinsky3 (line 43) | def load_kandinsky3(checkpoint_info, diffusers_load_config=None): function load_kandinsky5 (line 76) | def load_kandinsky5(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_kolors.py function load_kolors (line 6) | def load_kolors(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_longcat.py function load_longcat (line 7) | def load_longcat(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_lumina.py function load_lumina (line 7) | def load_lumina(checkpoint_info, diffusers_load_config=None): function load_lumina2 (line 25) | def load_lumina2(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_meissonic.py function load_meissonic (line 6) | def load_meissonic(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_nextstep.py function load_nextstep (line 6) | def load_nextstep(checkpoint_info, diffusers_load_config=None): # pylint... FILE: pipelines/model_omnigen.py function load_omnigen (line 5) | def load_omnigen(checkpoint_info, diffusers_load_config=None): # pylint:... function load_omnigen2 (line 35) | def load_omnigen2(checkpoint_info, diffusers_load_config=None): # pylint... FILE: pipelines/model_ovis.py function load_ovis (line 7) | def load_ovis(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_pixart.py function load_pixart (line 8) | def load_pixart(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_prx.py function load_prx (line 6) | def load_prx(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_qwen.py function load_qwen (line 6) | def load_qwen(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_sana.py function load_quants (line 7) | def load_quants(kwargs, repo_id, cache_dir): function load_sana (line 24) | def load_sana(checkpoint_info, kwargs=None): FILE: pipelines/model_sd3.py function load_sd3 (line 7) | def load_sd3(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_stablecascade.py function get_timestep_ratio_conditioning (line 7) | def get_timestep_ratio_conditioning(t, alphas_cumprod): function load_text_encoder (line 18) | def load_text_encoder(path): function load_prior (line 64) | def load_prior(path, config_file="default"): function load_cascade_combined (line 87) | def load_cascade_combined(checkpoint_info, diffusers_load_config=None): class StableCascadeDecoderPipelineFixed (line 167) | class StableCascadeDecoderPipelineFixed(diffusers.StableCascadeDecoderPi... method guidance_scale (line 168) | def guidance_scale(self): # pylint: disable=invalid-overridden-method method do_classifier_free_guidance (line 171) | def do_classifier_free_guidance(self): # pylint: disable=invalid-overr... method __call__ (line 175) | def __call__( FILE: pipelines/model_wanai.py function load_transformer (line 7) | def load_transformer(repo_id, diffusers_load_config=None, subfolder='tra... function load_text_encoder (line 50) | def load_text_encoder(repo_id, diffusers_load_config=None): function load_wan (line 68) | def load_wan(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_xomni.py class XOmniPipeline (line 7) | class XOmniPipeline(diffusers.DiffusionPipeline): method __init__ (line 8) | def __init__( method load (line 21) | def load( method __call__ (line 50) | def __call__( function load_xomni (line 107) | def load_xomni(checkpoint_info, diffusers_load_config=None): FILE: pipelines/model_z_image.py function load_nunchaku (line 7) | def load_nunchaku(): function load_z_image (line 21) | def load_z_image(checkpoint_info, diffusers_load_config=None): FILE: pipelines/omnigen2/image_processor.py class OmniGen2ImageProcessor (line 25) | class OmniGen2ImageProcessor(VaeImageProcessor): method __init__ (line 48) | def __init__( method get_new_height_width (line 71) | def get_new_height_width( method preprocess (line 134) | def preprocess( FILE: pipelines/omnigen2/models/attention_processor.py class OmniGen2AttnProcessor (line 31) | class OmniGen2AttnProcessor: method __init__ (line 48) | def __init__(self) -> None: method __call__ (line 56) | def __call__( FILE: pipelines/omnigen2/models/embeddings.py function apply_rotary_emb (line 24) | def apply_rotary_emb( function apply_rotary_emb (line 73) | def apply_rotary_emb(x, freqs_cis, use_real: bool = True, use_real_unbin... FILE: pipelines/omnigen2/models/transformers/block_lumina2.py class Lumina2CombinedTimestepCaptionEmbedding (line 28) | class Lumina2CombinedTimestepCaptionEmbedding(nn.Module): method __init__ (line 29) | def __init__( method _initialize_weights (line 54) | def _initialize_weights(self): method forward (line 58) | def forward( FILE: pipelines/omnigen2/models/transformers/repo.py class OmniGen2RotaryPosEmbed (line 9) | class OmniGen2RotaryPosEmbed(nn.Module): method __init__ (line 10) | def __init__(self, theta: int, method get_freqs_cis (line 21) | def get_freqs_cis(axes_dim: Tuple[int, int, int], method _get_freqs_cis (line 31) | def _get_freqs_cis(self, freqs_cis, ids: torch.Tensor) -> torch.Tensor: method forward (line 43) | def forward( FILE: pipelines/omnigen2/models/transformers/transformer_omnigen2.py class OmniGen2TransformerBlock (line 27) | class OmniGen2TransformerBlock(nn.Module): method __init__ (line 49) | def __init__( method initialize_weights (line 103) | def initialize_weights(self) -> None: method forward (line 122) | def forward( class OmniGen2Transformer2DModel (line 171) | class OmniGen2Transformer2DModel(ModelMixin, ConfigMixin, PeftAdapterMix... method __init__ (line 206) | def __init__( method initialize_weights (line 336) | def initialize_weights(self) -> None: method img_patch_embed_and_refine (line 355) | def img_patch_embed_and_refine( method flat_and_pad_to_seq (line 423) | def flat_and_pad_to_seq(self, hidden_states, ref_image_hidden_states): method forward (line 489) | def forward( FILE: pipelines/omnigen2/pipeline_omnigen2.py class FMPipelineOutput (line 52) | class FMPipelineOutput(BaseOutput): function retrieve_timesteps (line 65) | def retrieve_timesteps( class OmniGen2Pipeline (line 111) | class OmniGen2Pipeline(DiffusionPipeline): method __init__ (line 131) | def __init__( method prepare_latents (line 164) | def prepare_latents( method encode_vae (line 202) | def encode_vae(self, img: torch.FloatTensor) -> torch.FloatTensor: method prepare_image (line 220) | def prepare_image( method _get_qwen2_prompt_embeds (line 259) | def _get_qwen2_prompt_embeds( method _apply_chat_template (line 326) | def _apply_chat_template(self, prompt: str): method encode_prompt (line 337) | def encode_prompt( method num_timesteps (line 436) | def num_timesteps(self): method text_guidance_scale (line 440) | def text_guidance_scale(self): method image_guidance_scale (line 444) | def image_guidance_scale(self): method cfg_range (line 448) | def cfg_range(self): method __call__ (line 452) | def __call__( method processing (line 597) | def processing( method predict (line 692) | def predict( FILE: pipelines/qwen/qwen_nunchaku.py function load_qwen_nunchaku (line 4) | def load_qwen_nunchaku(repo_id): FILE: pipelines/qwen/qwen_pruning.py function check_qwen_pruning (line 1) | def check_qwen_pruning(repo_id, subfolder): FILE: pipelines/segmoe/segmoe_model.py function remove_all_forward_hooks (line 23) | def remove_all_forward_hooks(model: torch.nn.Module) -> None: class SparseMoeBlock (line 32) | class SparseMoeBlock(nn.Module): method __init__ (line 33) | def __init__(self, config, experts): method forward (line 44) | def forward(self, hidden_states: torch.Tensor, scale=None) -> torch.Te... function getActivation (line 82) | def getActivation(activation, name): class SegMoEPipeline (line 89) | class SegMoEPipeline: method __init__ (line 90) | def __init__(self, config_or_path, **kwargs) -> Any: method to (line 139) | def to(self, *args, **kwargs): method load_from_scratch (line 142) | def load_from_scratch(self, config: str, **kwargs) -> None: method __call__ (line 860) | def __call__(self, *args: Any, **kwds: Any) -> Any: method create_empty (line 868) | def create_empty(self, path): method save_pretrained (line 1154) | def save_pretrained(self, path): method cast_hook (line 1173) | def cast_hook(self, pipe, dicts): method get_hidden_states (line 1261) | def get_hidden_states(self, model, positive, negative, average: bool =... method get_gate_params (line 1282) | def get_gate_params( FILE: pipelines/wan/wan_image.py class WanImagePipeline (line 10) | class WanImagePipeline(diffusers.WanPipeline): method __call__ (line 11) | def __call__( method get_timesteps (line 80) | def get_timesteps(self, num_inference_steps, strength): method img2img_prepare_latents (line 89) | def img2img_prepare_latents( FILE: pipelines/xomni/configuration_xomni.py class XOmniConfig (line 5) | class XOmniConfig(Qwen2Config): method __init__ (line 8) | def __init__( FILE: pipelines/xomni/modeling_siglip_flux.py function drop_token (line 16) | def drop_token(x, drop_prob: float = 0., training: bool = False, scale_b... class FluxTransformer2DModelWithSigLIP (line 27) | class FluxTransformer2DModelWithSigLIP(FluxTransformer2DModel): method __init__ (line 29) | def __init__( method init_siglip_embed (line 62) | def init_siglip_embed(self, siglip_channels): method forward (line 66) | def forward( function teacache_forward (line 237) | def teacache_forward( class FluxPipelineWithSigLIP (line 499) | class FluxPipelineWithSigLIP(FluxPipeline): method __call__ (line 502) | def __call__( FILE: pipelines/xomni/modeling_siglip_tokenizer.py function create_anyres_preprocess (line 15) | def create_anyres_preprocess( class IBQ (line 63) | class IBQ(nn.Module): method __init__ (line 64) | def __init__(self, n_e, e_dim, skip_quantization_prob=0.0, quantizatio... method forward (line 79) | def forward(self, z, temp=None, rescale_logits=False, return_logits=Fa... method get_codebook_entry (line 132) | def get_codebook_entry(self, indices, bhwc): class ResidualBlock (line 145) | class ResidualBlock(nn.Module): method __init__ (line 146) | def __init__(self, channels, num_groups=32): method forward (line 154) | def forward(self, x): class VQConvProjector (line 165) | class VQConvProjector(nn.Module): method __init__ (line 166) | def __init__( method forward (line 182) | def forward(self, x, h, w): method encode (line 191) | def encode(self, x, h, w): method decode (line 197) | def decode(self, tokens, bhwc): class SiglipTokenizer (line 204) | class SiglipTokenizer(nn.Module): method __init__ (line 205) | def __init__( method encode (line 225) | def encode(self, x): method decode (line 230) | def decode(self, tokens, bhwc): FILE: pipelines/xomni/modeling_vit.py function _no_grad_trunc_normal_ (line 24) | def _no_grad_trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 62) | def trunc_normal_(tensor, mean=0.0, std=1.0, a=-2.0, b=2.0): function init_weights (line 90) | def init_weights(self): function init_weights_vit_timm (line 96) | def init_weights_vit_timm(module: nn.Module, name: str = "") -> None: class Attention (line 106) | class Attention(nn.Module): method __init__ (line 109) | def __init__( method forward (line 134) | def forward(self, x: torch.Tensor, cu_slens=None) -> torch.Tensor: class LayerScale (line 177) | class LayerScale(nn.Module): method __init__ (line 178) | def __init__( method forward (line 188) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 192) | class Block(nn.Module): method __init__ (line 193) | def __init__( method forward (line 236) | def forward(self, x: torch.Tensor, cu_slens=None) -> torch.Tensor: class VisionTransformer (line 242) | class VisionTransformer(nn.Module): method __init__ (line 251) | def __init__( method init_weights (line 398) | def init_weights(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = ... method no_weight_decay (line 407) | def no_weight_decay(self) -> Set: method group_matcher (line 411) | def group_matcher(self, coarse: bool = False) -> Dict: method set_grad_checkpointing (line 418) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 422) | def get_classifier(self) -> nn.Module: method reset_classifier (line 425) | def reset_classifier(self, num_classes: int, global_pool=None) -> None: method rescale_positional_embedding (line 440) | def rescale_positional_embedding(self, out_size): method _pos_embed (line 452) | def _pos_embed(self, x: torch.Tensor) -> torch.Tensor: method _intermediate_layers (line 485) | def _intermediate_layers( method get_intermediate_layers (line 507) | def get_intermediate_layers( method forward_features_list (line 538) | def forward_features_list(self, x_list): method forward_features (line 577) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 593) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 605) | def forward(self, x, cal_attn_pool=False): class SigLIPVisionCfg (line 614) | class SigLIPVisionCfg: function resize_evaclip_pos_embed (line 651) | def resize_evaclip_pos_embed(model: VisionTransformer, interpolation: st... function create_siglip_vit (line 664) | def create_siglip_vit( FILE: pipelines/xomni/modeling_xomni.py class XOmniDecoderLayer (line 19) | class XOmniDecoderLayer(Qwen2DecoderLayer): method __init__ (line 20) | def __init__(self, config: XOmniConfig, layer_idx: int): method forward (line 25) | def forward( class XOmniModel (line 43) | class XOmniModel(Qwen2Model, Qwen2PreTrainedModel): method __init__ (line 47) | def __init__(self, config: XOmniConfig): method get_input_embeddings (line 67) | def get_input_embeddings(self): method set_input_embeddings (line 70) | def set_input_embeddings(self, value): method embed_tokens (line 73) | def embed_tokens(self, input_ids): method norm (line 89) | def norm(self, hidden_states): class XOmniForCausalLM (line 94) | class XOmniForCausalLM(Qwen2ForCausalLM): method __init__ (line 100) | def __init__(self, config): method device (line 111) | def device(self): method init_vision (line 114) | def init_vision(self, flux_pipe_path, **kwargs): method set_generation_mode (line 150) | def set_generation_mode(self, mode): method mmencode (line 154) | def mmencode(self, tokenizer, texts=None, images=None, **kwargs): method mmdecode (line 165) | def mmdecode(self, tokenizer, token_ids, force_text=None, **kwargs): method tokenize_image (line 202) | def tokenize_image(self, image): method detokenize_image (line 218) | def detokenize_image(self, texts, images, token_ids, shape): method forward (line 240) | def forward( FILE: scripts/animatediff.py function set_adapter (line 43) | def set_adapter(adapter_name: str = 'None'): function set_scheduler (line 138) | def set_scheduler(p, model, override: bool = False): function set_prompt (line 148) | def set_prompt(p): function set_lora (line 166) | def set_lora(p, lora, strength): function set_free_init (line 179) | def set_free_init(method, iters, order, spatial, temporal): function set_free_noise (line 192) | def set_free_noise(frames): class Script (line 200) | class Script(scripts_manager.Script): method title (line 201) | def title(self): method show (line 204) | def show(self, is_img2img): method ui (line 208) | def ui(self, is_img2img): method run (line 236) | def run(self, p: processing.StableDiffusionProcessing, adapter_index, ... method after (line 264) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/apg.py class Script (line 8) | class Script(scripts_manager.Script): method __init__ (line 9) | def __init__(self): method title (line 14) | def title(self): method show (line 17) | def show(self, is_img2img): method ui (line 20) | def ui(self, _is_img2img): # ui elements method register (line 29) | def register(self): # register xyz grid elements method run (line 53) | def run(self, p: processing.StableDiffusionProcessing, eta = 0.0, mome... method after (line 78) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/automatic_color_inpaint.py class Script (line 31) | class Script(scripts_manager.Script): method title (line 32) | def title(self): method show (line 35) | def show(self, is_img2img): method ui (line 39) | def ui(self, _is_img2img): method run (line 90) | def run(self, p: processing.StableDiffusionProcessing, *args): # pyli... FILE: scripts/blipdiffusion.py class Script (line 5) | class Script(scripts_manager.Script): method title (line 6) | def title(self): method show (line 9) | def show(self, is_img2img): method ui (line 12) | def ui(self, _is_img2img): method run (line 23) | def run(self, p: processing.StableDiffusionProcessing, source_subject,... FILE: scripts/consistory/attention_processor.py class ConsistoryAttnStoreProcessor (line 28) | class ConsistoryAttnStoreProcessor: method __init__ (line 29) | def __init__(self, attnstore, place_in_unet): method __call__ (line 34) | def __call__(self, attn: Attention, hidden_states, encoder_hidden_stat... class ConsistoryExtendedAttnXFormersAttnProcessor (line 67) | class ConsistoryExtendedAttnXFormersAttnProcessor: method __init__ (line 79) | def __init__(self, place_in_unet, attnstore, extended_attn_kwargs, att... method __call__ (line 88) | def __call__( function register_extended_self_attn (line 256) | def register_extended_self_attn(unet, attnstore, extended_attn_kwargs): FILE: scripts/consistory/consistory_pipeline.py class ConsistoryExtendAttnSDXLPipeline (line 46) | class ConsistoryExtendAttnSDXLPipeline( method __call__ (line 53) | def __call__( FILE: scripts/consistory/consistory_run.py function load_pipeline (line 19) | def load_pipeline(gpu_id=0): function create_anchor_mapping (line 30) | def create_anchor_mapping(bsz, anchor_indices=[0]): function create_token_indices (line 37) | def create_token_indices(prompts, batch_size, concept_token, tokenizer): function create_latents (line 49) | def create_latents(story_pipeline, seed, batch_size, same_latent, device... function run_batch_generation (line 68) | def run_batch_generation(story_pipeline, prompts, concept_token, function run_anchor_generation (line 128) | def run_anchor_generation(story_pipeline, prompts, concept_token, function run_extra_generation (line 194) | def run_extra_generation(story_pipeline, prompts, concept_token, FILE: scripts/consistory/consistory_unet_sdxl.py class UNet2DConditionOutput (line 65) | class UNet2DConditionOutput(BaseOutput): class ConsistorySDXLUNet2DConditionModel (line 77) | class ConsistorySDXLUNet2DConditionModel(ModelMixin, ConfigMixin, UNet2D... method __init__ (line 174) | def __init__( method attn_processors (line 630) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 653) | def set_attn_processor( method set_default_attn_processor (line 689) | def set_default_attn_processor(self): method set_attention_slice (line 704) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 769) | def _set_gradient_checkpointing(self, module, value=False): method enable_freeu (line 773) | def enable_freeu(self, s1, s2, b1, b2): method disable_freeu (line 797) | def disable_freeu(self): method forward (line 805) | def forward( FILE: scripts/consistory/consistory_utils.py class FeatureInjector (line 13) | class FeatureInjector: method __init__ (line 14) | def __init__(self, nn_map, nn_distances, attn_masks, inject_range_alph... method inject_outputs (line 24) | def inject_outputs(self, output, curr_iter, output_res, extended_mappi... method inject_anchors (line 70) | def inject_anchors(self, output, curr_iter, output_res, extended_mappi... class AnchorCache (line 108) | class AnchorCache: method __init__ (line 109) | def __init__(self): method set_mode (line 117) | def set_mode(self, mode): method set_mode_inject (line 120) | def set_mode_inject(self): method set_mode_cache (line 123) | def set_mode_cache(self): method is_inject_mode (line 126) | def is_inject_mode(self): method is_cache_mode (line 129) | def is_cache_mode(self): method to_device (line 133) | def to_device(self, device): class QueryStore (line 147) | class QueryStore: method __init__ (line 148) | def __init__(self, mode='store', t_range=[0, 1000], strength_start=1, ... method set_mode (line 157) | def set_mode(self, mode): # mode can be 'cache' or 'inject' method cache_query (line 160) | def cache_query(self, query, place_in_unet: str): method inject_query (line 163) | def inject_query(self, query, place_in_unet, t): class DIFTLatentStore (line 173) | class DIFTLatentStore: method __init__ (line 174) | def __init__(self, steps: List[int], up_ft_indices: List[int]): method __call__ (line 179) | def __call__(self, features: torch.Tensor, t: int, layer_index: int): method copy (line 183) | def copy(self): method reset (line 191) | def reset(self): FILE: scripts/consistory/utils/general_utils.py function get_dynamic_threshold (line 12) | def get_dynamic_threshold(tensor): function attn_map_to_binary (line 17) | def attn_map_to_binary(attention_map, scaler=1.): function gaussian_smooth (line 28) | def gaussian_smooth(input_tensor, kernel_size=3, sigma=1): function cos_dist (line 53) | def cos_dist(a, b): function gen_nn_map (line 60) | def gen_nn_map(src_features, src_mask, tgt_features, tgt_mask, device, ... function cyclic_nn_map (line 78) | def cyclic_nn_map(features, masks, latent_resolutions, device): function anchor_nn_map (line 100) | def anchor_nn_map(features, anchor_features, masks, anchor_masks, latent... FILE: scripts/consistory/utils/ptp_utils.py class AttentionStore (line 65) | class AttentionStore: method __init__ (line 66) | def __init__(self, attention_store_kwargs): method __call__ (line 87) | def __call__(self, attn, is_cross: bool, place_in_unet: str, attn_head... method reset (line 94) | def reset(self): method aggregate_last_steps_attention (line 102) | def aggregate_last_steps_attention(self) -> torch.Tensor: method get_attn_mask_bias (line 160) | def get_attn_mask_bias(self, tgt_size, bsz=None): method get_extended_attn_mask_instance (line 174) | def get_extended_attn_mask_instance(self, width, i): FILE: scripts/consistory_ext.py class Script (line 18) | class Script(scripts_manager.Script): method __init__ (line 19) | def __init__(self): method title (line 24) | def title(self): method show (line 27) | def show(self, is_img2img): method reset (line 30) | def reset(self): method ui (line 35) | def ui(self, _is_img2img): # ui elements method create_model (line 67) | def create_model(self): method set_args (line 86) | def set_args(self, p: processing.StableDiffusionProcessing, *args): method create_anchors (line 130) | def create_anchors(self, anchors, concepts, seed, steps, dropout, same... method create_extra (line 161) | def create_extra(self, prompt, concepts, seed, steps, dropout, same, q... method run (line 192) | def run(self, p: processing.StableDiffusionProcessing, *args): # pylin... method after (line 216) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/ctrlx/__init__.py function get_last_control_i (line 22) | def get_last_control_i(control_schedule, num_inference_steps): class CtrlXStableDiffusionXLPipelineOutput (line 46) | class CtrlXStableDiffusionXLPipelineOutput(BaseOutput): class CtrlXStableDiffusionXLPipeline (line 52) | class CtrlXStableDiffusionXLPipeline(StableDiffusionXLPipeline): # diff... method prepare_latents (line 54) | def prepare_latents( method structure_guidance_scale (line 129) | def structure_guidance_scale(self): method appearance_guidance_scale (line 133) | def appearance_guidance_scale(self): method __call__ (line 137) | def __call__( FILE: scripts/ctrlx/features.py function get_schedule (line 5) | def get_schedule(timesteps, schedule): function get_elem (line 11) | def get_elem(l, i, default=0.0): function pad_list (line 17) | def pad_list(l_1, l_2, pad=0.0): function normalize (line 24) | def normalize(x, dim): function appearance_mean_std (line 32) | def appearance_mean_std(q_c_normed, k_s_normed, v_s): # c: content, s: ... function feature_injection (line 41) | def feature_injection(features, batch_order): function appearance_transfer (line 49) | def appearance_transfer(features, q_normed, k_normed, batch_order, v=Non... FILE: scripts/ctrlx/media.py function preprocess (line 10) | def preprocess(image, processor, **kwargs): FILE: scripts/ctrlx/sdxl.py function get_control_config (line 9) | def get_control_config(structure_schedule, appearance_schedule): function convolution_forward (line 37) | def convolution_forward( # From float: function compute_ioa (line 26) | def compute_ioa(a: torch.Tensor, b: torch.Tensor) -> float: function load_mask (line 38) | def load_mask(path: str) -> torch.Tensor: class UnsupervisedEvaluator (line 46) | class UnsupervisedEvaluator: method __init__ (line 47) | def __init__(self, name: str = 'UnsupervisedEvaluator'): method log_iou (line 52) | def log_iou(self, preds: Union[torch.Tensor, List[torch.Tensor]], trut... method mean_iou (line 60) | def mean_iou(self) -> float: method increment (line 73) | def increment(self): method __len__ (line 76) | def __len__(self) -> int: method __str__ (line 79) | def __str__(self): class MeanEvaluator (line 83) | class MeanEvaluator: method __init__ (line 84) | def __init__(self, name: str = 'MeanEvaluator'): method log_iou (line 89) | def log_iou(self, preds: Union[torch.Tensor, List[torch.Tensor]], trut... method log_intensity (line 96) | def log_intensity(self, pred: torch.Tensor): method mean_iou (line 101) | def mean_iou(self) -> float: method mean_intensity (line 105) | def mean_intensity(self) -> float: method ci95_miou (line 109) | def ci95_miou(self) -> float: method __len__ (line 112) | def __len__(self) -> int: method __str__ (line 115) | def __str__(self): FILE: scripts/daam/experiment.py function build_word_list_coco80 (line 82) | def build_word_list_coco80() -> Dict[str, List[str]]: function _add_mask (line 89) | def _add_mask(masks: Dict[str, torch.Tensor], word: str, mask: torch.Ten... class GenerationExperiment (line 103) | class GenerationExperiment: method __post_init__ (line 119) | def __post_init__(self): method nsfw (line 125) | def nsfw(self) -> bool: method heat_map (line 128) | def heat_map(self, tokenizer: AutoTokenizer = None): method clear_checkpoint (line 135) | def clear_checkpoint(self): method save (line 140) | def save(self, path: str = None, heat_maps: bool = True, tokenizer: Au... method save_annotations (line 169) | def save_annotations(self, path: Path = None): method _load_truth_masks (line 177) | def _load_truth_masks(self, simplify80: bool = False) -> Dict[str, tor... method _load_pred_masks (line 187) | def _load_pred_masks(self, pred_prefix, composite=False, simplify80=Fa... method clear_prediction_masks (line 212) | def clear_prediction_masks(self, name: str): method save_prediction_mask (line 219) | def save_prediction_mask(self, mask: torch.Tensor, word: str, name: str): method save_heat_map (line 224) | def save_heat_map( method save_all_heat_maps (line 244) | def save_all_heat_maps(self, tokenizer: PreTrainedTokenizer = None, cr... method contains_truth_mask (line 260) | def contains_truth_mask(path: Union[str, Path], prompt_id: str = None)... method read_seed (line 267) | def read_seed(path: Union[str, Path], prompt_id: str = None) -> int: method has_annotations (line 274) | def has_annotations(path: Union[str, Path]) -> bool: method has_experiment (line 278) | def has_experiment(path: Union[str, Path], prompt_id: str) -> bool: method read_prompt (line 282) | def read_prompt(path: Union[str, Path], prompt_id: str = None) -> str: method _try_load_annotations (line 289) | def _try_load_annotations(self): method annotate (line 295) | def annotate(self, key: str, value: Any) -> 'GenerationExperiment': method load (line 304) | def load( FILE: scripts/daam/heatmap.py function plot_overlay_heat_map (line 21) | def plot_overlay_heat_map(im, heat_map, word=None, out_file=None, crop=N... class WordHeatMap (line 68) | class WordHeatMap: method __init__ (line 69) | def __init__(self, heatmap: torch.Tensor, word: str = None, word_idx: ... method value (line 75) | def value(self): method plot_overlay (line 78) | def plot_overlay(self, image, out_file=None, color_normalize=True, ax=... method expand_as (line 90) | def expand_as(self, image, absolute=False, threshold=None, plot=False,... method compute_ioa (line 108) | def compute_ioa(self, other: 'WordHeatMap'): class SyntacticHeatMapPair (line 113) | class SyntacticHeatMapPair: class ParsedHeatMap (line 122) | class ParsedHeatMap: class GlobalHeatMap (line 127) | class GlobalHeatMap: method __init__ (line 128) | def __init__(self, tokenizer: Any, prompt: str, heat_maps: torch.Tensor): method compute_word_heat_map (line 134) | def compute_word_heat_map(self, word: str, word_idx: int = None, offse... method parsed_heat_maps (line 138) | def parsed_heat_maps(self) -> Iterable[ParsedHeatMap]: method dependency_relations (line 146) | def dependency_relations(self) -> Iterable[SyntacticHeatMapPair]: class RawHeatMapCollection (line 161) | class RawHeatMapCollection: method __init__ (line 162) | def __init__(self): method update (line 166) | def update(self, factor: int, layer_idx: int, head_idx: int, heatmap: ... method factors (line 171) | def factors(self) -> Set[int]: method layers (line 174) | def layers(self) -> Set[int]: method heads (line 177) | def heads(self) -> Set[int]: method __iter__ (line 180) | def __iter__(self): method clear (line 183) | def clear(self): FILE: scripts/daam/hook.py class ModuleLocator (line 17) | class ModuleLocator(Generic[ModuleType]): method locate (line 18) | def locate(self, model: nn.Module) -> List[ModuleType]: class ObjectHooker (line 22) | class ObjectHooker(Generic[ModuleType]): method __init__ (line 23) | def __init__(self, module: ModuleType): method __enter__ (line 28) | def __enter__(self): method __exit__ (line 32) | def __exit__(self, exc_type, exc_val, exc_tb): method hook (line 35) | def hook(self): method unhook (line 45) | def unhook(self): method monkey_patch (line 58) | def monkey_patch(self, fn_name, fn, strict: bool = True): method monkey_super (line 66) | def monkey_super(self, fn_name, *args, **kwargs): method _hook_impl (line 69) | def _hook_impl(self): method _unhook_impl (line 72) | def _unhook_impl(self): class AggregateHooker (line 76) | class AggregateHooker(ObjectHooker[ModuleListType]): method _hook_impl (line 77) | def _hook_impl(self): method _unhook_impl (line 81) | def _unhook_impl(self): method register_hook (line 85) | def register_hook(self, hook: ObjectHooker): class UNetCrossAttentionLocator (line 89) | class UNetCrossAttentionLocator(ModuleLocator[Attention]): method __init__ (line 90) | def __init__(self, restrict: bool = None, locate_middle_block: bool = ... method locate (line 95) | def locate(self, model: UNet2DConditionModel) -> List[Attention]: FILE: scripts/daam/trace.py class DiffusionHeatMapHooker (line 22) | class DiffusionHeatMapHooker(AggregateHooker): method __init__ (line 23) | def __init__( method time_callback (line 61) | def time_callback(self, *args, **kwargs): method layer_names (line 65) | def layer_names(self): method to_experiment (line 68) | def to_experiment(self, path, seed=None, id='.', subtype='.', **comput... method compute_global_heat_map (line 83) | def compute_global_heat_map(self, prompt=None, factors=None, head_idx=... class ImageProcessorHooker (line 135) | class ImageProcessorHooker(ObjectHooker[VaeImageProcessor]): method __init__ (line 136) | def __init__(self, processor: VaeImageProcessor, parent_trace: 'trace'): method _hooked_postprocess (line 140) | def _hooked_postprocess(hk_self, _: VaeImageProcessor, *args, **kwargs): method _hook_impl (line 146) | def _hook_impl(self): class PipelineHooker (line 150) | class PipelineHooker(ObjectHooker[StableDiffusionPipeline]): method __init__ (line 151) | def __init__(self, pipeline: StableDiffusionPipeline, parent_trace: 't... method _hooked_run_safety_checker (line 156) | def _hooked_run_safety_checker(hk_self, self: StableDiffusionPipeline,... method _hooked_check_inputs (line 171) | def _hooked_check_inputs(hk_self, _: StableDiffusionPipeline, prompt: ... method _hook_impl (line 184) | def _hook_impl(self): class UNetCrossAttentionHooker (line 189) | class UNetCrossAttentionHooker(ObjectHooker[Attention]): method __init__ (line 190) | def __init__( method _unravel_attn (line 220) | def _unravel_attn(self, x): method _save_attn (line 251) | def _save_attn(self, attn_slice: torch.Tensor): method _load_attn (line 254) | def _load_attn(self) -> torch.Tensor: method __call__ (line 257) | def __call__( method _hook_impl (line 311) | def _hook_impl(self): method _unhook_impl (line 315) | def _unhook_impl(self): method num_heat_maps (line 319) | def num_heat_maps(self): FILE: scripts/daam/utils.py function auto_device (line 21) | def auto_device(obj: T = torch.device('cpu')) -> T: function auto_autocast (line 31) | def auto_autocast(*args, **kwargs): function plot_mask_heat_map (line 38) | def plot_mask_heat_map(im: PIL.Image.Image, heat_map: torch.Tensor, thre... function set_seed (line 45) | def set_seed(seed: int) -> torch.Generator: function cache_dir (line 57) | def cache_dir() -> Path: function compute_token_merge_indices (line 72) | def compute_token_merge_indices(tokenizer, prompt: str, word: str, word_... function cached_nlp (line 97) | def cached_nlp(prompt: str, type='en_core_web_md'): FILE: scripts/daam_ext.py class Script (line 11) | class Script(scripts_manager.Script): method title (line 12) | def title(self): method show (line 15) | def show(self, is_img2img): method ui (line 18) | def ui(self, _is_img2img): method run (line 26) | def run(self, p: processing.StableDiffusionProcessing, append_images, ... FILE: scripts/demofusion.py function gaussian_kernel (line 27) | def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): function gaussian_filter (line 36) | def gaussian_filter(latents, kernel_size=3, sigma=1.0): function rescale_noise_cfg (line 44) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class DemoFusionSDXLPipeline (line 58) | class DemoFusionSDXLPipeline(DiffusionPipeline, FromSingleFileMixin, Lor... method __init__ (line 61) | def __init__( method enable_vae_slicing (line 90) | def enable_vae_slicing(self): method disable_vae_slicing (line 94) | def disable_vae_slicing(self): method enable_vae_tiling (line 98) | def enable_vae_tiling(self): method disable_vae_tiling (line 102) | def disable_vae_tiling(self): method encode_prompt (line 105) | def encode_prompt( method prepare_extra_step_kwargs (line 256) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 273) | def check_inputs( method prepare_latents (line 357) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 374) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method get_views (line 390) | def get_views(self, height, width, window_size=128, stride=64, random_... method tiled_decode (line 442) | def tiled_decode(self, latents, current_height, current_width): method upcast_vae (line 479) | def upcast_vae(self): method __call__ (line 498) | def __call__( method load_lora_weights (line 1160) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method _remove_text_encoder_monkey_patch (line 1215) | def _remove_text_encoder_monkey_patch(self): class Script (line 1222) | class Script(scripts_manager.Script): method title (line 1223) | def title(self): method show (line 1226) | def show(self, is_img2img): method ui (line 1230) | def ui(self, _is_img2img): method run (line 1245) | def run(self, p: processing.StableDiffusionProcessing, cosine_scale_1,... FILE: scripts/differential_diffusion.py function rescale_noise_cfg (line 56) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLDiffImg2ImgPipeline (line 70) | class StableDiffusionXLDiffImg2ImgPipeline(DiffusionPipeline, FromSingle... method __init__ (line 111) | def __init__( method enable_vae_slicing (line 142) | def enable_vae_slicing(self): method disable_vae_slicing (line 150) | def disable_vae_slicing(self): method enable_vae_tiling (line 158) | def enable_vae_tiling(self): method disable_vae_tiling (line 167) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 174) | def enable_model_cpu_offload(self, gpu_id=0): # pylint: disable=argume... method encode_prompt (line 205) | def encode_prompt( method prepare_extra_step_kwargs (line 398) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 415) | def check_inputs( method get_timesteps (line 482) | def get_timesteps(self, num_inference_steps, strength, device, denoisi... method prepare_latents (line 506) | def prepare_latents( method _get_add_time_ids (line 573) | def _get_add_time_ids( method upcast_vae (line 613) | def upcast_vae(self): method __call__ (line 633) | def __call__( class StableDiffusionDiffImg2ImgPipeline (line 1024) | class StableDiffusionDiffImg2ImgPipeline(DiffusionPipeline): method __init__ (line 1054) | def __init__( method enable_sequential_cpu_offload (line 1144) | def enable_sequential_cpu_offload(self, gpu_id=0): # pylint: disable=a... method enable_model_cpu_offload (line 1170) | def enable_model_cpu_offload(self, gpu_id=0): # pylint: disable=argume... method _execution_device (line 1200) | def _execution_device(self): method _encode_prompt (line 1218) | def _encode_prompt( method decode_latents (line 1357) | def decode_latents(self, latents): method prepare_extra_step_kwargs (line 1366) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 1383) | def check_inputs( method get_timesteps (line 1423) | def get_timesteps(self, num_inference_steps, strength, device): # pyli... method prepare_latents (line 1432) | def prepare_latents(self, image, timestep, batch_size, num_images_per_... method encode_prompt (line 1484) | def encode_prompt( method preprocess (line 1622) | def preprocess(self, image): method __call__ (line 1644) | def __call__( class Script (line 1848) | class Script(scripts_manager.Script): method title (line 1849) | def title(self): method show (line 1852) | def show(self, is_img2img): method ui (line 1855) | def ui(self, _is_img2img): method depthmap (line 1867) | def depthmap(self, image_init: Image.Image, image_map: Image.Image, mo... method run (line 1898) | def run(self, p: processing.StableDiffusionProcessingImg2Img, enabled,... FILE: scripts/example.py class Script (line 65) | class Script(scripts_manager.Script): method title (line 66) | def title(self): method show (line 69) | def show(self, is_img2img): method ui (line 73) | def ui(self, _is_img2img): method run (line 87) | def run(self, p: processing.StableDiffusionProcessing, *args): # pylin... FILE: scripts/flux_enhance.py class Script (line 16) | class Script(scripts_manager.Script): method title (line 29) | def title(self): method show (line 32) | def show(self, is_img2img): method load (line 35) | def load(self): method enhance (line 43) | def enhance(self, prompt, auto_apply: bool = False, temperature: float... method select (line 68) | def select(self, cell: gr.SelectData, _table): method ui (line 73) | def ui(self, _is_img2img): method run (line 89) | def run(self, p: processing.StableDiffusionProcessing, auto_apply, tem... method after_component (line 100) | def after_component(self, component, **kwargs): # searching for actual... FILE: scripts/flux_tools.py class Script (line 17) | class Script(scripts_manager.Script): method title (line 18) | def title(self): method show (line 21) | def show(self, is_img2img): method ui (line 24) | def ui(self, _is_img2img): # ui elements method run (line 44) | def run(self, p: processing.StableDiffusionProcessing, tool: str = 'No... FILE: scripts/freescale/free_lunch_utils.py function isinstance_str (line 10) | def isinstance_str(x: object, cls_name: str): function Fourier_filter (line 25) | def Fourier_filter(x, threshold, scale): function register_upblock2d (line 47) | def register_upblock2d(model): function register_free_upblock2d (line 89) | def register_free_upblock2d(model, b1=1.2, b2=1.4, s1=0.9, s2=0.2): function register_crossattn_upblock2d (line 146) | def register_crossattn_upblock2d(model): function register_free_crossattn_upblock2d (line 218) | def register_free_crossattn_upblock2d(model, b1=1.2, b2=1.4, s1=0.9, s2=... FILE: scripts/freescale/freescale_pipeline.py function default (line 46) | def default(val, d): function exists (line 51) | def exists(val): function extract_into_tensor (line 54) | def extract_into_tensor(a, t, x_shape): function make_beta_schedule (line 59) | def make_beta_schedule(schedule, n_timestep, linear_start=1e-4, linear_e... function q_sample (line 88) | def q_sample(x_start, t, init_noise_sigma = 1.0, noise=None, device=None): function get_views (line 93) | def get_views(height, width, h_window_size=128, w_window_size=128, h_win... function gaussian_kernel (line 146) | def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): function gaussian_filter (line 155) | def gaussian_filter(latents, kernel_size=3, sigma=1.0): function rescale_noise_cfg (line 169) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLFreeScale (line 183) | class StableDiffusionXLFreeScale(DiffusionPipeline, FromSingleFileMixin,... method __init__ (line 222) | def __init__( method enable_vae_slicing (line 251) | def enable_vae_slicing(self): method disable_vae_slicing (line 259) | def disable_vae_slicing(self): method enable_vae_tiling (line 267) | def enable_vae_tiling(self): method disable_vae_tiling (line 276) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 283) | def enable_model_cpu_offload(self, gpu_id=0): method encode_prompt (line 313) | def encode_prompt( method prepare_extra_step_kwargs (line 505) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 522) | def check_inputs( method prepare_latents (line 596) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 613) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method upcast_vae (line 630) | def upcast_vae(self): method __call__ (line 651) | def __call__( method load_lora_weights (line 1122) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method save_lora_weights (line 1154) | def save_lora_weights( method _remove_text_encoder_monkey_patch (line 1187) | def _remove_text_encoder_monkey_patch(self): FILE: scripts/freescale/freescale_pipeline_img2img.py function process_image_to_tensor (line 48) | def process_image_to_tensor(image): function process_image_to_bitensor (line 61) | def process_image_to_bitensor(image): function default (line 69) | def default(val, d): function exists (line 74) | def exists(val): function extract_into_tensor (line 77) | def extract_into_tensor(a, t, x_shape): function make_beta_schedule (line 82) | def make_beta_schedule(schedule, n_timestep, linear_start=1e-4, linear_e... function q_sample (line 111) | def q_sample(x_start, t, init_noise_sigma = 1.0, noise=None, device=None): function get_views (line 116) | def get_views(height, width, h_window_size=128, w_window_size=128, h_win... function gaussian_kernel (line 169) | def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): function gaussian_filter (line 178) | def gaussian_filter(latents, kernel_size=3, sigma=1.0): function rescale_noise_cfg (line 192) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLFreeScaleImg2Img (line 206) | class StableDiffusionXLFreeScaleImg2Img(DiffusionPipeline, FromSingleFil... method __init__ (line 245) | def __init__( method enable_vae_slicing (line 276) | def enable_vae_slicing(self): method disable_vae_slicing (line 284) | def disable_vae_slicing(self): method enable_vae_tiling (line 292) | def enable_vae_tiling(self): method disable_vae_tiling (line 301) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 308) | def enable_model_cpu_offload(self, gpu_id=0): method encode_prompt (line 338) | def encode_prompt( method prepare_extra_step_kwargs (line 530) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 547) | def check_inputs( method prepare_latents (line 621) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 638) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method upcast_vae (line 655) | def upcast_vae(self): method __call__ (line 676) | def __call__( method load_lora_weights (line 1178) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method save_lora_weights (line 1210) | def save_lora_weights( method _remove_text_encoder_monkey_patch (line 1243) | def _remove_text_encoder_monkey_patch(self): FILE: scripts/freescale/scale_attention.py function gaussian_kernel (line 8) | def gaussian_kernel(kernel_size=3, sigma=1.0, channels=3): function gaussian_filter (line 17) | def gaussian_filter(latents, kernel_size=3, sigma=1.0): function get_views (line 24) | def get_views(height, width, h_window_size=128, w_window_size=128, scale... function scale_forward (line 83) | def scale_forward( function ori_forward (line 284) | def ori_forward( FILE: scripts/freescale_ext.py class Script (line 8) | class Script(scripts_manager.Script): method __init__ (line 9) | def __init__(self): method title (line 16) | def title(self): method show (line 19) | def show(self, is_img2img): method ui (line 23) | def ui(self, _is_img2img): # ui elements method run (line 50) | def run(self, p: processing.StableDiffusionProcessing, cosine_scale, o... method after (line 119) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/hdr.py class Script (line 11) | class Script(scripts_manager.Script): method title (line 12) | def title(self): method show (line 15) | def show(self, is_img2img): method ui (line 18) | def ui(self, is_img2img): method change_tonemap (line 33) | def change_tonemap(self, is_tonemap): method merge (line 36) | def merge(self, imgs: list, is_tonemap: bool, gamma, scale, saturation): method run (line 59) | def run(self, p, hdr_range, save_hdr, is_tonemap, gamma, scale, satura... FILE: scripts/image2video.py class Script (line 14) | class Script(scripts_manager.Script): method title (line 15) | def title(self): method show (line 18) | def show(self, is_img2img): method ui (line 23) | def ui(self, is_img2img): method run (line 54) | def run(self, p: processing.StableDiffusionProcessing, model_name, num... FILE: scripts/infiniteyou/pipeline_flux_infusenet.py function calculate_shift (line 39) | def calculate_shift( function retrieve_timesteps (line 53) | def retrieve_timesteps( class FluxInfuseNetPipeline (line 112) | class FluxInfuseNetPipeline(FluxControlNetPipeline): method __call__ (line 114) | def __call__( FILE: scripts/infiniteyou/pipeline_infu_flux.py function seed_everything (line 35) | def seed_everything(seed, deterministic=False): function retrieve_latents (line 56) | def retrieve_latents( function draw_kps (line 70) | def draw_kps(image_pil, kps, color_list=[(255,0,0), (0,255,0), (0,0,255)... function extract_arcface_bgr_embedding (line 99) | def extract_arcface_bgr_embedding(in_image, landmark, arcface_model=None... function resize_and_pad_image (line 111) | def resize_and_pad_image(source_img, target_img_size): class InfUFluxPipeline (line 138) | class InfUFluxPipeline: method __init__ (line 139) | def __init__( method load_loras (line 205) | def load_loras(self, loras): method _detect_face (line 217) | def _detect_face(self, id_image_cv2): method __call__ (line 229) | def __call__( FILE: scripts/infiniteyou/resampler.py function FeedForward (line 10) | def FeedForward(dim, mult=4): function reshape_tensor (line 20) | def reshape_tensor(x, heads): class PerceiverAttention (line 31) | class PerceiverAttention(nn.Module): method __init__ (line 32) | def __init__(self, *, dim, dim_head=64, heads=8): method forward (line 46) | def forward(self, x, latents): class Resampler (line 78) | class Resampler(nn.Module): method __init__ (line 79) | def __init__( method forward (line 110) | def forward(self, x): FILE: scripts/infiniteyou_ext.py function verify_insightface (line 15) | def verify_insightface(): function load_infiniteyou (line 21) | def load_infiniteyou(model: str): class Script (line 32) | class Script(scripts_manager.Script): method title (line 33) | def title(self): method show (line 36) | def show(self, is_img2img): method ui (line 40) | def ui(self, _is_img2img): method run (line 61) | def run(self, p: processing.StableDiffusionProcessing, method after (line 111) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/init_latents.py class Script (line 4) | class Script(scripts_manager.Script): method title (line 7) | def title(self): method show (line 10) | def show(self, is_img2img): method get_latents (line 14) | def get_latents(p): method set_slerp (line 26) | def set_slerp(p, latents, var_latents, generator, var_generator): method process_batch (line 31) | def process_batch(self, p: processing.StableDiffusionProcessing, *args... FILE: scripts/instantir/aggregator.py class ZeroConv (line 33) | class ZeroConv(nn.Module): method __init__ (line 34) | def __init__(self, label_nc, norm_nc, mask=False): method forward (line 39) | def forward(self, hidden_states, h_ori=None): class SFT (line 51) | class SFT(nn.Module): method __init__ (line 52) | def __init__(self, label_nc, norm_nc, mask=False): method forward (line 70) | def forward(self, hidden_states, mask=False): class AggregatorOutput (line 94) | class AggregatorOutput(BaseOutput): class ConditioningEmbedding (line 113) | class ConditioningEmbedding(nn.Module): method __init__ (line 123) | def __init__( method forward (line 145) | def forward(self, conditioning): class Aggregator (line 158) | class Aggregator(ModelMixin, ConfigMixin, FromOriginalModelMixin): method __init__ (line 230) | def __init__( method from_unet (line 504) | def from_unet( method attn_processors (line 582) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 606) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 641) | def set_default_attn_processor(self): method set_attention_slice (line 657) | def set_attention_slice(self, slice_size: Union[str, int, List[int]]) ... method process_encoder_hidden_states (line 722) | def process_encoder_hidden_states( method _set_gradient_checkpointing (line 754) | def _set_gradient_checkpointing(self, module, value: bool = False) -> ... method forward (line 758) | def forward( function zero_module (line 979) | def zero_module(module): FILE: scripts/instantir/ip_adapter/attention_processor.py class AdaLayerNorm (line 6) | class AdaLayerNorm(nn.Module): method __init__ (line 7) | def __init__(self, embedding_dim: int, time_embedding_dim: int = None): method forward (line 20) | def forward( class AttnProcessor (line 29) | class AttnProcessor(nn.Module): method __init__ (line 34) | def __init__( method __call__ (line 41) | def __call__( class IPAttnProcessor (line 102) | class IPAttnProcessor(nn.Module): method __init__ (line 116) | def __init__(self, hidden_size, cross_attention_dim=None, scale=1.0, n... method __call__ (line 127) | def __call__( class TA_IPAttnProcessor (line 208) | class TA_IPAttnProcessor(nn.Module): method __init__ (line 222) | def __init__(self, hidden_size, cross_attention_dim=None, time_embeddi... method __call__ (line 236) | def __call__( class AttnProcessor2_0 (line 323) | class AttnProcessor2_0(torch.nn.Module): method __init__ (line 328) | def __init__( method __call__ (line 337) | def __call__( class split_AttnProcessor2_0 (line 416) | class split_AttnProcessor2_0(torch.nn.Module): method __init__ (line 421) | def __init__( method __call__ (line 431) | def __call__( class sep_split_AttnProcessor2_0 (line 539) | class sep_split_AttnProcessor2_0(torch.nn.Module): method __init__ (line 544) | def __init__( method __call__ (line 564) | def __call__( class AdditiveKV_AttnProcessor2_0 (line 699) | class AdditiveKV_AttnProcessor2_0(torch.nn.Module): method __init__ (line 704) | def __init__( method __call__ (line 716) | def __call__( class TA_AdditiveKV_AttnProcessor2_0 (line 808) | class TA_AdditiveKV_AttnProcessor2_0(torch.nn.Module): method __init__ (line 813) | def __init__( method __call__ (line 827) | def __call__( class IPAttnProcessor2_0 (line 923) | class IPAttnProcessor2_0(torch.nn.Module): method __init__ (line 937) | def __init__(self, hidden_size, cross_attention_dim=None, scale=1.0, n... method __call__ (line 951) | def __call__( class TA_IPAttnProcessor2_0 (line 1055) | class TA_IPAttnProcessor2_0(torch.nn.Module): method __init__ (line 1069) | def __init__(self, hidden_size, cross_attention_dim=None, time_embeddi... method __call__ (line 1085) | def __call__( class CNAttnProcessor (line 1201) | class CNAttnProcessor: method __init__ (line 1206) | def __init__(self, num_tokens=4): method __call__ (line 1209) | def __call__(self, attn, hidden_states, encoder_hidden_states=None, at... class CNAttnProcessor2_0 (line 1266) | class CNAttnProcessor2_0: method __init__ (line 1271) | def __init__(self, num_tokens=4): method __call__ (line 1276) | def __call__( function init_attn_proc (line 1353) | def init_attn_proc(unet, ip_adapter_tokens=16, use_lcm=False, use_adaln=... function init_aggregator_attn_proc (line 1407) | def init_aggregator_attn_proc(unet, use_adaln=False, split_attn=False): FILE: scripts/instantir/ip_adapter/ip_adapter.py function is_torch2_available (line 6) | def is_torch2_available(): class ImageProjModel (line 26) | class ImageProjModel(torch.nn.Module): method __init__ (line 29) | def __init__(self, cross_attention_dim=2048, clip_embeddings_dim=1280,... method forward (line 37) | def forward(self, image_embeds): class MLPProjModel (line 46) | class MLPProjModel(torch.nn.Module): method __init__ (line 48) | def __init__(self, cross_attention_dim=2048, clip_embeddings_dim=1280): method forward (line 58) | def forward(self, image_embeds): class MultiIPAdapterImageProjection (line 63) | class MultiIPAdapterImageProjection(torch.nn.Module): method __init__ (line 64) | def __init__(self, IPAdapterImageProjectionLayers): method forward (line 68) | def forward(self, image_embeds: List[torch.FloatTensor]): class IPAdapter (line 93) | class IPAdapter(torch.nn.Module): method __init__ (line 95) | def __init__(self, unet, image_proj_model, adapter_modules, ckpt_path=... method forward (line 104) | def forward(self, noisy_latents, timesteps, encoder_hidden_states, ima... method load_from_checkpoint (line 111) | def load_from_checkpoint(self, ckpt_path: str): class IPAdapterPlus (line 134) | class IPAdapterPlus(torch.nn.Module): method __init__ (line 136) | def __init__(self, unet, image_proj_model, adapter_modules, ckpt_path=... method forward (line 145) | def forward(self, noisy_latents, timesteps, encoder_hidden_states, ima... method load_from_checkpoint (line 152) | def load_from_checkpoint(self, ckpt_path: str): class IPAdapterXL (line 204) | class IPAdapterXL(IPAdapter): method forward (line 207) | def forward(self, noisy_latents, timesteps, encoder_hidden_states, une... class IPAdapterPlusXL (line 215) | class IPAdapterPlusXL(IPAdapterPlus): method forward (line 218) | def forward(self, noisy_latents, timesteps, encoder_hidden_states, une... class IPAdapterFull (line 226) | class IPAdapterFull(IPAdapterPlus): method init_proj (line 229) | def init_proj(self): FILE: scripts/instantir/ip_adapter/resampler.py function FeedForward (line 13) | def FeedForward(dim, mult=4): function reshape_tensor (line 23) | def reshape_tensor(x, heads): class PerceiverAttention (line 34) | class PerceiverAttention(nn.Module): method __init__ (line 35) | def __init__(self, *, dim, dim_head=64, heads=8): method forward (line 49) | def forward(self, x, latents): class Resampler (line 81) | class Resampler(nn.Module): method __init__ (line 82) | def __init__( method forward (line 127) | def forward(self, x): function masked_mean (line 150) | def masked_mean(t, *, dim, mask=None): FILE: scripts/instantir/ip_adapter/utils.py function init_adapter_in_unet (line 12) | def init_adapter_in_unet( function load_adapter_to_pipe (line 73) | def load_adapter_to_pipe( function revise_state_dict (line 164) | def revise_state_dict(old_state_dict_or_path, map_location="cpu"): function encode_image (line 181) | def encode_image(image_encoder, feature_extractor, image, device, num_im... function prepare_training_image_embeds (line 203) | def prepare_training_image_embeds( FILE: scripts/instantir/lcm_single_step_scheduler.py class LCMSingleStepSchedulerOutput (line 35) | class LCMSingleStepSchedulerOutput(BaseOutput): function betas_for_alpha_bar (line 49) | def betas_for_alpha_bar( function rescale_zero_terminal_snr (line 94) | def rescale_zero_terminal_snr(betas: torch.FloatTensor) -> torch.FloatTe... class LCMSingleStepScheduler (line 130) | class LCMSingleStepScheduler(SchedulerMixin, ConfigMixin): method __init__ (line 194) | def __init__( method _init_step_index (line 252) | def _init_step_index(self, timestep): method step_index (line 270) | def step_index(self): method scale_model_input (line 273) | def scale_model_input(self, sample: torch.FloatTensor, timestep: Optio... method _threshold_sample (line 290) | def _threshold_sample(self, sample: torch.FloatTensor) -> torch.FloatT... method set_timesteps (line 323) | def set_timesteps( method get_scalings_for_boundary_condition_discrete (line 401) | def get_scalings_for_boundary_condition_discrete(self, timestep): method append_dims (line 409) | def append_dims(self, x, target_dims): method extract_into_tensor (line 416) | def extract_into_tensor(self, a, t, x_shape): method step (line 421) | def step( method add_noise (line 492) | def add_noise( method get_velocity (line 516) | def get_velocity( method __len__ (line 536) | def __len__(self): FILE: scripts/instantir/sdxl_instantir.py function remove_attn2 (line 167) | def remove_attn2(model): function rescale_noise_cfg (line 183) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 198) | def retrieve_timesteps( class InstantIRPipeline (line 242) | class InstantIRPipeline( method __init__ (line 305) | def __init__( method prepare_previewers (line 352) | def prepare_previewers(self, previewer_lora_path: str, use_lcm=False): method encode_prompt (line 402) | def encode_prompt( method encode_image (line 637) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method prepare_ip_adapter_image_embeds (line 674) | def prepare_ip_adapter_image_embeds( method prepare_extra_step_kwargs (line 734) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 751) | def check_inputs( method check_image (line 869) | def check_image(self, image, prompt, prompt_embeds): method prepare_image (line 907) | def prepare_image( method init_latents (line 931) | def init_latents(self, latents, generator, timestep): method prepare_latents (line 940) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 963) | def _get_add_time_ids( method upcast_vae (line 982) | def upcast_vae(self): method get_guidance_scale_embedding (line 1002) | def get_guidance_scale_embedding( method guidance_scale (line 1033) | def guidance_scale(self): method guidance_rescale (line 1037) | def guidance_rescale(self): method clip_skip (line 1041) | def clip_skip(self): method do_classifier_free_guidance (line 1048) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 1052) | def cross_attention_kwargs(self): method denoising_end (line 1056) | def denoising_end(self): method num_timesteps (line 1060) | def num_timesteps(self): method __call__ (line 1065) | def __call__( FILE: scripts/instantir_ext.py class Script (line 8) | class Script(scripts_manager.Script): method __init__ (line 9) | def __init__(self): method title (line 14) | def title(self): method show (line 17) | def show(self, is_img2img): method ui (line 20) | def ui(self, _is_img2img): # ui elements method run (line 36) | def run(self, p: processing.StableDiffusionProcessing, *args): # pylin... method dummy_unapply (line 86) | def dummy_unapply(self, pipe, unload): # pylint: disable=unused-argument method after (line 89) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/ipadapter.py class Script (line 10) | class Script(scripts_manager.Script): method title (line 13) | def title(self): method show (line 16) | def show(self, is_img2img): method load_images (line 19) | def load_images(self, files): method display_units (line 39) | def display_units(self, num_units): method display_advanced (line 43) | def display_advanced(self, advanced): method ui (line 46) | def ui(self, _is_img2img): method process (line 91) | def process(self, p: processing.StableDiffusionProcessing, *args): # p... FILE: scripts/ipinstruct.py class Script (line 19) | class Script(scripts_manager.Script): method __init__ (line 20) | def __init__(self): method title (line 25) | def title(self): method show (line 28) | def show(self, is_img2img): method install (line 34) | def install(self): method ui (line 42) | def ui(self, _is_img2img): # ui elements method run (line 57) | def run(self, p: processing.StableDiffusionProcessing, query, image, s... method after (line 108) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/kohya_hires_fix.py class Script (line 6) | class Script(scripts_manager.Script): method title (line 7) | def title(self): method show (line 10) | def show(self, is_img2img): method ui (line 14) | def ui(self, _is_img2img): method run (line 25) | def run(self, p: processing.StableDiffusionProcessing, enabled, scale_... FILE: scripts/layerdiffuse/__init__.py function apply_layerdiffuse_sd15 (line 10) | def apply_layerdiffuse_sd15(pipeline): function apply_layerdiffuse_sdxl_attn (line 21) | def apply_layerdiffuse_sdxl_attn(pipeline): function apply_layerdiffuse_sdxl_conv (line 31) | def apply_layerdiffuse_sdxl_conv(pipeline): function apply_layerdiffuse (line 43) | def apply_layerdiffuse(): FILE: scripts/layerdiffuse/layerdiffuse_loader.py function merge_delta_weights_into_unet (line 5) | def merge_delta_weights_into_unet(pipe, delta_weights): function get_attr (line 19) | def get_attr(obj, attr): function load_lora_to_unet (line 26) | def load_lora_to_unet(unet, model_path, frames, device, dtype): FILE: scripts/layerdiffuse/layerdiffuse_model.py function zero_module (line 20) | def zero_module(module): class LatentTransparencyOffsetEncoder (line 29) | class LatentTransparencyOffsetEncoder(torch.nn.Module): method __init__ (line 30) | def __init__(self, *args, **kwargs): method __call__ (line 52) | def __call__(self, x): class UNet1024 (line 57) | class UNet1024(ModelMixin, ConfigMixin): method __init__ (line 59) | def __init__( method forward (line 161) | def forward(self, x, latent): function checkerboard (line 187) | def checkerboard(shape): class TransparentVAEDecoder (line 191) | class TransparentVAEDecoder(AutoencoderKL): method __init__ (line 193) | def __init__( method set_transparent_decoder (line 212) | def set_transparent_decoder(self, sd, mod_number=1): method estimate_single_pass (line 221) | def estimate_single_pass(self, pixel, latent): method estimate_augmented (line 225) | def estimate_augmented(self, pixel, latent): method decode (line 255) | def decode(self, z: torch.Tensor, return_dict: bool = True, generator=... class TransparentVAEEncoder (line 291) | class TransparentVAEEncoder: method __init__ (line 292) | def __init__(self, sd, device="cpu", torch_dtype=torch.float32): class HookerLayers (line 302) | class HookerLayers(torch.nn.Module): method __init__ (line 303) | def __init__(self, layer_list): class AdditionalAttentionCondsEncoder (line 308) | class AdditionalAttentionCondsEncoder(torch.nn.Module): method __init__ (line 309) | def __init__(self): method __call__ (line 354) | def __call__(self, h): class LoraLoader (line 362) | class LoraLoader(torch.nn.Module): method __init__ (line 363) | def __init__(self, layer_list, use_control=False): class LoRALinearLayer (line 373) | class LoRALinearLayer(torch.nn.Module): method __init__ (line 374) | def __init__(self, in_features: int, out_features: int, rank: int = 256): method forward (line 379) | def forward(self, h, org): class AttentionSharingProcessor (line 388) | class AttentionSharingProcessor(nn.Module): method __init__ (line 389) | def __init__(self, module, frames=2, use_control=True, rank=256): method __call__ (line 432) | def __call__( FILE: scripts/layerdiffuse_ext.py class Script (line 5) | class Script(scripts_manager.Script): method title (line 7) | def title(self): method show (line 10) | def show(self, is_img2img): method apply (line 13) | def apply(self): method reload (line 27) | def reload(self): method is_active (line 31) | def is_active(self): method ui (line 40) | def ui(self, _is_img2img): FILE: scripts/lbm/base/base_model.py class BaseModel (line 7) | class BaseModel(nn.Module): method __init__ (line 8) | def __init__(self, config: ModelConfig): method on_fit_start (line 15) | def on_fit_start(self, device: torch.device | None = None, *args, **kw... method forward (line 27) | def forward(self, batch: Dict[str, Any], *args, **kwargs): method freeze (line 30) | def freeze(self): method to (line 36) | def to(self, *args, **kwargs): method compute_metrics (line 50) | def compute_metrics(self, batch: Dict[str, Any], *args, **kwargs): method sample (line 54) | def sample(self, batch: Dict[str, Any], *args, **kwargs): method log_samples (line 58) | def log_samples(self, batch: Dict[str, Any], *args, **kwargs): method on_train_batch_end (line 62) | def on_train_batch_end(self, batch: Dict[str, Any], *args, **kwargs): FILE: scripts/lbm/base/model_config.py class ModelConfig (line 6) | class ModelConfig(BaseConfig): FILE: scripts/lbm/config.py class BaseConfig (line 13) | class BaseConfig: method __post_init__ (line 19) | def __post_init__(self): method from_dict (line 23) | def from_dict(cls, config_dict: Dict[str, Any]) -> "BaseConfig": method _dict_from_json (line 39) | def _dict_from_json(cls, json_path: Union[str, os.PathLike]) -> Dict[s... method from_json (line 58) | def from_json(cls, json_path: str) -> "BaseConfig": method to_dict (line 80) | def to_dict(self) -> dict: method to_json_string (line 87) | def to_json_string(self): method save_json (line 94) | def save_json(self, file_path: str): method save_yaml (line 103) | def save_yaml(self, file_path: str): method from_yaml (line 113) | def from_yaml(cls, yaml_path: str) -> "BaseConfig": FILE: scripts/lbm/embedders/base/base_conditioner.py class BaseConditioner (line 13) | class BaseConditioner(BaseModel): method __init__ (line 39) | def __init__(self, config: BaseConditionerConfig): method forward (line 46) | def forward( FILE: scripts/lbm/embedders/base/base_conditioner_config.py class BaseConditionerConfig (line 6) | class BaseConditionerConfig(BaseConfig): method __post_init__ (line 18) | def __post_init__(self): FILE: scripts/lbm/embedders/conditioners_wrapper.py class ConditionerWrapper (line 15) | class ConditionerWrapper(nn.Module): method __init__ (line 24) | def __init__( method conditioner_sanity_check (line 33) | def conditioner_sanity_check(self): method on_fit_start (line 40) | def on_fit_start(self, device: torch.device = None, *args, **kwargs): method forward (line 44) | def forward( method to (line 98) | def to(self, *args, **kwargs): FILE: scripts/lbm/embedders/latents_concat/latents_concat_embedder_config.py class LatentsConcatEmbedderConfig (line 8) | class LatentsConcatEmbedderConfig(BaseConditionerConfig): method __post_init__ (line 20) | def __post_init__(self): FILE: scripts/lbm/embedders/latents_concat/latents_concat_embedder_model.py class LatentsConcatEmbedder (line 9) | class LatentsConcatEmbedder(BaseConditioner): method __init__ (line 18) | def __init__(self, config: LatentsConcatEmbedderConfig): method forward (line 21) | def forward( FILE: scripts/lbm/extract.py function extract_object (line 7) | def extract_object(birefnet, img): function resize_and_center_crop (line 31) | def resize_and_center_crop(image, target_width, target_height): FILE: scripts/lbm/inference.py function evaluate (line 28) | def evaluate( FILE: scripts/lbm/lbm/lbm_config.py class LBMConfig (line 7) | class LBMConfig(ModelConfig): method __post_init__ (line 83) | def __post_init__(self): FILE: scripts/lbm/lbm/lbm_model.py class LBMModel (line 15) | class LBMModel(BaseModel): method load_from_config (line 40) | def load_from_config(cls, config: LBMConfig): method __init__ (line 43) | def __init__( method on_fit_start (line 86) | def on_fit_start(self, device: torch.device | None = None, *args, **kw... method forward (line 94) | def forward(self, batch: Dict[str, Any], step=0, batch_idx=0, *args, *... method latent_loss (line 201) | def latent_loss(self, prediction, model_input, valid_latent_mask): method pixel_loss (line 222) | def pixel_loss(self, prediction, model_input, valid_mask): method _get_conditioning (line 304) | def _get_conditioning( method _timestep_sampling (line 327) | def _timestep_sampling(self, n_samples=1, device="cpu"): method _predicted_x_0 (line 357) | def _predicted_x_0( method _get_sigmas (line 369) | def _get_sigmas( method sample (line 383) | def sample( method log_samples (line 455) | def log_samples( FILE: scripts/lbm/tiler.py class Tiler (line 12) | class Tiler: method get_tiles (line 13) | def get_tiles( method merge_tiles (line 84) | def merge_tiles( method _average_merge_tiles (line 105) | def _average_merge_tiles(self, tiles: List[List[torch.tensor]]) -> tor... method _gaussian_weights (line 156) | def _gaussian_weights( method _gaussian_merge_tiles (line 206) | def _gaussian_merge_tiles(self, tiles: List[List[torch.tensor]]) -> to... method _blend_v (line 260) | def _blend_v( method _blend_h (line 270) | def _blend_h( method _linear_merge_tiles (line 280) | def _linear_merge_tiles(self, tiles: List[List[torch.tensor]]) -> torc... function extract_into_tensor (line 316) | def extract_into_tensor( function pad (line 333) | def pad(x: torch.Tensor, base_h: int, base_w: int) -> torch.Tensor: function append_dims (line 352) | def append_dims(x: torch.Tensor, target_dims: int) -> torch.Tensor: function update_ema (line 363) | def update_ema( FILE: scripts/lbm/unets/unet.py class DiffusersUNet2DWrapper (line 6) | class DiffusersUNet2DWrapper(UNet2DModel): method __init__ (line 13) | def __init__(self, *args, **kwargs): method forward (line 16) | def forward( method freeze (line 45) | def freeze(self): class DiffusersUNet2DCondWrapper (line 54) | class DiffusersUNet2DCondWrapper(UNet2DConditionModel): method __init__ (line 61) | def __init__(self, *args, **kwargs): method forward (line 65) | def forward( method freeze (line 141) | def freeze(self): FILE: scripts/lbm/utils.py function get_model (line 19) | def get_model( function _get_model_from_config (line 86) | def _get_model_from_config( FILE: scripts/lbm/vae/autoencoderKL.py class AutoencoderKLDiffusers (line 8) | class AutoencoderKLDiffusers(BaseModel): method __init__ (line 16) | def __init__(self, config: AutoencoderKLDiffusersConfig): method _get_properties (line 31) | def _get_properties(self): method encode (line 59) | def encode(self, x: torch.tensor, batch_size: int = 8): method decode (line 70) | def decode(self, z: torch.tensor): FILE: scripts/lbm/vae/autoencoderKL_config.py class AutoencoderKLDiffusersConfig (line 7) | class AutoencoderKLDiffusersConfig(ModelConfig): FILE: scripts/lbm_ext.py class Script (line 32) | class Script(scripts_manager.Script): method title (line 33) | def title(self): method show (line 36) | def show(self, is_img2img): method ui (line 40) | def ui(self, _is_img2img): method load (line 52) | def load(self, method: str): method run (line 76) | def run(self, p: processing.StableDiffusionProcessing, lbm_method, lbm... FILE: scripts/ledits.py class Script (line 6) | class Script(scripts_manager.Script): method title (line 7) | def title(self): method show (line 10) | def show(self, is_img2img): method ui (line 14) | def ui(self, _is_img2img): method run (line 31) | def run(self, p: processing.StableDiffusionProcessing, edit_start, edi... FILE: scripts/loopback.py class Script (line 10) | class Script(scripts_manager.Script): method title (line 11) | def title(self): method show (line 14) | def show(self, is_img2img): method ui (line 17) | def ui(self, is_img2img): method run (line 30) | def run(self, p, loops, final_denoising_strength, denoising_curve, ran... FILE: scripts/lut.py class Script (line 11) | class Script(scripts_manager.Script): method title (line 12) | def title(self): method show (line 15) | def show(self, is_img2img): # pylint: disable=unused-argument method ui (line 18) | def ui(self, _is_img2img): method after (line 41) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/mixture_of_diffusers.py class Script (line 10) | class Script(scripts_manager.Script): method __init__ (line 11) | def __init__(self): method title (line 16) | def title(self): method show (line 19) | def show(self, is_img2img): # pylint: disable=unused-argument method update_ui (line 22) | def update_ui(self, x_tiles, y_tiles): method ui (line 29) | def ui(self, _is_img2img): # ui elements method calc_size (line 49) | def calc_size(self, size, tiles, overlap): method get_prompts (line 53) | def get_prompts(self, x_tiles, y_tiles, prompts, base_prompt, guidance): method check_dependencies (line 69) | def check_dependencies(self): method run (line 79) | def run(self, p: processing.StableDiffusionProcessing, *args): # pylin... method after (line 118) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/mixture_tiling.py function check_dependencies (line 9) | def check_dependencies(): class Script (line 27) | class Script(scripts_manager.Script): method title (line 28) | def title(self): method show (line 31) | def show(self, is_img2img): method ui (line 34) | def ui(self, _is_img2img): method run (line 47) | def run(self, p: processing.StableDiffusionProcessing, x_size, y_size,... FILE: scripts/mod/__init__.py function _tile2pixel_indices (line 86) | def _tile2pixel_indices(tile_row, tile_col, tile_width, tile_height, til... function _pixel2latent_indices (line 102) | def _pixel2latent_indices(px_row_init, px_row_end, px_col_init, px_col_e... function _tile2latent_indices (line 107) | def _tile2latent_indices(tile_row, tile_col, tile_width, tile_height, ti... function _tile2latent_exclusive_indices (line 122) | def _tile2latent_exclusive_indices( function _get_crops_coords_list (line 150) | def _get_crops_coords_list(num_rows, num_cols, output_width): function rescale_noise_cfg (line 195) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 222) | def retrieve_timesteps( class StableDiffusionXLTilingPipeline (line 282) | class StableDiffusionXLTilingPipeline( method __init__ (line 341) | def __init__( class SeedTilesMode (line 376) | class SeedTilesMode(Enum): method encode_prompt (line 382) | def encode_prompt( method prepare_extra_step_kwargs (line 621) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 638) | def check_inputs(self, prompt, height, width, grid_cols, seed_tiles_mo... method _get_add_time_ids (line 659) | def _get_add_time_ids( method _gaussian_weights (line 677) | def _gaussian_weights(self, tile_width, tile_height, nbatches, device,... method upcast_vae (line 702) | def upcast_vae(self): method get_guidance_scale_embedding (line 721) | def get_guidance_scale_embedding( method guidance_scale (line 752) | def guidance_scale(self): method clip_skip (line 756) | def clip_skip(self): method do_classifier_free_guidance (line 763) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 767) | def cross_attention_kwargs(self): method num_timesteps (line 771) | def num_timesteps(self): method interrupt (line 775) | def interrupt(self): method __call__ (line 780) | def __call__( FILE: scripts/mulan.py class Script (line 47) | class Script(scripts_manager.Script): method title (line 48) | def title(self): method show (line 51) | def show(self, is_img2img): method ui (line 54) | def ui(self, _is_img2img): method run (line 61) | def run(self, p: processing.StableDiffusionProcessing, selected_encode... FILE: scripts/nudenet/bannedwords.py function check_banned (line 4) | def check_banned(words:str='', prompt:str='') -> list: FILE: scripts/nudenet/imageguard.py function image_guard (line 95) | def image_guard(image, policy:str=None) -> str: FILE: scripts/nudenet/langdetect.py function lang_detect (line 5) | def lang_detect(text:str, top:int=1, threshold:float=0.25) -> str: FILE: scripts/nudenet/nudenet.py class NudeResult (line 46) | class NudeResult: class NudeDetector (line 53) | class NudeDetector: method __init__ (line 54) | def __init__(self, providers=None, model=None): method read_image (line 75) | def read_image(self, image, target_size=320): method postprocess (line 102) | def postprocess(self, output, resize_factor, pad_left, pad_top, min_sc... method pixelate (line 130) | def pixelate(self, image, blocks=3): method overlay (line 145) | def overlay(self, background, foreground, x_offset=None, y_offset=None): method detect (line 177) | def detect(self, image, min_score): method censor (line 187) | def censor(self, image, min_score=0.2, censor=None, method='pixelate',... function cli (line 224) | def cli(): FILE: scripts/nudenet_ext.py function create_ui (line 11) | def create_ui(accordion=True): function process (line 51) | def process( class Script (line 127) | class Script(scripts.Script): method title (line 131) | def title(self): method show (line 134) | def show(self, _is_img2img): method ui (line 138) | def ui(self, _is_img2img): method before_process (line 142) | def before_process(self, p: processing.StableDiffusionProcessing, enab... method postprocess_image (line 146) | def postprocess_image(self, p: processing.StableDiffusionProcessing, p... class ScriptPostprocessing (line 151) | class ScriptPostprocessing(scripts_postprocessing.ScriptPostprocessing): method ui (line 156) | def ui(self): method process (line 161) | def process(self, pp: scripts_postprocessing.PostprocessedImage, enabl... FILE: scripts/outpainting_mk_2.py function get_matched_noise (line 11) | def get_matched_noise(_np_src_image, np_mask_rgb, noise_q=1, color_varia... class Script (line 102) | class Script(scripts_manager.Script): method title (line 103) | def title(self): method show (line 106) | def show(self, is_img2img): method ui (line 109) | def ui(self, is_img2img): method run (line 123) | def run(self, p, _, pixels, mask_blur, direction, noise_q, color_varia... FILE: scripts/pixelsmith/autoencoder_kl.py class PixelSmithVAE (line 23) | class PixelSmithVAE(ModelMixin, ConfigMixin, FromOriginalModelMixin): method __init__ (line 58) | def __init__( method _set_gradient_checkpointing (line 114) | def _set_gradient_checkpointing(self, module, value=False): method enable_tiling (line 118) | def enable_tiling(self, use_tiling: bool = True): method disable_tiling (line 126) | def disable_tiling(self): method enable_slicing (line 133) | def enable_slicing(self): method disable_slicing (line 140) | def disable_slicing(self): method attn_processors (line 149) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 173) | def set_attn_processor( method set_default_attn_processor (line 210) | def set_default_attn_processor(self): method encode (line 226) | def encode( method _decode (line 258) | def _decode(self, z: torch.FloatTensor, return_dict: bool = True) -> U... method decode (line 271) | def decode( method blend_v (line 299) | def blend_v(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method blend_h (line 305) | def blend_h(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)... method tiled_encode (line 311) | def tiled_encode(self, x: torch.FloatTensor, return_dict: bool = True)... method tiled_decode (line 384) | def tiled_decode(self, z: torch.FloatTensor, return_dict: bool = True)... method forward (line 432) | def forward( method fuse_qkv_projections (line 461) | def fuse_qkv_projections(self): method unfuse_qkv_projections (line 485) | def unfuse_qkv_projections(self): FILE: scripts/pixelsmith/pixelsmith_pipeline.py class PAGIdentitySelfAttnProcessor (line 76) | class PAGIdentitySelfAttnProcessor: method __init__ (line 81) | def __init__(self): method __call__ (line 85) | def __call__( class PAGCFGIdentitySelfAttnProcessor (line 189) | class PAGCFGIdentitySelfAttnProcessor: method __init__ (line 194) | def __init__(self): method __call__ (line 198) | def __call__( function rescale_noise_cfg (line 301) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_timesteps (line 316) | def retrieve_timesteps( class PixelSmithXLPipeline (line 361) | class PixelSmithXLPipeline( method __init__ (line 433) | def __init__( method encode_prompt (line 466) | def encode_prompt( method encode_image (line 701) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method prepare_ip_adapter_image_embeds (line 726) | def prepare_ip_adapter_image_embeds( method prepare_extra_step_kwargs (line 778) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 795) | def check_inputs( method prepare_latents (line 892) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 909) | def _get_add_time_ids( method upcast_vae (line 927) | def upcast_vae(self): method get_guidance_scale_embedding (line 948) | def get_guidance_scale_embedding( method pred_z0 (line 979) | def pred_z0(self, sample, model_output, timestep): method pred_x0 (line 999) | def pred_x0(self, latents, noise_pred, t, generator, device, prompt_em... method guidance_scale (line 1013) | def guidance_scale(self): method guidance_rescale (line 1017) | def guidance_rescale(self): method clip_skip (line 1021) | def clip_skip(self): method do_classifier_free_guidance (line 1028) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 1032) | def cross_attention_kwargs(self): method denoising_end (line 1036) | def denoising_end(self): method num_timesteps (line 1040) | def num_timesteps(self): method interrupt (line 1044) | def interrupt(self): method pag_scale (line 1050) | def pag_scale(self): method do_adversarial_guidance (line 1054) | def do_adversarial_guidance(self): method pag_adaptive_scaling (line 1058) | def pag_adaptive_scaling(self): method do_pag_adaptive_scaling (line 1062) | def do_pag_adaptive_scaling(self): method pag_drop_rate (line 1066) | def pag_drop_rate(self): method pag_applied_layers (line 1070) | def pag_applied_layers(self): method pag_applied_layers_index (line 1074) | def pag_applied_layers_index(self): method _random_crop (line 1078) | def _random_crop(self, z, i, j, patch_size): method get_value_coordinates (line 1082) | def get_value_coordinates(self, tensor): method __call__ (line 1089) | def __call__( FILE: scripts/pixelsmith/vae.py class DecoderOutput (line 34) | class DecoderOutput(BaseOutput): class Encoder (line 46) | class Encoder(nn.Module): method __init__ (line 70) | def __init__( method forward (line 140) | def forward(self, sample: torch.FloatTensor) -> torch.FloatTensor: class Decoder (line 185) | class Decoder(nn.Module): method __init__ (line 208) | def __init__( method forward (line 285) | def forward( class UpSample (line 351) | class UpSample(nn.Module): method __init__ (line 362) | def __init__( method forward (line 372) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: class MaskConditionEncoder (line 379) | class MaskConditionEncoder(nn.Module): method __init__ (line 384) | def __init__( method forward (line 421) | def forward(self, x: torch.FloatTensor, mask=None) -> torch.FloatTensor: class MaskConditionDecoder (line 432) | class MaskConditionDecoder(nn.Module): method __init__ (line 455) | def __init__( method forward (line 537) | def forward( class VectorQuantizer (line 647) | class VectorQuantizer(nn.Module): method __init__ (line 656) | def __init__( method remap_to_used (line 689) | def remap_to_used(self, inds: torch.LongTensor) -> torch.LongTensor: method unmap_to_all (line 703) | def unmap_to_all(self, inds: torch.LongTensor) -> torch.LongTensor: method forward (line 713) | def forward(self, z: torch.FloatTensor) -> Tuple[torch.FloatTensor, to... method get_codebook_entry (line 747) | def get_codebook_entry(self, indices: torch.LongTensor, shape: Tuple[i... class DiagonalGaussianDistribution (line 765) | class DiagonalGaussianDistribution(object): method __init__ (line 766) | def __init__(self, parameters: torch.Tensor, deterministic: bool = Fal... method sample (line 778) | def sample(self, generator: Optional[torch.Generator] = None) -> torch... method kl (line 789) | def kl(self, other: "DiagonalGaussianDistribution" = None) -> torch.Te... method nll (line 808) | def nll(self, sample: torch.Tensor, dims: Tuple[int, ...] = [1, 2, 3])... method mode (line 817) | def mode(self) -> torch.Tensor: class EncoderTiny (line 821) | class EncoderTiny(nn.Module): method __init__ (line 839) | def __init__( method forward (line 875) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: class DecoderTiny (line 897) | class DecoderTiny(nn.Module): method __init__ (line 917) | def __init__( method forward (line 957) | def forward(self, x: torch.FloatTensor) -> torch.FloatTensor: FILE: scripts/pixelsmith_ext.py class Script (line 6) | class Script(scripts_manager.Script): method __init__ (line 7) | def __init__(self): method title (line 13) | def title(self): method show (line 16) | def show(self, is_img2img): method ui (line 19) | def ui(self, _is_img2img): # ui elements method encode (line 26) | def encode(self, p: processing.StableDiffusionProcessing, image: Image... method run (line 48) | def run(self, p: processing.StableDiffusionProcessing, slider: int = 2... method after (line 70) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/poor_mans_outpainting.py class Script (line 9) | class Script(scripts_manager.Script): method title (line 10) | def title(self): method show (line 13) | def show(self, is_img2img): method ui (line 16) | def ui(self, is_img2img): method run (line 28) | def run(self, p, pixels, mask_blur, direction): # pylint: disable=argu... FILE: scripts/postprocessing_codeformer.py class ScriptPostprocessingCodeFormer (line 8) | class ScriptPostprocessingCodeFormer(scripts_postprocessing.ScriptPostpr... method ui (line 12) | def ui(self): method process (line 19) | def process(self, pp: scripts_postprocessing.PostprocessedImage, codef... FILE: scripts/postprocessing_gfpgan.py class ScriptPostprocessingGfpGan (line 7) | class ScriptPostprocessingGfpGan(scripts_postprocessing.ScriptPostproces... method ui (line 11) | def ui(self): method process (line 17) | def process(self, pp: scripts_postprocessing.PostprocessedImage, gfpga... FILE: scripts/postprocessing_pixelart.py class ScriptPixelArt (line 4) | class ScriptPixelArt(scripts_postprocessing.ScriptPostprocessing): method ui (line 8) | def ui(self): method process (line 27) | def process(self, pp: scripts_postprocessing.PostprocessedImage, pixel... FILE: scripts/postprocessing_upscale.py class ScriptPostprocessingUpscale (line 8) | class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostproce... method ui (line 12) | def ui(self): method upscale (line 51) | def upscale(self, image, info, upscaler, upscale_mode, upscale_by, up... method process (line 65) | def process(self, pp: scripts_postprocessing.PostprocessedImage, upsca... method image_changed (line 89) | def image_changed(self): class ScriptPostprocessingUpscaleSimple (line 93) | class ScriptPostprocessingUpscaleSimple(ScriptPostprocessingUpscale): method ui (line 97) | def ui(self): method process (line 106) | def process(self, pp: scripts_postprocessing.PostprocessedImage, upsca... FILE: scripts/postprocessing_video.py class ScriptPostprocessingUpscale (line 6) | class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostproce... method ui (line 9) | def ui(self): method postprocess (line 46) | def postprocess(self, images, filename, video_type, duration, loop, pa... FILE: scripts/prompt_enhance.py function b64 (line 20) | def b64(image): function is_vision_model (line 32) | def is_vision_model(model_name: str) -> bool: function is_thinking_model (line 39) | def is_thinking_model(model_name: str) -> bool: function get_model_display_name (line 56) | def get_model_display_name(model_repo: str) -> str: function get_model_repo_from_display (line 66) | def get_model_repo_from_display(display_name: str) -> str: function keep_think_block_open (line 76) | def keep_think_block_open(text_prompt: str) -> str: class Options (line 93) | class Options: method get_model_choices (line 171) | def get_model_choices(): method get_default_display (line 176) | def get_default_display(): class Script (line 181) | class Script(scripts_manager.Script): method title (line 190) | def title(self): method show (line 193) | def show(self, _is_img2img): method compile (line 196) | def compile(self): method load (line 202) | def load(self, name:str=None, model_repo:str=None, model_gguf:str=None... method censored (line 292) | def censored(self, response): method unload (line 296) | def unload(self): method clean (line 309) | def clean(self, response, keep_thinking=False, prefill_text='', keep_p... method post (line 369) | def post(self, response, prefix, suffix, networks): method extract (line 381) | def extract(self, prompt): method enhance (line 387) | def enhance(self, model: str=None, prompt:str=None, system:str=None, p... method apply (line 629) | def apply(self, prompt, image, apply_prompt, llm_model, prompt_system,... method get_custom (line 654) | def get_custom(self, name): method update_vision_toggle (line 663) | def update_vision_toggle(self, model_name): method ui (line 670) | def ui(self, _is_img2img): method after_component (line 746) | def after_component(self, component, **kwargs): # searching for actual... method before_process (line 754) | def before_process(self, p: processing.StableDiffusionProcessing, *arg... FILE: scripts/prompt_matrix.py class Script (line 9) | class Script(scripts_manager.Script): method title (line 10) | def title(self): method ui (line 13) | def ui(self, is_img2img): method run (line 27) | def run(self, p, put_at_start, different_seeds, prompt_type, variation... FILE: scripts/prompts_from_file.py function process_string_tag (line 10) | def process_string_tag(tag): function process_int_tag (line 14) | def process_int_tag(tag): function process_float_tag (line 18) | def process_float_tag(tag): function process_boolean_tag (line 22) | def process_boolean_tag(tag): function cmdargs (line 54) | def cmdargs(line): function load_prompt_file (line 84) | def load_prompt_file(file): class Script (line 96) | class Script(scripts_manager.Script): method title (line 97) | def title(self): method ui (line 100) | def ui(self, is_img2img): method run (line 112) | def run(self, p, checkbox_iterate, checkbox_iterate_batch, prompt_txt:... FILE: scripts/pulid/attention_processor.py class AttnProcessor (line 12) | class AttnProcessor(nn.Module): method __init__ (line 13) | def __init__(self): method __call__ (line 16) | def __call__( class IDAttnProcessor (line 79) | class IDAttnProcessor(nn.Module): method __init__ (line 91) | def __init__(self, hidden_size, cross_attention_dim=None): method __call__ (line 96) | def __call__( class AttnProcessor2_0 (line 191) | class AttnProcessor2_0(nn.Module): method __init__ (line 196) | def __init__(self): method __call__ (line 201) | def __call__( class IDAttnProcessor2_0 (line 277) | class IDAttnProcessor2_0(torch.nn.Module): method __init__ (line 287) | def __init__(self, hidden_size, cross_attention_dim=None): method __call__ (line 295) | def __call__( FILE: scripts/pulid/encoders_transformer.py function FeedForward (line 7) | def FeedForward(dim, mult=4): function reshape_tensor (line 17) | def reshape_tensor(x, heads): class PerceiverAttentionCA (line 28) | class PerceiverAttentionCA(nn.Module): method __init__ (line 29) | def __init__(self, *, dim=3072, dim_head=128, heads=16, kv_dim=2048): method forward (line 41) | def forward(self, x, latents): class PerceiverAttention (line 68) | class PerceiverAttention(nn.Module): method __init__ (line 69) | def __init__(self, *, dim, dim_head=64, heads=8, kv_dim=None): method forward (line 81) | def forward(self, x, latents): class IDFormer (line 109) | class IDFormer(nn.Module): method __init__ (line 117) | def __init__( method forward (line 175) | def forward(self, x, y): class IDEncoder (line 192) | class IDEncoder(nn.Module): method __init__ (line 193) | def __init__(self, width=1280, context_dim=2048, num_token=5): method forward (line 237) | def forward(self, x, y): FILE: scripts/pulid/eva_clip/eva_vit_model.py class DropPath (line 33) | class DropPath(nn.Module): method __init__ (line 36) | def __init__(self, drop_prob=None): method forward (line 40) | def forward(self, x): method extra_repr (line 43) | def extra_repr(self) -> str: class Mlp (line 47) | class Mlp(nn.Module): method __init__ (line 48) | def __init__( method forward (line 70) | def forward(self, x): class SwiGLU (line 81) | class SwiGLU(nn.Module): method __init__ (line 82) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 97) | def forward(self, x): class Attention (line 106) | class Attention(nn.Module): method __init__ (line 107) | def __init__( method forward (line 173) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class Block (line 246) | class Block(nn.Module): method __init__ (line 248) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 287) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class PatchEmbed (line 305) | class PatchEmbed(nn.Module): method __init__ (line 308) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 320) | def forward(self, x, **kwargs): class RelativePositionBias (line 329) | class RelativePositionBias(nn.Module): method __init__ (line 331) | def __init__(self, window_size, num_heads): method forward (line 358) | def forward(self): class EVAVisionTransformer (line 366) | class EVAVisionTransformer(nn.Module): method __init__ (line 369) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 447) | def fix_init_weight(self): method get_cast_dtype (line 458) | def get_cast_dtype(self) -> torch.dtype: method _init_weights (line 461) | def _init_weights(self, m): method get_num_layers (line 470) | def get_num_layers(self): method lock (line 473) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 479) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 483) | def no_weight_decay(self): method get_classifier (line 486) | def get_classifier(self): method reset_classifier (line 489) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 493) | def forward_features(self, x, return_all_features=False, return_hidden... method forward (line 541) | def forward(self, x, return_all_features=False, return_hidden=False, s... FILE: scripts/pulid/eva_clip/factory.py function _natural_key (line 25) | def _natural_key(string_): function _rescan_model_configs (line 29) | def _rescan_model_configs(): function list_models (line 53) | def list_models(): function add_model_config (line 58) | def add_model_config(path): function get_model_config (line 66) | def get_model_config(model_name): function get_tokenizer (line 73) | def get_tokenizer(model_name): function load_state_dict (line 80) | def load_state_dict(checkpoint_path: str, map_location: str='cpu', model... function load_checkpoint (line 110) | def load_checkpoint(model, checkpoint_path, model_key="model|module|stat... function load_clip_visual_state_dict (line 131) | def load_clip_visual_state_dict(checkpoint_path: str, map_location: str=... function load_clip_text_state_dict (line 144) | def load_clip_text_state_dict(checkpoint_path: str, map_location: str='c... function get_pretrained_tag (line 152) | def get_pretrained_tag(pretrained_model): function load_pretrained_checkpoint (line 163) | def load_pretrained_checkpoint( function create_model (line 211) | def create_model( function create_model_and_transforms (line 358) | def create_model_and_transforms( function create_transforms (line 413) | def create_transforms( function create_model_from_pretrained (line 469) | def create_model_from_pretrained( FILE: scripts/pulid/eva_clip/hf_model.py class BaseModelOutput (line 21) | class BaseModelOutput: class PretrainedConfig (line 25) | class PretrainedConfig: function _camel2snake (line 31) | def _camel2snake(s): function register_pooler (line 36) | def register_pooler(cls): class MeanPooler (line 43) | class MeanPooler(nn.Module): method forward (line 45) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class MaxPooler (line 50) | class MaxPooler(nn.Module): method forward (line 52) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class ClsPooler (line 57) | class ClsPooler(nn.Module): method __init__ (line 59) | def __init__(self, use_pooler_output=True): method forward (line 64) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class HFTextEncoder (line 74) | class HFTextEncoder(nn.Module): method __init__ (line 76) | def __init__( method mask (line 149) | def mask(self, input_ids, vocab_size, device, targets=None, masked_ind... method forward_mlm (line 174) | def forward_mlm(self, input_ids, image_embeds, mlm_probability=0.25): method forward (line 210) | def forward(self, x:TensorType) -> TensorType: method lock (line 217) | def lock(self, unlocked_layers:int=0, freeze_layer_norm:bool=True): method set_grad_checkpointing (line 235) | def set_grad_checkpointing(self, enable=True): method get_num_layers (line 238) | def get_num_layers(self): method init_parameters (line 243) | def init_parameters(self): FILE: scripts/pulid/eva_clip/loss.py function gather_features (line 21) | def gather_features( class ClipLoss (line 70) | class ClipLoss(nn.Module): method __init__ (line 72) | def __init__( method forward (line 95) | def forward(self, image_features, text_features, logit_scale=1.): FILE: scripts/pulid/eva_clip/model.py class CLIPVisionCfg (line 30) | class CLIPVisionCfg: class CLIPTextCfg (line 59) | class CLIPTextCfg: function get_cast_dtype (line 76) | def get_cast_dtype(precision: str): function _build_vision_tower (line 85) | def _build_vision_tower( function _build_text_tower (line 166) | def _build_text_tower( class CLIP (line 203) | class CLIP(nn.Module): method __init__ (line 204) | def __init__( method lock_image_tower (line 226) | def lock_image_tower(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 231) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 236) | def no_weight_decay(self): method encode_image (line 239) | def encode_image(self, image, normalize: bool = False): method encode_text (line 243) | def encode_text(self, text, normalize: bool = False): method forward (line 257) | def forward(self, image, text): class CustomCLIP (line 263) | class CustomCLIP(nn.Module): method __init__ (line 264) | def __init__( method lock_image_tower (line 278) | def lock_image_tower(self, unlocked_groups=0, freeze_bn_stats=False): method lock_text_tower (line 282) | def lock_text_tower(self, unlocked_layers:int=0, freeze_layer_norm:boo... method set_grad_checkpointing (line 286) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 291) | def no_weight_decay(self): method encode_image (line 294) | def encode_image(self, image, normalize: bool = False): method encode_text (line 298) | def encode_text(self, text, normalize: bool = False): method forward (line 302) | def forward(self, image, text): function convert_weights_to_lp (line 308) | def convert_weights_to_lp(model: nn.Module, dtype=torch.float16): function convert_to_custom_text_state_dict (line 340) | def convert_to_custom_text_state_dict(state_dict: dict): function build_model_from_openai_state_dict (line 359) | def build_model_from_openai_state_dict( function trace_model (line 419) | def trace_model(model, batch_size=256, device=torch.device('cpu')): FILE: scripts/pulid/eva_clip/modified_resnet.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, inplanes, planes, stride=1): method forward (line 42) | def forward(self, x: torch.Tensor): class AttentionPool2d (line 58) | class AttentionPool2d(nn.Module): method __init__ (line 59) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 68) | def forward(self, x): class ModifiedResNet (line 95) | class ModifiedResNet(nn.Module): method __init__ (line 103) | def __init__(self, layers, output_dim, heads, image_size=224, width=64): method _make_layer (line 132) | def _make_layer(self, planes, blocks, stride=1): method init_parameters (line 141) | def init_parameters(self): method lock (line 154) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 162) | def set_grad_checkpointing(self, enable=True): method stem (line 166) | def stem(self, x): method forward (line 173) | def forward(self, x): FILE: scripts/pulid/eva_clip/openai.py function list_openai_models (line 18) | def list_openai_models() -> List[str]: function load_openai_model (line 23) | def load_openai_model( FILE: scripts/pulid/eva_clip/pretrained.py function _pcfg (line 17) | def _pcfg(url='', hf_hub='', filename='', mean=None, std=None): function _clean_tag (line 190) | def _clean_tag(tag: str): function list_pretrained (line 195) | def list_pretrained(as_str: bool = False): function list_pretrained_models_by_tag (line 202) | def list_pretrained_models_by_tag(tag: str): function list_pretrained_tags_by_model (line 212) | def list_pretrained_tags_by_model(model: str): function is_pretrained_cfg (line 220) | def is_pretrained_cfg(model: str, tag: str): function get_pretrained_cfg (line 226) | def get_pretrained_cfg(model: str, tag: str): function get_pretrained_url (line 233) | def get_pretrained_url(model: str, tag: str): function download_pretrained_from_url (line 238) | def download_pretrained_from_url( function has_hf_hub (line 284) | def has_hf_hub(necessary=False): function download_pretrained_from_hf (line 292) | def download_pretrained_from_hf( function download_pretrained (line 303) | def download_pretrained( FILE: scripts/pulid/eva_clip/rope.py function broadcat (line 7) | def broadcat(tensors, dim = -1): function rotate_half (line 23) | def rotate_half(x): class VisionRotaryEmbedding (line 30) | class VisionRotaryEmbedding(nn.Module): method __init__ (line 31) | def __init__( method forward (line 70) | def forward(self, t, start_index = 0): class VisionRotaryEmbeddingFast (line 79) | class VisionRotaryEmbeddingFast(nn.Module): method __init__ (line 80) | def __init__( method forward (line 121) | def forward(self, t, patch_indices_keep=None): FILE: scripts/pulid/eva_clip/timm_model.py class TimmModel (line 28) | class TimmModel(nn.Module): method __init__ (line 33) | def __init__( method lock (line 78) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 110) | def set_grad_checkpointing(self, enable=True): method forward (line 116) | def forward(self, x): FILE: scripts/pulid/eva_clip/tokenizer.py function default_bpe (line 21) | def default_bpe(): function bytes_to_unicode (line 26) | def bytes_to_unicode(): function get_pairs (line 48) | def get_pairs(word): function basic_clean (line 60) | def basic_clean(text): function whitespace_clean (line 66) | def whitespace_clean(text): class SimpleTokenizer (line 72) | class SimpleTokenizer(object): method __init__ (line 73) | def __init__(self, bpe_path: str = default_bpe(), special_tokens=None): method bpe (line 98) | def bpe(self, token): method encode (line 139) | def encode(self, text): method decode (line 147) | def decode(self, tokens): function tokenize (line 156) | def tokenize(texts: Union[str, List[str]], context_length: int = 77) -> ... class HFTokenizer (line 188) | class HFTokenizer: method __init__ (line 190) | def __init__(self, tokenizer_name:str): method __call__ (line 194) | def __call__(self, texts:Union[str, List[str]], context_length:int=77)... FILE: scripts/pulid/eva_clip/transform.py class ResizeMaxSize (line 13) | class ResizeMaxSize(nn.Module): method __init__ (line 15) | def __init__(self, max_size, interpolation=InterpolationMode.BICUBIC, ... method forward (line 24) | def forward(self, img): function _convert_to_rgb (line 39) | def _convert_to_rgb(image): function image_transform (line 60) | def image_transform( FILE: scripts/pulid/eva_clip/transformer.py class LayerNormFp32 (line 20) | class LayerNormFp32(nn.LayerNorm): method __init__ (line 22) | def __init__(self, *args, **kwargs): method forward (line 25) | def forward(self, x: torch.Tensor): class LayerNorm (line 36) | class LayerNorm(nn.LayerNorm): method forward (line 39) | def forward(self, x: torch.Tensor): class QuickGELU (line 44) | class QuickGELU(nn.Module): method forward (line 46) | def forward(self, x: torch.Tensor): class LayerScale (line 50) | class LayerScale(nn.Module): method __init__ (line 51) | def __init__(self, dim, init_values=1e-5, inplace=False): method forward (line 56) | def forward(self, x): class PatchDropout (line 59) | class PatchDropout(nn.Module): method __init__ (line 64) | def __init__(self, prob, exclude_first_token=True): method forward (line 71) | def forward(self, x): function _in_projection_packed (line 103) | def _in_projection_packed( class Attention (line 134) | class Attention(nn.Module): method __init__ (line 135) | def __init__( method forward (line 179) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): class CustomAttention (line 227) | class CustomAttention(nn.Module): method __init__ (line 228) | def __init__( method forward (line 270) | def forward(self, query: torch.Tensor, key: torch.Tensor, value: torch... class CustomResidualAttentionBlock (line 323) | class CustomResidualAttentionBlock(nn.Module): method __init__ (line 324) | def __init__( method forward (line 368) | def forward(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a... class CustomTransformer (line 373) | class CustomTransformer(nn.Module): method __init__ (line 374) | def __init__( method get_cast_dtype (line 413) | def get_cast_dtype(self) -> torch.dtype: method forward (line 416) | def forward(self, q: torch.Tensor, k: torch.Tensor = None, v: torch.Te... class ResidualAttentionBlock (line 427) | class ResidualAttentionBlock(nn.Module): method __init__ (line 428) | def __init__( method attention (line 458) | def attention(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor]... method forward (line 464) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class Transformer (line 469) | class Transformer(nn.Module): method __init__ (line 470) | def __init__( method get_cast_dtype (line 492) | def get_cast_dtype(self) -> torch.dtype: method forward (line 495) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class VisionTransformer (line 504) | class VisionTransformer(nn.Module): method __init__ (line 505) | def __init__( method lock (line 551) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method get_num_layers (line 584) | def get_num_layers(self): method set_grad_checkpointing (line 588) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 592) | def no_weight_decay(self): method forward (line 595) | def forward(self, x: torch.Tensor, return_all_features: bool=False): class TextTransformer (line 626) | class TextTransformer(nn.Module): method __init__ (line 627) | def __init__( method init_parameters (line 670) | def init_parameters(self): method set_grad_checkpointing (line 687) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 691) | def no_weight_decay(self): method get_num_layers (line 695) | def get_num_layers(self): method build_attention_mask (line 698) | def build_attention_mask(self): method forward (line 706) | def forward(self, text, return_all_features: bool=False): FILE: scripts/pulid/eva_clip/utils.py function resize_clip_pos_embed (line 13) | def resize_clip_pos_embed(state_dict, model, interpolation: str = 'bicub... function resize_visual_pos_embed (line 46) | def resize_visual_pos_embed(state_dict, model, interpolation: str = 'bic... function resize_evaclip_pos_embed (line 78) | def resize_evaclip_pos_embed(state_dict, model, interpolation: str = 'bi... function resize_eva_pos_embed (line 109) | def resize_eva_pos_embed(state_dict, model, interpolation: str = 'bicubi... function resize_rel_pos_embed (line 140) | def resize_rel_pos_embed(state_dict, model, interpolation: str = 'bicubi... function freeze_batch_norm_2d (line 237) | def freeze_batch_norm_2d(module, module_match={}, name=''): function _ntuple (line 277) | def _ntuple(n): function is_logging (line 292) | def is_logging(args): class AllGather (line 304) | class AllGather(torch.autograd.Function): method forward (line 311) | def forward(ctx, tensor, rank, world_size): method backward (line 319) | def backward(ctx, grad_output): FILE: scripts/pulid/pulid_flux.py function apply_flux (line 7) | def apply_flux(pipe: FluxPipeline): function unapply_flux (line 26) | def unapply_flux(pipe: FluxPipeline): FILE: scripts/pulid/pulid_sampling.py function append_zero (line 10) | def append_zero(x): function get_sigmas_karras (line 14) | def get_sigmas_karras(n, sigma_min, sigma_max, rho=7., device='cpu'): function get_sigmas_exponential (line 23) | def get_sigmas_exponential(n, sigma_min, sigma_max, device='cpu'): function get_sigmas_polyexponential (line 29) | def get_sigmas_polyexponential(n, sigma_min, sigma_max, rho=1., device='... function get_sigmas_vp (line 36) | def get_sigmas_vp(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu'): function append_dims (line 43) | def append_dims(x, target_dims): function to_d (line 51) | def to_d(x, sigma, denoised): function get_ancestral_step (line 56) | def get_ancestral_step(sigma_from, sigma_to, eta=1.): function default_noise_sampler (line 66) | def default_noise_sampler(x): function inpaint_mask (line 70) | def inpaint_mask(x, i, steps, mask_args): class BatchedBrownianTree (line 79) | class BatchedBrownianTree: method __init__ (line 82) | def __init__(self, x, t0, t1, seed=None, **kwargs): method sort (line 97) | def sort(a, b): method __call__ (line 100) | def __call__(self, t0, t1): class BrownianTreeNoiseSampler (line 106) | class BrownianTreeNoiseSampler: method __init__ (line 121) | def __init__(self, x, sigma_min, sigma_max, seed=None, transform=lambd... method __call__ (line 126) | def __call__(self, sigma, sigma_next): function sample_euler (line 132) | def sample_euler(model, x, sigmas, extra_args=None, callback=None, disab... function sample_euler_ancestral (line 155) | def sample_euler_ancestral(model, x, sigmas, extra_args=None, callback=N... function linear_multistep_coeff (line 176) | def linear_multistep_coeff(order, t, i, j): function log_likelihood (line 190) | def log_likelihood(model, x, sigma_min, sigma_max, extra_args=None, atol... class PIDStepSizeController (line 213) | class PIDStepSizeController: method __init__ (line 215) | def __init__(self, h, pcoeff, icoeff, dcoeff, order=1, accept_safety=0... method limiter (line 224) | def limiter(self, x): method propose_step (line 227) | def propose_step(self, error): class DPMSolver (line 242) | class DPMSolver(nn.Module): method __init__ (line 245) | def __init__(self, model, extra_args=None, eps_callback=None, info_cal... method t (line 252) | def t(self, sigma): method sigma (line 255) | def sigma(self, t): method eps (line 258) | def eps(self, eps_cache, key, x, t, *args, **kwargs): method dpm_solver_1_step (line 267) | def dpm_solver_1_step(self, x, t, t_next, eps_cache=None): method dpm_solver_2_step (line 274) | def dpm_solver_2_step(self, x, t, t_next, r1=1 / 2, eps_cache=None): method dpm_solver_3_step (line 284) | def dpm_solver_3_step(self, x, t, t_next, r1=1 / 3, r2=2 / 3, eps_cach... method dpm_solver_fast (line 297) | def dpm_solver_fast(self, x, t_start, t_end, nfe, eta=0., s_noise=1., ... method dpm_solver_adaptive (line 336) | def dpm_solver_adaptive(self, x, t_start, t_end, order=3, rtol=0.05, a... function sample_dpmpp_2s_ancestral (line 391) | def sample_dpmpp_2s_ancestral(model, x, sigmas, extra_args=None, callbac... function sample_dpmpp_sde (line 427) | def sample_dpmpp_sde(model, x, sigmas, extra_args=None, callback=None, d... function sample_dpmpp_2m (line 471) | def sample_dpmpp_2m(model, x, sigmas, extra_args=None, callback=None, di... function sample_dpmpp_2m_sde (line 499) | def sample_dpmpp_2m_sde(model, x, sigmas, extra_args=None, callback=None... function sample_dpmpp_3m_sde (line 546) | def sample_dpmpp_3m_sde(model, x, sigmas, extra_args=None, callback=None... FILE: scripts/pulid/pulid_sdxl.py class StableDiffusionXLPuLIDPipeline (line 31) | class StableDiffusionXLPuLIDPipeline: method __init__ (line 32) | def __init__(self, method sigma_min (line 130) | def sigma_min(self): method sigma_max (line 134) | def sigma_max(self): method timestep (line 137) | def timestep(self, sigma): method get_sigmas_karras (line 142) | def get_sigmas_karras(self, n, rho=7.0): method hack_unet_attn_layers (line 149) | def hack_unet_attn_layers(self, unet): method load_pretrain (line 180) | def load_pretrain(self): method to_gray (line 198) | def to_gray(self, img): method get_id_embedding (line 203) | def get_id_embedding(self, image_list): method set_progress_bar_config (line 286) | def set_progress_bar_config(self, bar_format: str = None, ncols: int =... method sample (line 292) | def sample(self, x, sigma, **extra_args): method init_latent (line 307) | def init_latent(self, seed, size, image, mask_image, strength, width, ... method __call__ (line 347) | def __call__( class StableDiffusionXLPuLIDPipelineImage (line 441) | class StableDiffusionXLPuLIDPipelineImage(StableDiffusionXLPuLIDPipeline): method __init__ (line 442) | def __init__(self, pipe: StableDiffusionXLPipeline, device: torch.devi... class StableDiffusionXLPuLIDPipelineInpaint (line 447) | class StableDiffusionXLPuLIDPipelineInpaint(StableDiffusionXLPuLIDPipeli... method __init__ (line 448) | def __init__(self, pipe: StableDiffusionXLPipeline, device: torch.devi... FILE: scripts/pulid/pulid_utils.py function seed_everything (line 13) | def seed_everything(seed): function instantiate_from_config (line 21) | def instantiate_from_config(config): function get_obj_from_str (line 29) | def get_obj_from_str(string, reload=False): function drop_seq_token (line 37) | def drop_seq_token(seq, drop_rate=0.5): function import_model_class_from_model_name_or_path (line 45) | def import_model_class_from_model_name_or_path( function resize_numpy_image_long (line 65) | def resize_numpy_image_long(image, resize_long_edge=768): function img2tensor (line 77) | def img2tensor(imgs, bgr2rgb=True, float32=True): function tensor2img (line 105) | def tensor2img(tensor, rgb2bgr=True, out_type=np.uint8, min_max=(0, 1)): FILE: scripts/pulid_ext.py class Script (line 16) | class Script(scripts_manager.Script): method __init__ (line 17) | def __init__(self): method title (line 24) | def title(self): method show (line 27) | def show(self, _is_img2img): method dependencies (line 30) | def dependencies(self): method register (line 37) | def register(self): # register xyz grid elements method decode_image (line 62) | def decode_image(self, b64): method load_images (line 66) | def load_images(self, files): method ui (line 86) | def ui(self, _is_img2img): method run (line 107) | def run( method after (line 216) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... method run_sdxl (line 238) | def run_sdxl(self, p: processing.StableDiffusionProcessing, images: li... method run_flux (line 295) | def run_flux(self, p: processing.StableDiffusionProcessing, images: li... FILE: scripts/regional_prompting.py function hijack_register_modules (line 9) | def hijack_register_modules(self, **kwargs): class Script (line 24) | class Script(scripts_manager.Script): method title (line 25) | def title(self): method show (line 28) | def show(self, is_img2img): method change (line 31) | def change(self, mode): method ui (line 34) | def ui(self, _is_img2img): method run (line 46) | def run(self, p: processing.StableDiffusionProcessing, mode, grid, pow... FILE: scripts/resadapter.py class Script (line 20) | class Script(scripts_manager.Script): method title (line 21) | def title(self): method show (line 24) | def show(self, is_img2img): method ui (line 28) | def ui(self, _is_img2img): method run (line 36) | def run(self, p: processing.StableDiffusionProcessing, model, weight):... FILE: scripts/sd_upscale.py class Script (line 9) | class Script(scripts_manager.Script): method title (line 10) | def title(self): method show (line 13) | def show(self, is_img2img): method ui (line 16) | def ui(self, is_img2img): method run (line 26) | def run(self, p, _, overlap, upscaler_index, scale_factor): # pylint: ... FILE: scripts/skip_layer_guidance.py class Script (line 9) | class Script(scripts_manager.Script): method __init__ (line 10) | def __init__(self): method title (line 14) | def title(self): method show (line 17) | def show(self, is_img2img): method ui (line 21) | def ui(self, _is_img2img): method register (line 31) | def register(self): # register xyz grid elements method run (line 59) | def run(self, p: processing.StableDiffusionProcessing, layers: str = '... FILE: scripts/softfill.py function rescale_noise_cfg (line 89) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): function retrieve_latents (line 104) | def retrieve_latents( function retrieve_timesteps (line 118) | def retrieve_timesteps( class StableDiffusionXLSoftFillPipeline (line 162) | class StableDiffusionXLSoftFillPipeline( method __init__ (line 228) | def __init__( method encode_prompt (line 263) | def encode_prompt( method prepare_extra_step_kwargs (line 501) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 518) | def check_inputs( method get_timesteps (line 608) | def get_timesteps(self, num_inference_steps, strength, device, denoisi... method prepare_latents (line 644) | def prepare_latents( method encode_image (line 713) | def encode_image(self, image, device, num_images_per_prompt, output_hi... method prepare_ip_adapter_image_embeds (line 738) | def prepare_ip_adapter_image_embeds( method _get_add_time_ids (line 789) | def _get_add_time_ids( method upcast_vae (line 841) | def upcast_vae(self): method get_guidance_scale_embedding (line 859) | def get_guidance_scale_embedding( method guidance_scale (line 890) | def guidance_scale(self): method guidance_rescale (line 894) | def guidance_rescale(self): method clip_skip (line 898) | def clip_skip(self): method do_classifier_free_guidance (line 905) | def do_classifier_free_guidance(self): method cross_attention_kwargs (line 909) | def cross_attention_kwargs(self): method denoising_end (line 913) | def denoising_end(self): method denoising_start (line 917) | def denoising_start(self): method num_timesteps (line 921) | def num_timesteps(self): method interrupt (line 925) | def interrupt(self): method __call__ (line 930) | def __call__( class Script (line 1610) | class Script(scripts_manager.Script): method title (line 1613) | def title(self): method show (line 1616) | def show(self, is_img2img): method ui (line 1619) | def ui(self, _is_img2img): method run (line 1629) | def run(self, p: processing.StableDiffusionProcessingImg2Img, enabled,... method after (line 1668) | def after(self, p: processing.StableDiffusionProcessingImg2Img, *args,... FILE: scripts/stablevideodiffusion.py class Script (line 17) | class Script(scripts_manager.Script): method title (line 18) | def title(self): method show (line 21) | def show(self, is_img2img): method ui (line 25) | def ui(self, is_img2img): method _encode_image (line 45) | def _encode_image(self, image: torch.Tensor, device, num_videos_per_pr... method _decode_latents (line 55) | def _decode_latents(self, latents: torch.Tensor, num_frames: int, deco... method run (line 70) | def run(self, p: processing.StableDiffusionProcessing, model, num_fram... FILE: scripts/style_aligned/inversion.py function _get_text_embeddings (line 30) | def _get_text_embeddings(prompt: str, tokenizer, text_encoder, device): function _encode_text_sdxl (line 50) | def _encode_text_sdxl(model: StableDiffusionXLPipeline, prompt: str) -> ... function _encode_text_sdxl_with_negative (line 62) | def _encode_text_sdxl_with_negative(model: StableDiffusionXLPipeline, pr... function _encode_image (line 71) | def _encode_image(model: StableDiffusionXLPipeline, image: np.ndarray) -... function _next_step (line 78) | def _next_step(model: StableDiffusionXLPipeline, model_output: T, timest... function _get_noise_pred (line 89) | def _get_noise_pred(model: StableDiffusionXLPipeline, latent: T, t: T, c... function _ddim_loop (line 98) | def _ddim_loop(model: StableDiffusionXLPipeline, z0, prompt, guidance_sc... function make_inversion_callback (line 110) | def make_inversion_callback(zts, offset: int = 0): function ddim_inversion (line 120) | def ddim_inversion(model: StableDiffusionXLPipeline, x0: np.ndarray, pro... FILE: scripts/style_aligned/sa_handler.py class StyleAlignedArgs (line 31) | class StyleAlignedArgs: function expand_first (line 44) | def expand_first(feat: T, scale=1.,) -> T: function concat_first (line 55) | def concat_first(feat: T, dim=2, scale=1.) -> T: function calc_mean_std (line 60) | def calc_mean_std(feat, eps: float = 1e-5) -> tuple[T, T]: function adain (line 66) | def adain(feat: T) -> T: class DefaultAttentionProcessor (line 75) | class DefaultAttentionProcessor(nn.Module): method __init__ (line 77) | def __init__(self): method __call__ (line 81) | def __call__(self, attn: attention_processor.Attention, hidden_states,... class SharedAttentionProcessor (line 86) | class SharedAttentionProcessor(DefaultAttentionProcessor): method shifted_scaled_dot_product_attention (line 88) | def shifted_scaled_dot_product_attention(self, attn: attention_process... method shared_call (line 94) | def shared_call( # pylint: disable=unused-argument method __call__ (line 168) | def __call__(self, attn: attention_processor.Attention, hidden_states,... method __init__ (line 181) | def __init__(self, style_aligned_args: StyleAlignedArgs): function _get_switch_vec (line 192) | def _get_switch_vec(total_num_layers, level): function init_attention_processors (line 209) | def init_attention_processors(pipeline: StableDiffusionXLPipeline, style... function register_shared_norm (line 233) | def register_shared_norm(pipeline: StableDiffusionXLPipeline, class Handler (line 266) | class Handler: method register (line 268) | def register(self, style_aligned_args: StyleAlignedArgs): method remove (line 273) | def remove(self): method __init__ (line 279) | def __init__(self, pipeline: StableDiffusionXLPipeline): FILE: scripts/style_aligned_ext.py class Script (line 14) | class Script(scripts_manager.Script): method title (line 15) | def title(self): method show (line 18) | def show(self, is_img2img): method reset (line 21) | def reset(self): method preset (line 27) | def preset(self, preset): method ui (line 35) | def ui(self, _is_img2img): # ui elements method run (line 61) | def run(self, p: processing.StableDiffusionProcessing, image, prompt, ... method after (line 113) | def after(self, p: processing.StableDiffusionProcessing, *args): # pyl... FILE: scripts/t_gate.py class Script (line 6) | class Script(scripts_manager.Script): method title (line 7) | def title(self): method show (line 10) | def show(self, is_img2img): method ui (line 14) | def ui(self, _is_img2img): method run (line 23) | def run(self, p: processing.StableDiffusionProcessing, enabled, gate_s... FILE: scripts/text2video.py class Script (line 24) | class Script(scripts_manager.Script): method title (line 25) | def title(self): method show (line 28) | def show(self, is_img2img): method ui (line 32) | def ui(self, is_img2img): method run (line 56) | def run(self, p: processing.StableDiffusionProcessing, model_name, use... FILE: scripts/tiling.py function asymmetricConv2DConvForward (line 16) | def asymmetricConv2DConvForward(self, input: Tensor, weight: Tensor, bia... class Script (line 24) | class Script(scripts_manager.Script): method __init__ (line 25) | def __init__(self): method title (line 31) | def title(self): method show (line 34) | def show(self, is_img2img): method ui (line 37) | def ui(self, _is_img2img): # ui elements method run (line 48) | def run(self, p: processing.StableDiffusionProcessing, tilex:bool=Fals... method after (line 76) | def after(self, p: processing.StableDiffusionProcessing, processed: pr... FILE: scripts/xadapter/adapter.py function conv_nd (line 10) | def conv_nd(dims, *args, **kwargs): function avg_pool_nd (line 23) | def avg_pool_nd(dims, *args, **kwargs): function get_parameter_dtype (line 36) | def get_parameter_dtype(parameter: torch.nn.Module): class Downsample (line 58) | class Downsample(nn.Module): method __init__ (line 67) | def __init__(self, channels, use_conv, dims=2, out_channels=None, padd... method forward (line 81) | def forward(self, x): class Upsample (line 86) | class Upsample(nn.Module): method __init__ (line 87) | def __init__(self, channels, use_conv, dims=2, out_channels=None, padd... method forward (line 100) | def forward(self, x, output_size): class Linear (line 105) | class Linear(nn.Module): method __init__ (line 106) | def __init__(self, temb_channels, out_channels): method forward (line 110) | def forward(self, x): class ResnetBlock (line 115) | class ResnetBlock(nn.Module): method __init__ (line 117) | def __init__(self, in_c, out_c, down, up, ksize=3, sk=False, use_conv=... method forward (line 146) | def forward(self, x, output_size=None, temb=None): class Adapter_XL (line 168) | class Adapter_XL(nn.Module): method __init__ (line 170) | def __init__(self, in_channels=[1280, 640, 320], out_channels=[1280, 1... method make_zero_conv (line 252) | def make_zero_conv(self, channels): method dtype (line 257) | def dtype(self) -> torch.dtype: method forward (line 263) | def forward(self, x, t=None): function zero_module (line 304) | def zero_module(module): FILE: scripts/xadapter/pipeline_sd_xl_adapter.py function rescale_noise_cfg (line 68) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLAdapterPipeline (line 82) | class StableDiffusionXLAdapterPipeline(DiffusionPipeline, FromSingleFile... method __init__ (line 121) | def __init__( method enable_vae_slicing (line 171) | def enable_vae_slicing(self): method disable_vae_slicing (line 179) | def disable_vae_slicing(self): method enable_vae_tiling (line 187) | def enable_vae_tiling(self): method disable_vae_tiling (line 196) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 203) | def enable_model_cpu_offload(self, gpu_id=0): method encode_prompt (line 235) | def encode_prompt( method prepare_extra_step_kwargs (line 427) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 444) | def check_inputs( method prepare_latents (line 518) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 535) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method upcast_vae (line 552) | def upcast_vae(self): method __call__ (line 572) | def __call__( method load_lora_weights (line 1038) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method save_lora_weights (line 1070) | def save_lora_weights( method _remove_text_encoder_monkey_patch (line 1103) | def _remove_text_encoder_monkey_patch(self): method _encode_prompt_sd1_5 (line 1107) | def _encode_prompt_sd1_5( method decode_latents_sd1_5 (line 1270) | def decode_latents_sd1_5(self, latents): method check_inputs_sd1_5 (line 1283) | def check_inputs_sd1_5( method prepare_xl_latents_from_sd_1_5 (line 1330) | def prepare_xl_latents_from_sd_1_5( method sd1_5_add_noise (line 1408) | def sd1_5_add_noise(self, init_latents, timestep, generator, device, d... method get_timesteps (line 1421) | def get_timesteps(self, num_inference_steps, strength, device, denoisi... method prepare_latents_sd1_5 (line 1445) | def prepare_latents_sd1_5(self, batch_size, num_channels_latents, heig... FILE: scripts/xadapter/pipeline_sd_xl_adapter_controlnet.py function rescale_noise_cfg (line 75) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLAdapterControlnetPipeline (line 89) | class StableDiffusionXLAdapterControlnetPipeline(DiffusionPipeline, From... method __init__ (line 128) | def __init__( method enable_vae_slicing (line 184) | def enable_vae_slicing(self): method disable_vae_slicing (line 192) | def disable_vae_slicing(self): method enable_vae_tiling (line 200) | def enable_vae_tiling(self): method disable_vae_tiling (line 209) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 216) | def enable_model_cpu_offload(self, gpu_id=0): method encode_prompt (line 249) | def encode_prompt( method prepare_extra_step_kwargs (line 441) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 458) | def check_inputs( method prepare_latents (line 532) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 549) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method upcast_vae (line 566) | def upcast_vae(self): method __call__ (line 586) | def __call__( method load_lora_weights (line 1254) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method save_lora_weights (line 1286) | def save_lora_weights( method _remove_text_encoder_monkey_patch (line 1319) | def _remove_text_encoder_monkey_patch(self): method _encode_prompt_sd1_5 (line 1323) | def _encode_prompt_sd1_5( method decode_latents_sd1_5 (line 1484) | def decode_latents_sd1_5(self, latents): method check_inputs_sd1_5 (line 1497) | def check_inputs_sd1_5( method prepare_latents_sd1_5 (line 1637) | def prepare_latents_sd1_5(self, batch_size, num_channels_latents, heig... method prepare_image (line 1654) | def prepare_image( method check_image (line 1684) | def check_image(self, image, prompt, prompt_embeds): method prepare_xl_latents_from_sd_1_5 (line 1721) | def prepare_xl_latents_from_sd_1_5( method get_timesteps (line 1796) | def get_timesteps(self, num_inference_steps, strength, device, denoisi... method sd1_5_add_noise (line 1820) | def sd1_5_add_noise(self, init_latents, timestep, generator, device, d... FILE: scripts/xadapter/pipeline_sd_xl_adapter_controlnet_img2img.py function rescale_noise_cfg (line 75) | def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class StableDiffusionXLAdapterControlnetI2IPipeline (line 89) | class StableDiffusionXLAdapterControlnetI2IPipeline(DiffusionPipeline, F... method __init__ (line 128) | def __init__( method enable_vae_slicing (line 183) | def enable_vae_slicing(self): method disable_vae_slicing (line 191) | def disable_vae_slicing(self): method enable_vae_tiling (line 199) | def enable_vae_tiling(self): method disable_vae_tiling (line 208) | def disable_vae_tiling(self): method enable_model_cpu_offload (line 215) | def enable_model_cpu_offload(self, gpu_id=0): method encode_prompt (line 248) | def encode_prompt( method prepare_extra_step_kwargs (line 440) | def prepare_extra_step_kwargs(self, generator, eta): method check_inputs (line 457) | def check_inputs( method prepare_latents (line 531) | def prepare_latents(self, batch_size, num_channels_latents, height, wi... method _get_add_time_ids (line 548) | def _get_add_time_ids(self, original_size, crops_coords_top_left, targ... method upcast_vae (line 565) | def upcast_vae(self): method __call__ (line 585) | def __call__( method load_lora_weights (line 1255) | def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Uni... method save_lora_weights (line 1287) | def save_lora_weights( method _remove_text_encoder_monkey_patch (line 1320) | def _remove_text_encoder_monkey_patch(self): method _encode_prompt_sd1_5 (line 1324) | def _encode_prompt_sd1_5( method decode_latents_sd1_5 (line 1487) | def decode_latents_sd1_5(self, latents): method check_inputs_sd1_5 (line 1500) | def check_inputs_sd1_5( method prepare_latents_sd1_5 (line 1656) | def prepare_latents_sd1_5(self, image, timestep, batch_size, num_image... method prepare_image (line 1714) | def prepare_image( method check_image (line 1744) | def check_image(self, image, prompt, prompt_embeds): method prepare_latents_from_noisy_latent (line 1781) | def prepare_latents_from_noisy_latent(self, latent, device, dtype, gen... method prepare_xl_latents_from_sd_1_5 (line 1800) | def prepare_xl_latents_from_sd_1_5( method get_timesteps (line 1877) | def get_timesteps(self, num_inference_steps, strength, device, denoisi... method sd1_5_add_noise (line 1901) | def sd1_5_add_noise(self, init_latents, timestep, generator, device, d... FILE: scripts/xadapter/unet_adapter.py class UNet2DConditionOutput (line 49) | class UNet2DConditionOutput(BaseOutput): class UNet2DConditionModel (line 63) | class UNet2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoade... method __init__ (line 154) | def __init__( method attn_processors (line 578) | def attn_processors(self) -> Dict[str, AttentionProcessor]: method set_attn_processor (line 601) | def set_attn_processor(self, processor: Union[AttentionProcessor, Dict... method set_default_attn_processor (line 635) | def set_default_attn_processor(self): method set_attention_slice (line 641) | def set_attention_slice(self, slice_size): method _set_gradient_checkpointing (line 706) | def _set_gradient_checkpointing(self, module, value=False): method forward (line 710) | def forward( FILE: scripts/xadapter/xadapter_hijacks.py class FourierEmbedder (line 5) | class FourierEmbedder(nn.Module): method __init__ (line 6) | def __init__(self, num_freqs=64, temperature=100): method __call__ (line 16) | def __call__(self, x): class PositionNet (line 21) | class PositionNet(nn.Module): method __init__ (line 22) | def __init__(self, positive_len, out_dim, fourier_freqs=8): method forward (line 43) | def forward(self, boxes, masks, positive_embeddings): FILE: scripts/xadapter_ext.py class Script (line 13) | class Script(scripts_manager.Script): method title (line 14) | def title(self): method show (line 17) | def show(self, is_img2img): method ui (line 20) | def ui(self, _is_img2img): method run (line 36) | def run(self, p: processing.StableDiffusionProcessing, model, sampler,... FILE: scripts/xyz/xyz_grid_classes.py class AxisOption (line 48) | class AxisOption: method __init__ (line 49) | def __init__(self, label, tipe, apply, fmt=format_value_add_label, con... method __repr__ (line 58) | def __repr__(self): class AxisOptionImg2Img (line 62) | class AxisOptionImg2Img(AxisOption): method __init__ (line 63) | def __init__(self, *args, **kwargs): class AxisOptionTxt2Img (line 68) | class AxisOptionTxt2Img(AxisOption): method __init__ (line 69) | def __init__(self, *args, **kwargs): class SharedSettingsStackHelper (line 74) | class SharedSettingsStackHelper(): method __enter__ (line 111) | def __enter__(self): method __exit__ (line 146) | def __exit__(self, exc_type, exc_value, tb): FILE: scripts/xyz/xyz_grid_draw.py function draw_xyz_grid (line 7) | def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, dra... FILE: scripts/xyz/xyz_grid_shared.py function restore_comma (line 12) | def restore_comma(val: str): function apply_field (line 16) | def apply_field(field): function apply_task_arg (line 23) | def apply_task_arg(field): function apply_task_args (line 30) | def apply_task_args(p, x, xs): function apply_processing (line 40) | def apply_processing(p, x, xs): function apply_options (line 51) | def apply_options(p, x, xs): function apply_setting (line 62) | def apply_setting(field): function apply_seed (line 75) | def apply_seed(p, x, xs): function apply_prompt (line 81) | def apply_prompt(positive, negative, p, x, xs): function apply_prompt_primary (line 92) | def apply_prompt_primary(p, x, xs): function apply_prompt_refine (line 98) | def apply_prompt_refine(p, x, xs): function apply_prompt_detailer (line 102) | def apply_prompt_detailer(p, x, xs): function apply_prompt_all (line 106) | def apply_prompt_all(p, x, xs): function apply_order (line 112) | def apply_order(p, x, xs): function apply_sampler (line 129) | def apply_sampler(p, x, xs): function apply_hr_sampler_name (line 138) | def apply_hr_sampler_name(p, x, xs): function confirm_samplers (line 147) | def confirm_samplers(p, xs): function apply_sdnq_quant (line 153) | def apply_sdnq_quant(p, x, xs): function apply_sdnq_quant_te (line 160) | def apply_sdnq_quant_te(p, x, xs): function apply_checkpoint (line 167) | def apply_checkpoint(p, x, xs): function apply_refiner (line 179) | def apply_refiner(p, x, xs): function apply_unet (line 193) | def apply_unet(p, x, xs): function apply_clip_skip (line 204) | def apply_clip_skip(p, x, xs): function find_vae (line 209) | def find_vae(name: str): function apply_vae (line 223) | def apply_vae(p, x, xs): function list_lora (line 228) | def list_lora(): function apply_lora (line 235) | def apply_lora(p, x, xs): function apply_lora_strength (line 245) | def apply_lora_strength(p, x, xs): function apply_te (line 254) | def apply_te(p, x, xs): function apply_guidance (line 260) | def apply_guidance(p, x, xs): function apply_styles (line 267) | def apply_styles(p: processing.StableDiffusionProcessingTxt2Img, x: str,... function apply_upscaler (line 272) | def apply_upscaler(p: processing.StableDiffusionProcessingTxt2Img, opt, x): function apply_context (line 280) | def apply_context(p: processing.StableDiffusionProcessingTxt2Img, opt, x): function apply_detailer (line 286) | def apply_detailer(p, opt, x): function apply_control (line 300) | def apply_control(field): function apply_override (line 359) | def apply_override(field): function format_bool (line 366) | def format_bool(p, opt, x): function format_value_add_label (line 370) | def format_value_add_label(p, opt, x): function format_value (line 376) | def format_value(p, opt, x): function format_value_join_list (line 382) | def format_value_join_list(p, opt, x): function do_nothing (line 386) | def do_nothing(p, x, xs): function format_nothing (line 390) | def format_nothing(p, opt, x): function str_permutations (line 394) | def str_permutations(x): function list_to_csv_string (line 399) | def list_to_csv_string(data_list: list): FILE: scripts/xyz_grid.py class Script (line 24) | class Script(scripts_manager.Script): method title (line 27) | def title(self): method ui (line 30) | def ui(self, is_img2img): method run (line 159) | def run(self, p, FILE: scripts/xyz_grid_on.py class Script (line 25) | class Script(scripts_manager.Script): method show (line 28) | def show(self, is_img2img): method title (line 31) | def title(self): method ui (line 34) | def ui(self, is_img2img): method process (line 167) | def process(self, p, method process_images (line 453) | def process_images(self, p, *args): # pylint: disable=W0221, W0613 FILE: webui.py function initialize (line 74) | def initialize(): function load_model (line 162) | def load_model(): function create_api (line 185) | def create_api(app): function async_policy (line 192) | def async_policy(): function get_external_ip (line 217) | def get_external_ip(): function get_remote_ip (line 228) | def get_remote_ip(): function start_common (line 238) | def start_common(): function mount_subpath (line 261) | def mount_subpath(app): function start_ui (line 273) | def start_ui(): function webui (line 373) | def webui(restart=False):