Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


def build_launcher():
"""Builds the launcher scripts for Windows."""
if not is_win32_standalone_build:
return

Expand Down
16 changes: 16 additions & 0 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@


def prepare_environment():
"""Prepares the environment for running the application."""
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu121")
torch_command = os.environ.get('TORCH_COMMAND',
f"pip install torch==2.1.0 torchvision==0.16.0 --extra-index-url {torch_index_url}")
Expand Down Expand Up @@ -68,6 +69,10 @@ def prepare_environment():


def ini_args():
"""Initializes the arguments.
Returns:
The arguments.
"""
from args_manager import args
return args

Expand Down Expand Up @@ -101,6 +106,17 @@ def ini_args():


def download_models(default_model, previous_default_models, checkpoint_downloads, embeddings_downloads, lora_downloads, vae_downloads):
"""Downloads the models.
Args:
default_model (str): The default model.
previous_default_models (list): A list of previous default models.
checkpoint_downloads (dict): A dictionary of checkpoint downloads.
embeddings_downloads (dict): A dictionary of embeddings downloads.
lora_downloads (dict): A dictionary of LoRA downloads.
vae_downloads (dict): A dictionary of VAE downloads.
Returns:
A tuple of the default model and the checkpoint downloads.
"""
from modules.util import get_file_from_folder_list

for file_name, url in vae_approx_filenames:
Expand Down
Loading