mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
2433cc344a
* add test-invoke-pip.yml * update requirements-base.txt to fix tests * install requirements-base.txt separate since it requires to have torch already installed also restore origin requirements-base.txt after suc. test in my fork * restore origin requirements add `basicsr>=1.4.2` to requirements-base.txt remove second installation step * re-add previously overseen req in lin-cuda * fix typo in setup.py - `scripts/preload_models.py` * use GFBGAN from branch `basicsr-1.4.2` * remove `basicsr>=1.4.2` from base reqs * add INVOKEAI_ROOT to env * disable upgrade of `pip`, `setuptools` and `wheel` * try to use a venv which should not contain `wheel` * add relative path to pip command * use `configure_invokeai.py --no-interactive --yes` * set grpcio to `<1.51.0` * revert changes to use venv * remove `--prefer-binary` * disable step to create models.yaml since this will not be used anymore with new `configure_invokeai.py` * use `pip install --no-binary=":all:"` * another try to use venv * try uninstalling wheel before installing reqs * dont use requirements.txt as filename * update cache-dependency-path * add facexlib to requirements-base.txt * first install requirements-base.txt * first install `-e .`, then install requirements I know that this is obviously the wrong order, but still have a feeling * add facexlib to requirements.in * remove `-e .` from reqs and install after reqs * unpin torch and torchvision in requirements.in * fix model dl path * fix curl output path * create directory before downloading model * set INVOKEAI_ROOT_PATH https://docs.github.com/en/actions/learn-github-actions/environment-variables#naming-conventions-for-environment-variables * INVOKEAI_ROOT ${{ env.GITHUB_WORKSPACE }}/invokeai * fix matrix stable-diffusion-model-dl-path * fix INVOKEAI_ROOT * fix INVOKEAI_ROOT * add --root and --outdir to run-tests step * create models.yaml from example * fix scripts variable in setup.py by removing unused scripts * fix archive-results path * fix workflow to reflect latest code changes * fix copy paste error * fix job name * fix matrix.stable-diffusion-model * restructure matrix * fix `activate conda env` step * update the environment yamls use same 4 git packages as for pip * rename job in test-invoke-conda * add tqdm to environment-lin-amd.yml * fix python commands in test-invoke-conda.yml Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
77 lines
2.8 KiB
Python
77 lines
2.8 KiB
Python
import os
|
|
import re
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
def frontend_files(directory):
|
|
paths = []
|
|
for (path, directories, filenames) in os.walk(directory):
|
|
for filename in filenames:
|
|
paths.append(os.path.join(path, filename))
|
|
return paths
|
|
|
|
|
|
def _get_requirements(path):
|
|
try:
|
|
with open(path) as f:
|
|
packages = f.read().splitlines()
|
|
except (IOError, OSError) as ex:
|
|
raise RuntimeError("Can't open file with requirements: %s", repr(ex))
|
|
|
|
# Drop option lines
|
|
packages = [package for package in packages if not re.match(r"^--", package)]
|
|
packages = [package for package in packages if not re.match(r"^http", package)]
|
|
return packages
|
|
|
|
|
|
frontend_files = frontend_files('frontend/dist')
|
|
print(f'DEBUG: {frontend_files}')
|
|
|
|
VERSION = '2.1.4'
|
|
DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features'
|
|
' and options to aid the image generation process')
|
|
LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an'
|
|
' interactive command-line script that combines text2img and img2img'
|
|
' functionality in a "dream bot" style interface, and multiple features'
|
|
' and other enhancements.')
|
|
HOMEPAGE = 'https://github.com/invoke-ai/InvokeAI'
|
|
|
|
setup(
|
|
name='InvokeAI',
|
|
version=VERSION,
|
|
description=DESCRIPTION,
|
|
long_description=LONG_DESCRIPTION,
|
|
author='The InvokeAI Project',
|
|
author_email='lincoln.stein@gmail.com',
|
|
url=HOMEPAGE,
|
|
license='MIT',
|
|
packages=find_packages(exclude=['tests.*']),
|
|
install_requires=_get_requirements('installer/requirements.in'),
|
|
python_requires='>=3.8, <4',
|
|
classifiers=[
|
|
'Development Status :: 4 - Beta',
|
|
'Environment :: GPU',
|
|
'Environment :: GPU :: NVIDIA CUDA',
|
|
'Environment :: MacOS X',
|
|
'Intended Audience :: End Users/Desktop',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Operating System :: POSIX :: Linux',
|
|
'Operating System :: MacOS',
|
|
'Operating System :: Microsoft :: Windows',
|
|
'Programming Language :: Python :: 3 :: Only,'
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: 3.9',
|
|
'Programming Language :: Python :: 3.10',
|
|
'Topic :: Artistic Software',
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
|
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
|
|
'Topic :: Multimedia :: Graphics',
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
'Topic :: Scientific/Engineering :: Image Processing',
|
|
],
|
|
scripts = ['scripts/invoke.py','scripts/configure_invokeai.py', 'scripts/sd-metadata.py'],
|
|
data_files=[('frontend',frontend_files)],
|
|
)
|
|
|