update defaults and torch notes

This commit is contained in:
Vladimir Mandic
2023-03-06 20:29:10 -05:00
parent a880610f7a
commit 809b793542
7 changed files with 22 additions and 17 deletions
+5 -2
View File
@@ -83,8 +83,11 @@ Start with listen on public IP with authentication enabled
## Install
1. Install `Python`, `Git` and `PyTorch` first
2. Clone and initialize repository
1. Install `Python`, `Git`
2. Install `PyTorch` and `Xformers`
See [Wiki](wiki/Torch%20Optimizations.md) for details
If you don't want to use `xformers`, edit `automatic.sh` as they are enabled by default
3. Clone and initialize repository
> git clone https://github.com/vladmandic/automatic
> cd automatic
+3 -2
View File
@@ -13,8 +13,8 @@ if [ "$PYTHON" == "" ]; then
PYTHON=$(which python)
fi
CMD="launch.py --api --xformers --disable-console-progressbars --gradio-queue --skip-version-check --skip-install --skip-torch-cuda-test --disable-nan-check --theme dark --cors-allow-origins=http://127.0.0.1:7860"
# CMD="launch.py --api --opt-sdp-attention --disable-console-progressbars --gradio-queue --skip-version-check --skip-install --skip-torch-cuda-test --disable-nan-check --theme dark --cors-allow-origins=http://127.0.0.1:7860"
# Note: Some defaults are changed in shared.py
CMD="launch.py --xformers --skip-install --skip-torch-cuda-test --cors-allow-origins=http://127.0.0.1:7860"
MODE=optimized
@@ -154,3 +154,4 @@ exec accelerate launch --no_python --quiet --num_cpu_threads_per_process=6 "$PYT
# export LD_PRELOAD=libtcmalloc.so
# TORCH_CUDA_ARCH_LIST="8.6"
# --opt-channelslast
# --opt-sdp-attention
+3 -2
View File
@@ -44,7 +44,7 @@ options = Map({
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
},
'lora': {
'strength': 1.3,
'strength': 1.0,
},
'hypernetwork': {
'keyword': 'beautiful sexy woman',
@@ -123,7 +123,7 @@ async def models(params):
log.info({ 'model preview created': model, 'image': fn, 'images': len(images), 'grid': [image.width, image.height], 'time': round(t, 2), 'its': round(its, 2) })
opt = await get('/sdapi/v1/options')
if opt['sd_model_checkpoint'] != default:
if opt['sd_model_checkpoint'] != default and not params.fixed:
log.info({ 'model set default': default })
opt['sd_model_checkpoint'] = default
await post('/sdapi/v1/options', opt)
@@ -216,6 +216,7 @@ async def create_previews(params):
if __name__ == '__main__':
parser = argparse.ArgumentParser(description = 'generate model previews')
parser.add_argument('--output', type = str, default = '', required = False, help = 'output directory')
parser.add_argument('--fixed', default = False, action='store_true', help = "do not change model")
parser.add_argument('input', type = str, nargs = '*')
params = parser.parse_args()
asyncio.run(create_previews(params))
+2 -2
View File
@@ -173,11 +173,11 @@
"save_training_settings_to_txt": true,
"save_txt": false,
"sd_checkpoint_cache": 0,
"sd_checkpoint_hash": "cc6cb27103417325ff94f52b7a5d2dde45a7515b25c255d8e396c90014281516",
"sd_checkpoint_hash": "f93e6a50acf7c1b1e6d5ccaf92bae207cb5d2222da3ddc5108df4c928d84255a",
"sd_hypernetwork_strength": 1.0,
"sd_hypernetwork": "None",
"sd_lora": "",
"sd_model_checkpoint": "sd-v15-runwayml.ckpt [cc6cb27103]",
"sd_model_checkpoint": "uberrealisticpornmerge-v13.safetensors [f93e6a50ac]",
"sd_vae_as_default": false,
"sd_vae_checkpoint_cache": 0,
"sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
+7 -7
View File
@@ -70,7 +70,7 @@ parser.add_argument("--sub-quad-chunk-threshold", type=int, help="the percentage
parser.add_argument("--opt-split-attention-invokeai", action='store_true', help="force-enables InvokeAI's cross-attention layer optimization. By default, it's on when cuda is unavailable.")
parser.add_argument("--opt-split-attention-v1", action='store_true', help="enable older version of split attention optimization that does not consume all the VRAM it can find")
parser.add_argument("--disable-opt-split-attention", action='store_true', help="force-disables cross-attention layer optimization")
parser.add_argument("--disable-nan-check", action='store_true', help="do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI")
parser.add_argument("--disable-nan-check", action='store_true', help="do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI", default=True)
parser.add_argument("--use-cpu", nargs='+', help="use CPU as torch device for specified modules", default=[], type=str.lower)
parser.add_argument("--listen", action='store_true', help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests")
parser.add_argument("--port", type=int, help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available", default=None)
@@ -87,13 +87,13 @@ parser.add_argument("--gradio-inpaint-tool", type=str, help="does not do anythin
parser.add_argument("--opt-channelslast", action='store_true', help="change memory type for stable diffusion to channels last")
parser.add_argument("--styles-file", type=str, help="filename to use for styles", default=os.path.join(data_path, 'styles.csv'))
parser.add_argument("--autolaunch", action='store_true', help="open the webui URL in the system's default browser upon launch", default=False)
parser.add_argument("--theme", type=str, help="launches the UI with light or dark theme", default=None)
parser.add_argument("--theme", type=str, help="launches the UI with light or dark theme", default='dark')
parser.add_argument("--use-textbox-seed", action='store_true', help="use textbox for seeds in UI (no up/down, but possible to input long seeds)", default=False)
parser.add_argument("--disable-console-progressbars", action='store_true', help="do not output progressbars to console", default=False)
parser.add_argument("--disable-console-progressbars", action='store_true', help="do not output progressbars to console", default=True)
parser.add_argument("--enable-console-prompts", action='store_true', help="print prompts to console when generating with txt2img and img2img", default=False)
parser.add_argument('--vae-path', type=str, help='Checkpoint to use as VAE; setting this argument disables all settings related to VAE', default=None)
parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=False)
parser.add_argument("--api", action='store_true', help="use api=True to launch the API together with the webui (use --nowebui instead for only the API)")
parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=True)
parser.add_argument("--api", action='store_true', help="use api=True to launch the API together with the webui", default=True)
parser.add_argument("--api-auth", type=str, help='Set authentication for API like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
parser.add_argument("--api-log", action='store_true', help="use api-log=True to enable logging of all API requests")
parser.add_argument("--nowebui", action='store_true', help="use api=True to launch the API instead of the webui")
@@ -105,8 +105,8 @@ parser.add_argument("--cors-allow-origins-regex", type=str, help="Allowed CORS o
parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None)
parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
parser.add_argument("--gradio-queue", action='store_true', help="Uses gradio queue; experimental option; breaks restart UI button")
parser.add_argument("--skip-version-check", action='store_true', help="Do not check versions of torch and xformers")
parser.add_argument("--gradio-queue", action='store_true', help="Uses gradio queue; experimental option; breaks restart UI button", default=True)
parser.add_argument("--skip-version-check", action='store_true', help="Do not check versions of torch and xformers", default=True)
parser.add_argument("--opt-sdp-attention", action='store_true', help="enable scaled dot product cross-attention layer optimization; requires PyTorch 2.*")
parser.add_argument("--no-hashing", action='store_true', help="disable sha256 hashing of checkpoints to help loading performance", default=False)
parser.add_argument("--no-download-sd-model", action='store_true', help="don't download SD1.5 model even if no model is found in --ckpt-dir", default=False)
+1 -1
Submodule wiki updated: 9a67d0d275...611a84f5f5