mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
misc small fixes requested by Ryan
This commit is contained in:
@ -482,7 +482,7 @@ async def control_download_jobs(
|
|||||||
job_mgr.change_job_priority(job_id, priority_delta)
|
job_mgr.change_job_priority(job_id, priority_delta)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown operation {operation.value}")
|
raise ValueError("priority_delta must be set for the CHANGE_PRIORITY operation")
|
||||||
bytes = 0
|
bytes = 0
|
||||||
total_bytes = 0
|
total_bytes = 0
|
||||||
if isinstance(job, DownloadJobRemoteSource):
|
if isinstance(job, DownloadJobRemoteSource):
|
||||||
|
@ -201,6 +201,10 @@ app.mount("/", StaticFiles(directory=Path(web_dir.__path__[0], "dist"), html=Tru
|
|||||||
|
|
||||||
|
|
||||||
def invoke_api():
|
def invoke_api():
|
||||||
|
if app_config.version:
|
||||||
|
print(f"InvokeAI version {__version__}")
|
||||||
|
return
|
||||||
|
|
||||||
def find_port(port: int):
|
def find_port(port: int):
|
||||||
"""Find a port not in use starting at given port"""
|
"""Find a port not in use starting at given port"""
|
||||||
# Taken from https://waylonwalker.com/python-find-available-port/, thanks Waylon!
|
# Taken from https://waylonwalker.com/python-find-available-port/, thanks Waylon!
|
||||||
@ -213,10 +217,6 @@ def invoke_api():
|
|||||||
|
|
||||||
from invokeai.backend.install.check_root import check_invokeai_root
|
from invokeai.backend.install.check_root import check_invokeai_root
|
||||||
|
|
||||||
if app_config.version:
|
|
||||||
print(f"InvokeAI version {__version__}")
|
|
||||||
return
|
|
||||||
|
|
||||||
check_invokeai_root(app_config) # note, may exit with an exception if root not set up
|
check_invokeai_root(app_config) # note, may exit with an exception if root not set up
|
||||||
|
|
||||||
if app_config.dev_reload:
|
if app_config.dev_reload:
|
||||||
@ -256,7 +256,4 @@ def invoke_api():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if app_config.version:
|
invoke_api()
|
||||||
print(f"InvokeAI version {__version__}")
|
|
||||||
else:
|
|
||||||
invoke_api()
|
|
||||||
|
Reference in New Issue
Block a user