Skip to content

Commit

Permalink
Fix missing macos requirements file
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaltais committed Mar 26, 2023
1 parent c38c018 commit b6332ce
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
venv
__pycache__
*.txt
cudnn_windows
.vscode
*.egg-info
Expand All @@ -9,4 +8,4 @@ wd14_tagger_model
.DS_Store
locon
gui-user.bat
gui-user.ps1
gui-user.ps1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ When a new release comes out, you can upgrade your repo with the following comma
upgrade_macos.sh
```

Once the commands have completed successfully you should be ready to use the new version.
Once the commands have completed successfully you should be ready to use the new version. MacOS support is not tested and has been mostly taken from https://gist.github.com/jstayco/9f5733f05b9dc29de95c4056a023d645

## Upgrading Windows

Expand Down
13 changes: 13 additions & 0 deletions examples/lucoris extract examples.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
python tools\lycoris_locon_extract.py --mode quantile --safetensors --linear_ratio 0.9 --conv_ratio 0.9 --device cuda D:/models/v1-5-pruned.ckpt D:/models/cyberrealistic_v12.safetensors "D:/lora/sd1.5/cyberrealistic_v12.safetensors"

python tools\lycoris_locon_extract.py --mode quantile --safetensors --linear_quantile 0.75 --conv_quantile 0.75 --device cuda D:/models/v1-5-pruned.ckpt "C:\Users\berna\Downloads\deliberate_v2.safetensors" "D:/lora/sd1.5/deliberate_v2.safetensors"

python tools\lycoris_locon_extract.py --mode fixed --safetensors --linear_dim 512 --conv_dim 512 --device cuda D:/models/v1-5-pruned.ckpt D:/models/cyberrealistic_v12.safetensors "D:/lora/sd1.5/cyberrealistic_v12.safetensors"

python tools\lycoris_locon_extract.py --use_sparse_bias --sparsity 0.98 --mode quantile --safetensors --linear_quantile 0.75 --conv_quantile 0.75 --device cuda D:/models/v1-5-pruned.ckpt "C:\Users\berna\Downloads\deliberate_v2.safetensors" "D:/lora/sd1.5/deliberate_v2.safetensors"

python tools\lycoris_locon_extract.py --use_sparse_bias --sparsity 0.98 --mode quantile --safetensors --linear_quantile 0.75 --conv_quantile 0.75 --device cuda D:/models/v1-5-pruned.ckpt "D:/models/test\claire_v1.0ee2-000003.safetensors" "D:/lora/sd1.5/claire_v1.0ee2-000003.safetensors"

python tools\lycoris_locon_extract.py --use_sparse_bias --sparsity 0.98 --mode quantile --safetensors --linear_quantile 0.5 --conv_quantile 0.5 --device cuda D:/models/v1-5-pruned.ckpt "D:/models/test\claire_v1.0ee2-000003.safetensors" "D:/lora/sd1.5/claire_v1.0ee2-0.5.safetensors"

python tools\lycoris_locon_extract.py --use_sparse_bias --sparsity 0.98 --mode quantile --safetensors --linear_quantile 0.5 --conv_quantile 0.5 --device cuda D:/models/v1-5-pruned.ckpt "D:/models/test\claire_v1.0f.safetensors" "D:/lora/sd1.5/claire_v1.0f0.5.safetensors"
12 changes: 7 additions & 5 deletions library/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# define a list of substrings to search for
ALL_PRESET_MODELS = V2_BASE_MODELS + V_PARAMETERIZATION_MODELS + V1_MODELS

FILE_ENV_EXCLUSION = ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']


def check_if_model_exist(output_name, output_dir, save_model_as):
if save_model_as in ['diffusers', 'diffusers_safetendors']:
Expand Down Expand Up @@ -118,7 +120,7 @@ def get_dir_and_file(file_path):
def get_file_path(
file_path='', default_extension='.json', extension_name='Config files'
):
if not any(var in os.environ for var in ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']):
if not any(var in os.environ for var in FILE_ENV_EXCLUSION):
current_file_path = file_path
# print(f'current file path: {current_file_path}')

Expand Down Expand Up @@ -153,7 +155,7 @@ def get_file_path(


def get_any_file_path(file_path=''):
if not any(var in os.environ for var in ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']):
if not any(var in os.environ for var in FILE_ENV_EXCLUSION):
current_file_path = file_path
# print(f'current file path: {current_file_path}')

Expand Down Expand Up @@ -195,7 +197,7 @@ def remove_doublequote(file_path):


def get_folder_path(folder_path=''):
if not any(var in os.environ for var in ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']):
if not any(var in os.environ for var in FILE_ENV_EXCLUSION):
current_folder_path = folder_path

initial_dir, initial_file = get_dir_and_file(folder_path)
Expand All @@ -215,7 +217,7 @@ def get_folder_path(folder_path=''):
def get_saveasfile_path(
file_path='', defaultextension='.json', extension_name='Config files'
):
if not any(var in os.environ for var in ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']):
if not any(var in os.environ for var in FILE_ENV_EXCLUSION):
current_file_path = file_path
# print(f'current file path: {current_file_path}')

Expand Down Expand Up @@ -251,7 +253,7 @@ def get_saveasfile_path(
def get_saveasfilename_path(
file_path='', extensions='*', extension_name='Config files'
):
if not any(var in os.environ for var in ['COLAB_GPU', 'RUNPOD_ENVIRONMENT']):
if not any(var in os.environ for var in FILE_ENV_EXCLUSION):
current_file_path = file_path
# print(f'current file path: {current_file_path}')

Expand Down
32 changes: 32 additions & 0 deletions requirements_macos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
accelerate==0.15.0
albumentations==1.3.0
altair==4.2.2
bitsandbytes==0.35.0
dadaptation==1.5
diffusers[torch]==0.10.2
easygui==0.98.3
einops==0.6.0
ftfy==6.1.1
gradio==3.19.1; sys_platform != 'darwin'
gradio==3.23.0; sys_platform == 'darwin'
lion-pytorch==0.0.6
opencv-python==4.7.0.68
pytorch-lightning==1.9.0
safetensors==0.2.6
tensorboard==2.10.1
tk==0.1.0
toml==0.10.2
transformers==4.26.0
voluptuous==0.13.1
# for BLIP captioning
fairscale==0.4.13
requests==2.28.2
timm==0.6.12
# tensorflow<2.11
huggingface-hub==0.12.0; sys_platform != 'darwin'
huggingface-hub==0.13.0; sys_platform == 'darwin'
tensorflow==2.10.1; sys_platform != 'darwin'
# For locon support
lycoris_lora==0.1.2
# for kohya_ss library
.

0 comments on commit b6332ce

Please sign in to comment.