diff --git a/extensions/openai/completions.py b/extensions/openai/completions.py index 6bd8f409..2cefc22b 100644 --- a/extensions/openai/completions.py +++ b/extensions/openai/completions.py @@ -143,21 +143,20 @@ def convert_history(history): new_history = [] for entry in history: if isinstance(entry['content'], list): - image_url = None - content = None for item in entry['content']: if not isinstance(item, dict): continue - + + image_url = None + content = None if item['type'] == 'image_url' and isinstance(item['image_url'], dict): image_url = item['image_url']['url'] elif item['type'] == 'text' and isinstance(item['text'], str): content = item['text'] - - if image_url: - new_history.append({"image_url": image_url, "role": "user"}) - if content: - new_history.append({"content": content, "role": "user"}) + if image_url: + new_history.append({"image_url": image_url, "role": "user"}) + if content: + new_history.append({"content": content, "role": "user"}) else: new_history.append(entry) diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index f87b680a..34d58177 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -260,6 +260,8 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur yield ("Please enter a model path") return + repo_id = repo_id.strip() + specific_file = specific_file.strip() downloader = importlib.import_module("download-model").ModelDownloader() progress(0.0) diff --git a/requirements.txt b/requirements.txt index eb2c8ea8..27aad7a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* bitsandbytes==0.44.* colorama datasets diff --git a/requirements_amd.txt b/requirements_amd.txt index f8980191..63b00a38 100644 --- a/requirements_amd.txt +++ b/requirements_amd.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_amd_noavx2.txt b/requirements_amd_noavx2.txt index 4c5d7574..1a16ed0e 100644 --- a/requirements_amd_noavx2.txt +++ b/requirements_amd_noavx2.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_apple_intel.txt b/requirements_apple_intel.txt index aad1f59e..74e3041a 100644 --- a/requirements_apple_intel.txt +++ b/requirements_apple_intel.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_apple_silicon.txt b/requirements_apple_silicon.txt index 52d5c7bc..42975d20 100644 --- a/requirements_apple_silicon.txt +++ b/requirements_apple_silicon.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_cpu_only.txt b/requirements_cpu_only.txt index 9a1ccc8d..dd7039e2 100644 --- a/requirements_cpu_only.txt +++ b/requirements_cpu_only.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_cpu_only_noavx2.txt b/requirements_cpu_only_noavx2.txt index 7ffdc718..c39d788f 100644 --- a/requirements_cpu_only_noavx2.txt +++ b/requirements_cpu_only_noavx2.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops diff --git a/requirements_noavx2.txt b/requirements_noavx2.txt index 57fa41f4..140d92f6 100644 --- a/requirements_noavx2.txt +++ b/requirements_noavx2.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* bitsandbytes==0.44.* colorama datasets diff --git a/requirements_nowheels.txt b/requirements_nowheels.txt index f5c3966e..44d58995 100644 --- a/requirements_nowheels.txt +++ b/requirements_nowheels.txt @@ -1,4 +1,4 @@ -accelerate==1.0.* +accelerate==1.1.* colorama datasets einops