Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added ViT-L/14_336px support #148

Merged
merged 3 commits into from
Apr 24, 2022
Merged
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
2 changes: 2 additions & 0 deletions src/pytti/Notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def save_batch(settings_list, path):
def _sanitize_for_config(in_str):
for char in ("/", "-"):
in_str = in_str.replace(char, "")
for char in "@":
in_str = in_str.replace(char, "_")
return in_str


Expand Down
1 change: 1 addition & 0 deletions src/pytti/assets/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ flow_long_term_samples: 1
ViTB32: true
ViTB16: false
ViTL14: false
ViTL14_336px: false
RN50: false
RN101: false
RN50x4: false
Expand Down
26 changes: 15 additions & 11 deletions tests/test_models_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,32 @@ def test_init_vqgan(self, model_name):

########################################

# clip

def test_load_vqgan_with_download():
pass
from pytti.Notebook import load_clip, _sanitize_for_config


# clip
def test_load_clip_w_at_symbol_in_identifier():
openai_model_name = "ViT-L/14@336px"
config_model_name = "ViTL14_336px"
assert _sanitize_for_config(openai_model_name) == config_model_name
load_clip({config_model_name: True})


def test_load_clip_with_download():
pass
# def test_load_clip_with_download():
# pass


def test_load_clip_no_download():
pass
# def test_load_clip_no_download():
# pass


# adabins


def test_load_adabins_with_download():
pass
# def test_load_adabins_with_download():
# pass


def test_load_adabins_no_download():
pass
# def test_load_adabins_no_download():
# pass