change initfile to ~/.invokeai

- adjust documentation
- also fix 'clipseg_models' to 'clipseg', which seems to be working now
This commit is contained in:
Lincoln Stein 2022-11-08 03:26:16 +00:00
parent 1fe41146f0
commit 636620b1d5
6 changed files with 13 additions and 10 deletions

View File

@ -123,13 +123,13 @@ overridden on a per-prompt basis (see
You can either double your slashes (ick): `C:\\path\\to\\my\\file`, or You can either double your slashes (ick): `C:\\path\\to\\my\\file`, or
use Linux/Mac style forward slashes (better): `C:/path/to/my/file`. use Linux/Mac style forward slashes (better): `C:/path/to/my/file`.
## invokeai.init initialization file ## The .invokeai initialization file
Place your preferred startup options in a file named `invokeai.init` To start up invoke.py with your preferred settings, place your desired
to have them load automatically at startup time. The file should contain the startup startup options in a file in your home directory named `.invokeai` The
options as you would type them on the command line (`--steps=10 file should contain the startup options as you would type them on the
--grid`), one argument per line, or a mixture of both using any of command line (`--steps=10 --grid`), one argument per line, or a
the accepted command switch formats: mixture of both using any of the accepted command switch formats:
!!! example "" !!! example ""

View File

@ -36,7 +36,7 @@ dependencies:
- eventlet - eventlet
- getpass_asterisk - getpass_asterisk
- kornia==0.6.0 - kornia==0.6.0
- -e git+https://github.com/openai/CLIP.git@main#egg=clip - git+https://github.com/openai/CLIP.git@main#egg=clip
- -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers - -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- -e git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion - -e git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
- -e git+https://github.com/invoke-ai/Real-ESRGAN.git#egg=realesrgan - -e git+https://github.com/invoke-ai/Real-ESRGAN.git#egg=realesrgan

View File

@ -116,7 +116,7 @@ PRECISION_CHOICES = [
# is there a way to pick this up during git commits? # is there a way to pick this up during git commits?
APP_ID = 'invoke-ai/InvokeAI' APP_ID = 'invoke-ai/InvokeAI'
APP_VERSION = 'v2.1.2' APP_VERSION = 'v2.1.2'
INITFILE = 'invokeai.init' INITFILE = os.path.expanduser('~/.invokeai')
class ArgFormatter(argparse.RawTextHelpFormatter): class ArgFormatter(argparse.RawTextHelpFormatter):
# use defined argument order to display usage # use defined argument order to display usage
@ -170,7 +170,10 @@ class Args(object):
try: try:
sysargs = sys.argv[1:] sysargs = sys.argv[1:]
if os.path.exists(INITFILE): if os.path.exists(INITFILE):
print(f'>> Initialization file {INITFILE} found. Loading...')
sysargs.insert(0,f'@{INITFILE}') sysargs.insert(0,f'@{INITFILE}')
else:
print(f'>> Initialization file {INITFILE} not found. Applying default settings...')
self._arg_switches = self._arg_parser.parse_args(sysargs) self._arg_switches = self._arg_parser.parse_args(sysargs)
return self._arg_switches return self._arg_switches
except Exception as e: except Exception as e:

View File

@ -29,7 +29,7 @@ work fine.
import torch import torch
import numpy as np import numpy as np
from clipseg_models.clipseg import CLIPDensePredT from clipseg.clipseg import CLIPDensePredT
from einops import rearrange, repeat from einops import rearrange, repeat
from PIL import Image, ImageOps from PIL import Image, ImageOps
from torchvision import transforms from torchvision import transforms

0
scripts/invoke.py Normal file → Executable file
View File

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='invoke-ai', name='invoke-ai',
version='2.0.2', version='2.1.3',
description='', description='',
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[