From 869f47fff9b9fd5814b4fc574fb57028762b6592 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:13:13 -0700 Subject: [PATCH] Lint --- modules/chat.py | 2 +- modules/metadata_gguf.py | 2 +- modules/text_generation.py | 4 ++-- modules/ui_file_saving.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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("