mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Compare commits
2 Commits
maryhipp/u
...
fix/instal
Author | SHA1 | Date | |
---|---|---|---|
4c37c48b8c | |||
0cfe2ccd9d |
@ -366,7 +366,7 @@ class ImagesDownloaded(BaseModel):
|
||||
)
|
||||
|
||||
|
||||
@images_router.post("/export", operation_id="download_images_from_list", response_model=ImagesDownloaded)
|
||||
@images_router.post("/download", operation_id="download_images_from_list", response_model=ImagesDownloaded)
|
||||
async def download_images_from_list(
|
||||
image_names: list[str] = Body(description="The list of names of images to download", embed=True),
|
||||
board_id: Optional[str] = Body(
|
||||
|
@ -90,6 +90,14 @@ def get_extras():
|
||||
pass
|
||||
return extras
|
||||
|
||||
def get_extra_index() -> str:
|
||||
# parsed_version.local for torch is the platform + version, eg 'cu121' or 'rocm5.6'
|
||||
local = pkg_resources.get_distribution("torch").parsed_version.local
|
||||
if local and 'cu' in local:
|
||||
return "--extra-index-url https://download.pytorch.org/whl/cu121"
|
||||
if local and 'rocm' in local:
|
||||
return "--extra-index-url https://download.pytorch.org/whl/rocm5.6"
|
||||
return ""
|
||||
|
||||
def main():
|
||||
versions = get_versions()
|
||||
@ -122,14 +130,15 @@ def main():
|
||||
branch = Prompt.ask("Enter an InvokeAI branch name")
|
||||
|
||||
extras = get_extras()
|
||||
extra_index_url = get_extra_index()
|
||||
|
||||
print(f":crossed_fingers: Upgrading to [yellow]{tag or release or branch}[/yellow]")
|
||||
if release:
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_SRC}/{release}.zip" --use-pep517 --upgrade'
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_SRC}/{release}.zip" --use-pep517 --upgrade {extra_index_url}'
|
||||
elif tag:
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_TAG}/{tag}.zip" --use-pep517 --upgrade'
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_TAG}/{tag}.zip" --use-pep517 --upgrade {extra_index_url}'
|
||||
else:
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_BRANCH}/{branch}.zip" --use-pep517 --upgrade'
|
||||
cmd = f'pip install "invokeai{extras} @ {INVOKE_AI_BRANCH}/{branch}.zip" --use-pep517 --upgrade {extra_index_url}'
|
||||
print("")
|
||||
print("")
|
||||
if os.system(cmd) == 0:
|
||||
|
@ -1543,7 +1543,7 @@ export const imagesApi = api.injectEndpoints({
|
||||
components['schemas']['Body_download_images_from_list']
|
||||
>({
|
||||
query: ({ image_names, board_id }) => ({
|
||||
url: `images/export`,
|
||||
url: `images/download`,
|
||||
method: 'POST',
|
||||
body: {
|
||||
image_names,
|
||||
|
@ -79,11 +79,11 @@ dependencies = [
|
||||
"semver~=3.0.1",
|
||||
"send2trash",
|
||||
"test-tube~=0.7.5",
|
||||
"torch~=2.1.0",
|
||||
"torch==2.1.0",
|
||||
"torchvision~=0.16",
|
||||
"torchmetrics~=0.11.0",
|
||||
"torchsde~=0.2.5",
|
||||
"transformers~=4.35.0",
|
||||
"transformers==4.35.1",
|
||||
"uvicorn[standard]~=0.21.1",
|
||||
"windows-curses; sys_platform=='win32'",
|
||||
]
|
||||
|
Reference in New Issue
Block a user