mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
rename test/nodes to test/aa_nodes to ensure these tests run first
This commit is contained in:
parent
8aefe2cefe
commit
dc5c452ef9
@ -35,7 +35,7 @@ class ModelInstallJob(BaseModel):
|
|||||||
inplace: bool = Field(default=False, description="Leave model in its current location; otherwise install under models directory")
|
inplace: bool = Field(default=False, description="Leave model in its current location; otherwise install under models directory")
|
||||||
source: ModelSource = Field(description="Source (URL, repo_id, or local path) of model")
|
source: ModelSource = Field(description="Source (URL, repo_id, or local path) of model")
|
||||||
local_path: Path = Field(description="Path to locally-downloaded model; may be the same as the source")
|
local_path: Path = Field(description="Path to locally-downloaded model; may be the same as the source")
|
||||||
key: Optional[str] = Field(default=None, description="After model is installed, this is its config record key")
|
key: str = Field(default="<NO KEY>", description="After model is installed, this is its config record key")
|
||||||
error_type: str = Field(default="", description="Class name of the exception that led to status==ERROR")
|
error_type: str = Field(default="", description="Class name of the exception that led to status==ERROR")
|
||||||
error: str = Field(default="", description="Error traceback") # noqa #501
|
error: str = Field(default="", description="Error traceback") # noqa #501
|
||||||
|
|
||||||
|
@ -178,14 +178,15 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
self._install_queue.put(job)
|
self._install_queue.put(job)
|
||||||
return job
|
return job
|
||||||
|
|
||||||
else: # waiting for download queue implementation
|
else: # here is where we'd download a URL or repo_id. Implementation pending download queue.
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def list_jobs(self, source: Optional[ModelSource]=None) -> List[ModelInstallJob]: # noqa D102
|
def list_jobs(self, source: Optional[ModelSource]=None) -> List[ModelInstallJob]: # noqa D102
|
||||||
jobs = self._install_jobs
|
jobs = self._install_jobs
|
||||||
if not source:
|
if not source:
|
||||||
return jobs.values()
|
return list(jobs.values())
|
||||||
else:
|
else:
|
||||||
|
source = str(source)
|
||||||
return [jobs[x] for x in jobs if source in str(x)]
|
return [jobs[x] for x in jobs if source in str(x)]
|
||||||
|
|
||||||
def get_job(self, source: ModelSource) -> ModelInstallJob: # noqa D102
|
def get_job(self, source: ModelSource) -> ModelInstallJob: # noqa D102
|
||||||
|
@ -69,6 +69,7 @@ def mock_services() -> InvocationServices:
|
|||||||
logger=logging, # type: ignore
|
logger=logging, # type: ignore
|
||||||
model_manager=None, # type: ignore
|
model_manager=None, # type: ignore
|
||||||
model_records=None, # type: ignore
|
model_records=None, # type: ignore
|
||||||
|
model_install=None, # type: ignore
|
||||||
names=None, # type: ignore
|
names=None, # type: ignore
|
||||||
performance_statistics=InvocationStatsService(),
|
performance_statistics=InvocationStatsService(),
|
||||||
processor=DefaultInvocationProcessor(),
|
processor=DefaultInvocationProcessor(),
|
@ -74,6 +74,7 @@ def mock_services() -> InvocationServices:
|
|||||||
logger=logging, # type: ignore
|
logger=logging, # type: ignore
|
||||||
model_manager=None, # type: ignore
|
model_manager=None, # type: ignore
|
||||||
model_records=None, # type: ignore
|
model_records=None, # type: ignore
|
||||||
|
model_install=None, # type: ignore
|
||||||
names=None, # type: ignore
|
names=None, # type: ignore
|
||||||
performance_statistics=InvocationStatsService(),
|
performance_statistics=InvocationStatsService(),
|
||||||
processor=DefaultInvocationProcessor(),
|
processor=DefaultInvocationProcessor(),
|
@ -12,7 +12,7 @@ from invokeai.app.services.session_queue.session_queue_common import (
|
|||||||
prepare_values_to_insert,
|
prepare_values_to_insert,
|
||||||
)
|
)
|
||||||
from invokeai.app.services.shared.graph import Graph, GraphExecutionState, GraphInvocation
|
from invokeai.app.services.shared.graph import Graph, GraphExecutionState, GraphInvocation
|
||||||
from tests.nodes.test_nodes import PromptTestInvocation
|
from tests.aa_nodes.test_nodes import PromptTestInvocation
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
Loading…
Reference in New Issue
Block a user