From 522ff4a042007e1710645d3ad2cc6010f7704104 Mon Sep 17 00:00:00 2001 From: Brandon Rising Date: Tue, 30 Jan 2024 22:25:23 -0500 Subject: [PATCH] civit -> civitai --- invokeai/app/services/config/config_default.py | 2 +- invokeai/backend/install/model_install_backend.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/invokeai/app/services/config/config_default.py b/invokeai/app/services/config/config_default.py index 510e60d7bc..65af5bc1c4 100644 --- a/invokeai/app/services/config/config_default.py +++ b/invokeai/app/services/config/config_default.py @@ -285,7 +285,7 @@ class InvokeAIAppConfig(InvokeAISettings): node_cache_size : int = Field(default=512, description="How many cached nodes to keep in memory", json_schema_extra=Categories.Nodes) # MODEL IMPORT - civit_api_key : Optional[str] = Field(default=os.environ.get("CIVIT_API_KEY"), description="API key for Civit", json_schema_extra=Categories.Other) + civitai_api_key : Optional[str] = Field(default=os.environ.get("CIVITAI_API_KEY"), description="API key for CivitAI", json_schema_extra=Categories.Other) # DEPRECATED FIELDS - STILL HERE IN ORDER TO OBTAN VALUES FROM PRE-3.1 CONFIG FILES always_use_cpu : bool = Field(default=False, description="If true, use the CPU for rendering even if a GPU is available.", json_schema_extra=Categories.MemoryPerformance) diff --git a/invokeai/backend/install/model_install_backend.py b/invokeai/backend/install/model_install_backend.py index 5d7c39beb9..601f83fc6f 100644 --- a/invokeai/backend/install/model_install_backend.py +++ b/invokeai/backend/install/model_install_backend.py @@ -104,14 +104,14 @@ class ModelInstall(object): prediction_type_helper: Optional[Callable[[Path], SchedulerPredictionType]] = None, model_manager: Optional[ModelManager] = None, access_token: Optional[str] = None, - civit_api_key: Optional[str] = None, + civitai_api_key: Optional[str] = None, ): self.config = config self.mgr = model_manager or ModelManager(config.model_conf_path) self.datasets = OmegaConf.load(Dataset_path) self.prediction_helper = prediction_type_helper self.access_token = access_token or HfFolder.get_token() - self.civit_api_key = civit_api_key or config.civit_api_key + self.civitai_api_key = civitai_api_key or config.civitai_api_key self.reverse_paths = self._reverse_paths(self.datasets) def all_models(self) -> Dict[str, ModelLoadInfo]: @@ -330,7 +330,7 @@ class ModelInstall(object): with TemporaryDirectory(dir=self.config.models_path) as staging: CIVITAI_RE = r".*civitai.com.*" civit_url = re.match(CIVITAI_RE, url, re.IGNORECASE) - location = download_with_resume(url, Path(staging), access_token=self.civit_api_key if civit_url else None) + location = download_with_resume(url, Path(staging), access_token=self.civitai_api_key if civit_url else None) if not location: logger.error(f"Unable to download {url}. Skipping.") info = ModelProbe().heuristic_probe(location, self.prediction_helper)