mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-03-04 13:04:53 +08:00
Updated Developing extensions (markdown)
parent
5f89ad7ade
commit
31d46a94c9
@ -9,6 +9,12 @@ Web ui interacts with installed extensions in the following way:
|
|||||||
- extension's javascript files in the `javascript` directory are added to the page
|
- extension's javascript files in the `javascript` directory are added to the page
|
||||||
- extension's localization files in the `localizations` directory are added to settings; if there are two localizations with same name, they are not merged, one replaces another.
|
- extension's localization files in the `localizations` directory are added to settings; if there are two localizations with same name, they are not merged, one replaces another.
|
||||||
- extension's `style.css` file is added to the page
|
- extension's `style.css` file is added to the page
|
||||||
|
- if extension has `preload.py` file in its root directory, it is loaded before parsing commandline args
|
||||||
|
- if extension's `preload.py` has a preload function, it is called, and commandline args parser is passed to it as an argument. Here's an example of how to use it to add a command line argument:
|
||||||
|
```python
|
||||||
|
def preload(parser):
|
||||||
|
parser.add_argument("--wildcards-dir", type=str, help="directory with wildcards", default=None)
|
||||||
|
```
|
||||||
|
|
||||||
For how to develop custom scripts, which usually will do most of extension's work, see [Developing custom scripts](Developing-custom-scripts).
|
For how to develop custom scripts, which usually will do most of extension's work, see [Developing custom scripts](Developing-custom-scripts).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user