mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
adjust non-app modules to use new config system
This commit is contained in:
@ -17,7 +17,7 @@ from .api.dependencies import ApiDependencies
|
||||
from .api.routers import images, sessions, models
|
||||
from .api.sockets import SocketIO
|
||||
from .invocations.baseinvocation import BaseInvocation
|
||||
from .services.config import InvokeAIWebConfig
|
||||
from .services.config import InvokeAIWebConfig, get_invokeai_config
|
||||
|
||||
# Create the app
|
||||
# TODO: create this all in a method so configuration/etc. can be passed in?
|
||||
@ -133,7 +133,7 @@ def invoke_api():
|
||||
# parse command-line settings, environment and the init file
|
||||
# (this is a module global)
|
||||
global web_config
|
||||
web_config = InvokeAIWebConfig()
|
||||
web_config = get_invokeai_config(InvokeAIWebConfig)
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=web_config.allow_origins,
|
||||
|
Reference in New Issue
Block a user