diff --git a/modules/chat.py b/modules/chat.py index 37fa25f..e3745d0 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -530,7 +530,7 @@ def load_character_memoized(character, name1, name2, instruct=False): def upload_character(file, img, tavern=False): - decoded_file = file if type(file) == str else file.decode('utf-8') + decoded_file = file if isinstance(file, str) else file.decode('utf-8') try: data = json.loads(decoded_file) except: diff --git a/modules/metadata_gguf.py b/modules/metadata_gguf.py index f5fa3ce..0ea41a2 100644 --- a/modules/metadata_gguf.py +++ b/modules/metadata_gguf.py @@ -71,7 +71,7 @@ def load_metadata(fname): ti_data_count = struct.unpack("