diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-03-11 12:27:42 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-03-11 12:27:42 +0000 |
commit | ce68ab8d0dfdd25e820c58dbc9d3b0148a2022a4 (patch) | |
tree | c56a08c3a94499a0f2d5789f1f740fa18a43b34f /modules/ui_extra_networks.py | |
parent | c239b3d7a86452bd7cf6b081bd0e02b0fa12dcaf (diff) | |
download | stable-diffusion-webui-gfx803-ce68ab8d0dfdd25e820c58dbc9d3b0148a2022a4.tar.gz stable-diffusion-webui-gfx803-ce68ab8d0dfdd25e820c58dbc9d3b0148a2022a4.tar.bz2 stable-diffusion-webui-gfx803-ce68ab8d0dfdd25e820c58dbc9d3b0148a2022a4.zip |
remove underscores from function names in #8366
remove LRU from #8366 because I don't know why it's there
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index cd61a569..21c52287 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -1,9 +1,7 @@ import glob
import os.path
import urllib.parse
-from functools import lru_cache
from pathlib import Path
-from typing import Optional
from modules import shared
import gradio as gr
@@ -140,17 +138,17 @@ class ExtraNetworksPage: return self.card_page.format(**args)
- def _find_preview(self, path: str) -> Optional[str]:
+ def find_preview(self, path):
"""
Find a preview PNG for a given path (without extension) and call link_preview on it.
"""
for file in [path + ".png", path + ".preview.png"]:
if os.path.isfile(file):
return self.link_preview(file)
+
return None
- @lru_cache(maxsize=512)
- def _find_description(self, path: str) -> Optional[str]:
+ def find_description(self, path):
"""
Find and read a description file for a given path (without extension).
"""
|