Compare commits

...

5 Commits

Author SHA1 Message Date
psychedelicious
4c37c48b8c fix(installer): use extra index url when updating
If we don't include this, on updating, we will always get the CPU torch/torchvision/xformers.
2023-11-15 20:43:11 +11:00
psychedelicious
0cfe2ccd9d fix: pin torch and torchvision exactly
When upgrading the app with `--extra-index-url`, torch is updated to 2.1.1, which is not an official release.

This breaks all sorts of stuff. Pin the versions exactly to avoid this.

Also pin transformers exactly while we are here.
2023-11-15 20:39:57 +11:00
Millun Atluri
b6f356f067 Change stylecheck name from "black" to "ruff" (#5090)
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [X] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission


## Have you discussed this change with the InvokeAI team?
- [ ] Yes
- [X] No, because: it is trivial

      
## Have you updated all relevant documentation?
- [ ] Yes
- [X] No


## Description

After the switch to the "ruff" linter, I noticed that the stylecheck
workflow is still described as "black" in the action logs. This small PR
should fix the issue.
2023-11-15 08:29:41 +11:00
Lincoln Stein
a4f1db7c02 change stylecheck name from "black" to "ruff" 2023-11-14 11:06:10 -05:00
psychedelicious
21206bafcf chore: bump pydantic and fastapi
No breaking changes for us.

Pydantic is working on its own faster JSON parser, `jiter`, and 2.5.0 starts bringing this in. See https://github.com/pydantic/jiter

There are a number of other bugfixes and minor changes in this version of pydantic.

The FastAPI update is mostly internal but let's stay up to date.
2023-11-14 14:34:14 +11:00
3 changed files with 17 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ on:
branches: main
jobs:
black:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

View File

@@ -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:

View File

@@ -46,7 +46,7 @@ dependencies = [
"easing-functions",
"einops",
"facexlib",
"fastapi~=0.103.2",
"fastapi~=0.104.1",
"fastapi-events~=0.9.1",
"huggingface-hub~=0.16.4",
"imohash",
@@ -59,7 +59,7 @@ dependencies = [
"onnx",
"onnxruntime",
"opencv-python",
"pydantic~=2.4.2",
"pydantic~=2.5.0",
"pydantic-settings~=2.0.3",
"picklescan",
"pillow",
@@ -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'",
]