invoke-ai / invoke-training

https://invoke-ai.github.io/invoke-training/
Apache License 2.0
110 stars 14 forks source link

Model Merge depends on InvokeAI #146

Open iwr-redmond opened 3 months ago

iwr-redmond commented 3 months ago

src/invoke_training/model_merge/scripts/merge_lora_into_model.py L10:

# HACK(ryand): Import order matters, because invokeai contains circular imports.
from invokeai.backend.model_manager import BaseModelType
from invokeai.backend.lora import LoRAModelRaw
from invokeai.backend.model_patcher import ModelPatcher

But the documentation draft (docs/get-started/installation.md) says:

Create and activate a python virtual environment. This creates an isolated environment for invoke-training and its dependencies that won't interfere with other python environments on your system, including any installations of InvokeAI.

And presently invokeai is not listed in pyproject.toml as a dependency.

RyanJDick commented 3 months ago

invokeai is listed in pyproject.toml: https://github.com/invoke-ai/invoke-training/blob/e4c2fc8bdbdc2115e8f3cf8d19b7a38cec610b0a/pyproject.toml#L24

I want to get rid of this dependency at some point. It doesn't make sense to install all of invokeai just for the few files that we want. But, for now, it should work as-is.