Add command line arguments to readme (#933)

* relative path is relative to webui

* docs

* change default path back to webui/models

* for now, revert model path change
pull/793/head
ljleb 2023-04-20 11:26:38 -04:00 committed by GitHub
parent 4d95eb9ea7
commit 3ff63befce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -164,6 +164,16 @@ To use the API: start WebUI with argument `--api` and go to `http://webui-addres
To use external call: Checkout [Wiki](https://github.com/Mikubill/sd-webui-controlnet/wiki/API)
### Command Line Arguments
This extension adds these command line arguments to the webui:
```
--controlnet-dir <path to directory with controlnet models> ADD a controlnet models directory
--controlnet-annotator-models-path <path to directory with annotator model directories> SET the directory for annotator models
--no-half-controlnet load controlnet models in full precision
```
### MacOS Support
Tested with pytorch nightly: https://github.com/Mikubill/sd-webui-controlnet/pull/143#issuecomment-1435058285

View File

@ -7,6 +7,9 @@ if not models_path:
if not models_path:
models_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'downloads')
if not os.path.isabs(models_path):
models_path = os.path.join(shared.data_path, models_path)
clip_vision_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'clip_vision')
# clip vision is always inside controlnet "extensions\sd-webui-controlnet"
# and any problem can be solved by removing controlnet and reinstall

View File

@ -12,9 +12,9 @@ import gradio as gr
import numpy as np
from einops import rearrange
import annotator
from annotator import annotator_path
from scripts import global_state, hook, external_code, processor
importlib.reload(annotator)
importlib.reload(annotator_path)
importlib.reload(processor)
importlib.reload(global_state)
importlib.reload(hook)