mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
support for wheel building; webserver broken
This commit is contained in:
parent
fdb16000ab
commit
8973ce7d47
@ -17,6 +17,7 @@ from threading import Event
|
|||||||
from ldm.invoke.args import Args, APP_ID, APP_VERSION, calculate_init_img_hash
|
from ldm.invoke.args import Args, APP_ID, APP_VERSION, calculate_init_img_hash
|
||||||
from ldm.invoke.pngwriter import PngWriter, retrieve_metadata
|
from ldm.invoke.pngwriter import PngWriter, retrieve_metadata
|
||||||
from ldm.invoke.prompt_parser import split_weighted_subprompts
|
from ldm.invoke.prompt_parser import split_weighted_subprompts
|
||||||
|
from ldm.invoke.globals import Globals
|
||||||
|
|
||||||
from backend.modules.parameters import parameters_to_command
|
from backend.modules.parameters import parameters_to_command
|
||||||
|
|
||||||
@ -25,7 +26,6 @@ from backend.modules.parameters import parameters_to_command
|
|||||||
opt = Args()
|
opt = Args()
|
||||||
args = opt.parse_args()
|
args = opt.parse_args()
|
||||||
|
|
||||||
|
|
||||||
class InvokeAIWebServer:
|
class InvokeAIWebServer:
|
||||||
def __init__(self, generate, gfpgan, codeformer, esrgan) -> None:
|
def __init__(self, generate, gfpgan, codeformer, esrgan) -> None:
|
||||||
self.host = args.host
|
self.host = args.host
|
||||||
@ -74,6 +74,8 @@ class InvokeAIWebServer:
|
|||||||
return {"message": "Server Running"}
|
return {"message": "Server Running"}
|
||||||
|
|
||||||
# Outputs Route
|
# Outputs Route
|
||||||
|
if not os.path.isabs(args.outdir):
|
||||||
|
args.outdir=os.path.join(Globals.root,args.outdir)
|
||||||
self.app.config["OUTPUTS_FOLDER"] = os.path.abspath(args.outdir)
|
self.app.config["OUTPUTS_FOLDER"] = os.path.abspath(args.outdir)
|
||||||
|
|
||||||
@self.app.route("/outputs/<path:file_path>")
|
@self.app.route("/outputs/<path:file_path>")
|
||||||
|
501
frontend/dist/assets/index.8eb7dfe4.js
vendored
501
frontend/dist/assets/index.8eb7dfe4.js
vendored
File diff suppressed because one or more lines are too long
32
setup.py
32
setup.py
@ -1,22 +1,16 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from setuptools.command.develop import develop
|
import os
|
||||||
from setuptools.command.install import install
|
|
||||||
|
|
||||||
class PostDevelopCommand(develop):
|
def frontend_files(directory):
|
||||||
"""Post-installation for development mode."""
|
paths = []
|
||||||
def run(self):
|
for (path, directories, filenames) in os.walk(directory):
|
||||||
develop.run(self)
|
for filename in filenames:
|
||||||
print('Will now try loading a module (develop)')
|
paths.append(os.path.join(path, filename))
|
||||||
import ldm.generate
|
return paths
|
||||||
print('ldm.generate loaded ok')
|
|
||||||
|
frontend_files = frontend_files('frontend/dist')
|
||||||
|
print(f'DEBUG: {frontend_files}')
|
||||||
|
|
||||||
class PostInstallCommand(install):
|
|
||||||
"""Post-installation for installation mode."""
|
|
||||||
def run(self):
|
|
||||||
install.run(self)
|
|
||||||
print('Will now try loading a module (install)')
|
|
||||||
import ldm.generate
|
|
||||||
print('ldm.generate loaded ok')
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='invoke-ai',
|
name='invoke-ai',
|
||||||
@ -28,9 +22,7 @@ setup(
|
|||||||
'numpy',
|
'numpy',
|
||||||
'tqdm',
|
'tqdm',
|
||||||
],
|
],
|
||||||
cmdclass={
|
scripts = ['scripts/invoke.py','scripts/load_models.py','scripts/sd-metadata.py'],
|
||||||
'develop': PostDevelopCommand,
|
data_files=[('frontend',frontend_files)],
|
||||||
'install': PostInstallCommand,
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user