diff --git a/README.md b/README.md index ac508f78..466e4edb 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ One-click installer details ### One-click-installer -The script uses Miniconda to set up a Conda environment in the `installer_files` folder. +The script uses Miniforge to set up a Conda environment in the `installer_files` folder. If you ever need to install something manually in the `installer_files` environment, you can launch an interactive shell using the cmd script: `cmd_linux.sh`, `cmd_windows.bat`, or `cmd_macos.sh`. @@ -115,15 +115,17 @@ Manual full installation with conda or docker #### 0. Install Conda -https://docs.conda.io/en/latest/miniconda.html +https://github.com/conda-forge/miniforge -On Linux or WSL, it can be automatically installed with these two commands ([source](https://educe-ubc.github.io/conda.html)): +On Linux or WSL, Miniforge can be automatically installed with these two commands: ``` -curl -sL "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > "Miniconda3.sh" -bash Miniconda3.sh +curl -sL "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" > "Miniforge3.sh" +bash Miniforge3.sh ``` +For other platforms, download from: https://github.com/conda-forge/miniforge/releases/latest + #### 1. Create a new conda environment ``` @@ -135,12 +137,12 @@ conda activate textgen | System | GPU | Command | |--------|---------|---------| -| Linux/WSL | NVIDIA | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | -| Linux/WSL | CPU only | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu` | -| Linux | AMD | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/rocm6.2.4` | -| MacOS + MPS | Any | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0` | -| Windows | NVIDIA | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | -| Windows | CPU only | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0` | +| Linux/WSL | NVIDIA | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | +| Linux/WSL | CPU only | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cpu` | +| Linux | AMD | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/rocm6.2.4` | +| MacOS + MPS | Any | `pip3 install torch==2.6.0` | +| Windows | NVIDIA | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | +| Windows | CPU only | `pip3 install torch==2.6.0` | The up-to-date commands can be found here: https://pytorch.org/get-started/locally/. @@ -181,9 +183,9 @@ python server.py Then browse to -`http://localhost:7860/?__theme=dark` +`http://127.0.0.1:7860` -##### Manual install +#### Manual install The `requirements*.txt` above contain various wheels precompiled through GitHub Actions. If you wish to compile things manually, or if you need to because no suitable wheels are available for your hardware, you can use `requirements_nowheels.txt` and then install your desired loaders manually. diff --git a/cmd_linux.sh b/cmd_linux.sh index 576dbf02..e124aab9 100755 --- a/cmd_linux.sh +++ b/cmd_linux.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null diff --git a/cmd_macos.sh b/cmd_macos.sh index 1b052e5c..7e1a379f 100755 --- a/cmd_macos.sh +++ b/cmd_macos.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null diff --git a/cmd_windows.bat b/cmd_windows.bat index 531a3261..787b4335 100755 --- a/cmd_windows.bat +++ b/cmd_windows.bat @@ -4,7 +4,7 @@ cd /D "%~dp0" set PATH=%PATH%;%SystemRoot%\system32 -echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end +echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end @rem fix failed install when installing to a separate drive set TMP=%cd%\installer_files @@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%" set "CUDA_HOME=%CUDA_PATH%" @rem activate installer env -call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) +call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end ) @rem enter commands cmd /k "%*" diff --git a/css/main.css b/css/main.css index bc59f833..240a94d5 100644 --- a/css/main.css +++ b/css/main.css @@ -365,10 +365,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { gap: 0; } -#chat-tab button#Generate, #chat-tab button#stop { - width: 89.3438px !important; -} - #chat-tab button, #notebook-tab button, #default-tab button { min-width: 0 !important; } @@ -670,7 +666,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { position: absolute; background-color: transparent; left: 23px; - top: -5px; + top: -25px; padding: var(--block-padding); } @@ -830,7 +826,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { #chat-input-row { padding: 1rem; - padding-top: 0; } #chat-input-row.bigchat { @@ -1296,18 +1291,16 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { opacity: 1; } -/* Disable message action hover effects during generation */ -._generating .message:hover .message-actions, -._generating .user-message:hover .message-actions, -._generating .assistant-message:hover .message-actions { +/* Disable message actions and version navigation hover effects during generation */ +._generating :is(.message, .user-message, .assistant-message):hover :is(.message-actions, .version-navigation) { opacity: 0 !important; + pointer-events: none; } -/* Disable message action hover effects during scrolling */ -.scrolling .message:hover .message-actions, -.scrolling .user-message:hover .message-actions, -.scrolling .assistant-message:hover .message-actions { +/* Disable message actions and version navigation hover effects during scrolling */ +.scrolling :is(.message, .user-message, .assistant-message):hover :is(.message-actions, .version-navigation) { opacity: 0 !important; + pointer-events: none; } .footer-button svg { @@ -1670,3 +1663,19 @@ button:focus { #textbox-notebook span { display: none; } + +.chat-parent { + /* Optimize for scrolling performance */ + will-change: scroll-position; + contain: layout style paint; + + /* Ensure GPU acceleration */ + transform: translateZ(0); + + /* Prevent layout shifts */ + overflow-anchor: none; +} + +#chat-input span { + display: none; +} diff --git a/docs/07 - Extensions.md b/docs/07 - Extensions.md index 78497888..ebcd3c0e 100644 --- a/docs/07 - Extensions.md +++ b/docs/07 - Extensions.md @@ -1,8 +1,14 @@ # Extensions -Extensions are defined by files named `script.py` inside subfolders of `text-generation-webui/extensions`. They are loaded at startup if the folder name is specified after the `--extensions` flag. +Extensions are defined by files named `script.py` inside subfolders of either: +- `text-generation-webui/extensions` +- `text-generation-webui/user_data/extensions` -For instance, `extensions/silero_tts/script.py` gets loaded with `python server.py --extensions silero_tts`. +They are loaded at startup if the folder name is specified after the `--extensions` flag. + +For instance, `extensions/silero_tts/script.py` or `user_data/extensions/silero_tts/script.py` gets loaded with `python server.py --extensions silero_tts`. + +**Note:** Extensions in `user_data/extensions/` take priority over those in `extensions/` when both exist with the same name. ## [text-generation-webui-extensions](https://github.com/oobabooga/text-generation-webui-extensions) diff --git a/js/main.js b/js/main.js index 3ff4bf06..e5b14d8e 100644 --- a/js/main.js +++ b/js/main.js @@ -27,9 +27,7 @@ document.querySelector(".header_bar").addEventListener("click", function(event) this.style.marginBottom = chatVisible ? "0px" : "19px"; if (chatVisible && !showControlsChecked) { - document.querySelectorAll( - "#chat-tab > div > :nth-child(1), #chat-tab > div > :nth-child(3), #chat-tab > div > :nth-child(4), #extensions" - ).forEach(element => { + document.querySelectorAll("#extensions").forEach(element => { element.style.display = "none"; }); } @@ -189,8 +187,11 @@ const observer = new MutationObserver(function(mutations) { doSyntaxHighlighting(); - if (!window.isScrolled && !isScrollingClassOnly && targetElement.scrollTop !== targetElement.scrollHeight) { - targetElement.scrollTop = targetElement.scrollHeight; + if (!window.isScrolled && !isScrollingClassOnly) { + const maxScroll = targetElement.scrollHeight - targetElement.clientHeight; + if (maxScroll > 0 && targetElement.scrollTop < maxScroll - 1) { + targetElement.scrollTop = maxScroll; + } } const chatElement = document.getElementById("chat"); @@ -199,10 +200,11 @@ const observer = new MutationObserver(function(mutations) { const lastChild = messagesContainer?.lastElementChild; const prevSibling = lastChild?.previousElementSibling; if (lastChild && prevSibling) { - lastChild.style.setProperty("margin-bottom", - `max(0px, calc(max(70vh, 100vh - ${prevSibling.offsetHeight}px - 84px) - ${lastChild.offsetHeight}px))`, - "important" - ); + // Add padding to the messages container to create room for the last message. + // The purpose of this is to avoid constant scrolling during streaming in + // instruct mode. + const bufferHeight = Math.max(0, Math.max(0.7 * window.innerHeight, window.innerHeight - prevSibling.offsetHeight - 84) - lastChild.offsetHeight); + messagesContainer.style.paddingBottom = `${bufferHeight}px`; } } }); @@ -1046,3 +1048,56 @@ new MutationObserver(() => addMiniDeletes()).observe( {childList: true, subtree: true} ); addMiniDeletes(); + +//------------------------------------------------ +// Maintain distance from bottom when input height changes +//------------------------------------------------ +let wasAtBottom = false; +let preservedDistance = 0; + +function checkIfAtBottom() { + const distanceFromBottom = targetElement.scrollHeight - targetElement.scrollTop - targetElement.clientHeight; + wasAtBottom = distanceFromBottom <= 1; // Allow for rounding errors +} + +function preserveScrollPosition() { + preservedDistance = targetElement.scrollHeight - targetElement.scrollTop - targetElement.clientHeight; +} + +function restoreScrollPosition() { + if (wasAtBottom) { + // Force to bottom + targetElement.scrollTop = targetElement.scrollHeight - targetElement.clientHeight; + } else { + // Restore original distance + targetElement.scrollTop = targetElement.scrollHeight - targetElement.clientHeight - preservedDistance; + } +} + +// Check position before input +chatInput.addEventListener("beforeinput", () => { + checkIfAtBottom(); + preserveScrollPosition(); +}); + +// Restore after input +chatInput.addEventListener("input", () => { + requestAnimationFrame(() => restoreScrollPosition()); +}); + +// Update wasAtBottom when user scrolls +targetElement.addEventListener("scroll", checkIfAtBottom); + +//------------------------------------------------ +// Fix autoscroll after fonts load +//------------------------------------------------ +document.fonts.addEventListener("loadingdone", (event) => { + setTimeout(() => { + if (!window.isScrolled) { + const maxScroll = targetElement.scrollHeight - targetElement.clientHeight; + if (targetElement.scrollTop < maxScroll - 5) { + targetElement.scrollTop = maxScroll; + } + } + }, 50); +}); diff --git a/modules/extensions.py b/modules/extensions.py index 6729b996..e0010312 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -2,10 +2,10 @@ import importlib import traceback from functools import partial from inspect import signature +from pathlib import Path import gradio as gr -import extensions import modules.shared as shared from modules.logging_colors import logger @@ -28,36 +28,56 @@ def apply_settings(extension, name): def load_extensions(): global state, setup_called state = {} + for i, name in enumerate(shared.args.extensions): - if name in available_extensions: - if name != 'api': - logger.info(f'Loading the extension "{name}"') - try: - try: - extension = importlib.import_module(f"extensions.{name}.script") - except ModuleNotFoundError: - logger.error(f"Could not import the requirements for '{name}'. Make sure to install the requirements for the extension.\n\n* To install requirements for all available extensions, launch the\n update_wizard script for your OS and choose the B option.\n\n* To install the requirements for this extension alone, launch the\n cmd script for your OS and paste the following command in the\n terminal window that appears:\n\nLinux / Mac:\n\npip install -r extensions/{name}/requirements.txt --upgrade\n\nWindows:\n\npip install -r extensions\\{name}\\requirements.txt --upgrade\n") - raise + if name not in available_extensions: + continue - # Only run setup() and apply settings from settings.yaml once - if extension not in setup_called: - apply_settings(extension, name) - if hasattr(extension, "setup"): - extension.setup() + if name != 'api': + logger.info(f'Loading the extension "{name}"') - setup_called.add(extension) + try: + # Prefer user extension, fall back to system extension + user_script_path = Path(f'user_data/extensions/{name}/script.py') + if user_script_path.exists(): + extension = importlib.import_module(f"user_data.extensions.{name}.script") + else: + extension = importlib.import_module(f"extensions.{name}.script") - state[name] = [True, i] - except: - logger.error(f'Failed to load the extension "{name}".') - traceback.print_exc() + if extension not in setup_called: + apply_settings(extension, name) + if hasattr(extension, "setup"): + extension.setup() + setup_called.add(extension) + + state[name] = [True, i, extension] # Store extension object + + except ModuleNotFoundError: + extension_location = Path('user_data/extensions') / name if user_script_path.exists() else Path('extensions') / name + windows_path = str(extension_location).replace('/', '\\') + logger.error( + f"Could not import the requirements for '{name}'. Make sure to install the requirements for the extension.\n\n" + f"* To install requirements automatically, launch the update_wizard script for your OS and:\n\n" + f"1. Choose option B (Install/update extensions requirements)\n" + f"2. Select '{name}' from the extension list\n\n" + f"* To install requirements manually, launch the cmd script for your OS and paste the following command:\n\n" + f"Linux / Mac:\n\n" + f"pip install -r {extension_location}/requirements.txt --upgrade\n\n" + f"Windows:\n\n" + f"pip install -r {windows_path}\\requirements.txt --upgrade\n" + ) + raise + + except Exception: + logger.error(f'Failed to load the extension "{name}".') + traceback.print_exc() # This iterator returns the extensions in the order specified in the command-line def iterator(): for name in sorted(state, key=lambda x: state[x][1]): if state[name][0]: - yield getattr(extensions, name).script, name + yield state[name][2], name # Use stored extension object # Extension functions that map string -> string diff --git a/modules/html_generator.py b/modules/html_generator.py index 11572fc6..6844c244 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -116,29 +116,29 @@ def extract_thinking_block(string): THINK_START_TAG = "<think>" THINK_END_TAG = "</think>" - # Look for opening tag - start_pos = string.lstrip().find(THINK_START_TAG) - if start_pos == -1: + # Look for think tag + start_pos = string.find(THINK_START_TAG) + end_pos = string.find(THINK_END_TAG) + + # Return if neither tag is in string + if start_pos == -1 and end_pos == -1: return None, string - # Adjust start position to account for any leading whitespace - start_pos = string.find(THINK_START_TAG) - - # Find the content after the opening tag - content_start = start_pos + len(THINK_START_TAG) - - # Look for closing tag - end_pos = string.find(THINK_END_TAG, content_start) - - if end_pos != -1: - # Both tags found - extract content between them - thinking_content = string[content_start:end_pos] - remaining_content = string[end_pos + len(THINK_END_TAG):] - return thinking_content, remaining_content + # handle missing start or end tags + if start_pos == -1: + thought_start = 0 else: - # Only opening tag found - everything else is thinking content - thinking_content = string[content_start:] - return thinking_content, "" + thought_start = start_pos + len(THINK_START_TAG) + if end_pos == -1: + thought_end = len(string) + content_start = len(string) + else: + thought_end = end_pos + content_start = end_pos + len(THINK_END_TAG) + + thinking_content = string[thought_start:thought_end] + remaining_content = string[content_start:] + return thinking_content, remaining_content @functools.lru_cache(maxsize=None) diff --git a/modules/models_settings.py b/modules/models_settings.py index 6b22499e..bea5b4d6 100644 --- a/modules/models_settings.py +++ b/modules/models_settings.py @@ -23,7 +23,6 @@ def get_fallback_settings(): 'truncation_length': shared.settings['truncation_length'], 'truncation_length_info': shared.settings['truncation_length'], 'skip_special_tokens': shared.settings['skip_special_tokens'], - 'custom_stopping_strings': shared.settings['custom_stopping_strings'], } diff --git a/modules/ui.py b/modules/ui.py index fb719158..0030bb02 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -296,7 +296,7 @@ def gather_interface_values(*args): shared.persistent_interface_state.pop('textbox') # Prevent history loss if backend is restarted but UI is not refreshed - if output['history'] is None and output['unique_id'] is not None: + if (output['history'] is None or (len(output['history'].get('visible', [])) == 0 and len(output['history'].get('internal', [])) == 0)) and output['unique_id'] is not None: output['history'] = load_history(output['unique_id'], output['character_menu'], output['mode']) return output diff --git a/modules/ui_chat.py b/modules/ui_chat.py index 8a90608f..4dade176 100644 --- a/modules/ui_chat.py +++ b/modules/ui_chat.py @@ -19,8 +19,9 @@ def create_ui(): shared.gradio['Chat input'] = gr.State() shared.gradio['history'] = gr.State({'internal': [], 'visible': [], 'metadata': {}}) + shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer - with gr.Tab('Chat', id='Chat', elem_id='chat-tab'): + with gr.Tab('Chat', elem_id='chat-tab'): with gr.Row(elem_id='past-chats-row', elem_classes=['pretty_scrollbar']): with gr.Column(): with gr.Row(elem_id='past-chats-buttons'): @@ -47,7 +48,6 @@ def create_ui(): with gr.Row(): with gr.Column(elem_id='chat-col'): - shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer shared.gradio['html_display'] = gr.HTML(value=chat_html_wrapper({'internal': [], 'visible': [], 'metadata': {}}, '', '', 'chat', 'cai-chat', '')['html'], visible=True) with gr.Row(elem_id="chat-input-row"): with gr.Column(scale=1, elem_id='gr-hover-container'): @@ -60,7 +60,7 @@ def create_ui(): with gr.Column(scale=1, elem_id='generate-stop-container'): with gr.Row(): shared.gradio['Stop'] = gr.Button('Stop', elem_id='stop', visible=False) - shared.gradio['Generate'] = gr.Button('Generate', elem_id='Generate', variant='primary') + shared.gradio['Generate'] = gr.Button('Send', elem_id='Generate', variant='primary') # Hover menu buttons with gr.Column(elem_id='chat-buttons'): @@ -78,9 +78,8 @@ def create_ui(): with gr.Row(): shared.gradio['start_with'] = gr.Textbox(label='Start reply with', placeholder='Sure thing!', value=shared.settings['start_with'], elem_classes=['add_scrollbar']) - with gr.Row(): - shared.gradio['enable_web_search'] = gr.Checkbox(value=shared.settings.get('enable_web_search', False), label='Activate web search', elem_id='web-search') - + shared.gradio['enable_thinking'] = gr.Checkbox(value=shared.settings['enable_thinking'], label='Enable thinking', info='Used by Qwen3 to toggle mode.') + shared.gradio['enable_web_search'] = gr.Checkbox(value=shared.settings.get('enable_web_search', False), label='Activate web search', elem_id='web-search') with gr.Row(visible=shared.settings.get('enable_web_search', False)) as shared.gradio['web_search_row']: shared.gradio['web_search_pages'] = gr.Number(value=shared.settings.get('web_search_pages', 3), precision=0, label='Number of pages to download', minimum=1, maximum=10) diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index a18d7d10..e09e292e 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -130,6 +130,10 @@ def create_ui(): def create_event_handlers(): + mu = shared.args.multi_user + if mu: + return + shared.gradio['loader'].change(loaders.make_loader_params_visible, gradio('loader'), gradio(loaders.get_all_params()), show_progress=False) # In this event handler, the interface state is read and updated diff --git a/modules/ui_parameters.py b/modules/ui_parameters.py index e42e4c0c..5c92f32e 100644 --- a/modules/ui_parameters.py +++ b/modules/ui_parameters.py @@ -85,7 +85,6 @@ def create_ui(): shared.gradio['auto_max_new_tokens'] = gr.Checkbox(value=shared.settings['auto_max_new_tokens'], label='auto_max_new_tokens', info='Expand max_new_tokens to the available context length.') shared.gradio['ban_eos_token'] = gr.Checkbox(value=shared.settings['ban_eos_token'], label='Ban the eos_token', info='Forces the model to never end the generation prematurely.') shared.gradio['add_bos_token'] = gr.Checkbox(value=shared.settings['add_bos_token'], label='Add the bos_token to the beginning of prompts', info='Disabling this can make the replies more creative.') - shared.gradio['enable_thinking'] = gr.Checkbox(value=shared.settings['enable_thinking'], label='Enable thinking', info='Used by Qwen3 to toggle mode.') shared.gradio['skip_special_tokens'] = gr.Checkbox(value=shared.settings['skip_special_tokens'], label='Skip special tokens', info='Some specific models need this unset.') shared.gradio['stream'] = gr.Checkbox(value=shared.settings['stream'], label='Activate text streaming') shared.gradio['static_cache'] = gr.Checkbox(value=shared.settings['static_cache'], label='Static KV cache', info='Use a static cache for improved performance.') diff --git a/modules/ui_session.py b/modules/ui_session.py index a69e155b..60b19f47 100644 --- a/modules/ui_session.py +++ b/modules/ui_session.py @@ -17,7 +17,7 @@ def create_ui(): with gr.Column(): gr.Markdown("## Extensions & flags") - shared.gradio['save_settings'] = gr.Button('Save settings to user_data/settings.yaml', elem_classes='refresh-button', interactive=not mu) + shared.gradio['save_settings'] = gr.Button('Save extensions settings to user_data/settings.yaml', elem_classes='refresh-button', interactive=not mu) shared.gradio['reset_interface'] = gr.Button("Apply flags/extensions and restart", interactive=not mu) with gr.Row(): with gr.Column(): @@ -27,9 +27,10 @@ def create_ui(): shared.gradio['bool_menu'] = gr.CheckboxGroup(choices=get_boolean_arguments(), value=get_boolean_arguments(active=True), label="Boolean command-line flags", elem_classes='checkboxgroup-table') shared.gradio['theme_state'] = gr.Textbox(visible=False, value='dark' if shared.settings['dark_theme'] else 'light') - shared.gradio['save_settings'].click( - ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( - handle_save_settings, gradio('interface_state', 'preset_menu', 'extensions_menu', 'show_controls', 'theme_state'), gradio('save_contents', 'save_filename', 'save_root', 'file_saver'), show_progress=False) + if not mu: + shared.gradio['save_settings'].click( + ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( + handle_save_settings, gradio('interface_state', 'preset_menu', 'extensions_menu', 'show_controls', 'theme_state'), gradio('save_contents', 'save_filename', 'save_root', 'file_saver'), show_progress=False) shared.gradio['toggle_dark_mode'].click( lambda x: 'dark' if x == 'light' else 'light', gradio('theme_state'), gradio('theme_state')).then( @@ -42,9 +43,10 @@ def create_ui(): ) # Reset interface event - shared.gradio['reset_interface'].click( - set_interface_arguments, gradio('extensions_menu', 'bool_menu'), None).then( - None, None, None, js='() => {document.body.innerHTML=\'

Reloading...

\'; setTimeout(function(){location.reload()},2500); return []}') + if not mu: + shared.gradio['reset_interface'].click( + set_interface_arguments, gradio('extensions_menu', 'bool_menu'), None).then( + None, None, None, js='() => {document.body.innerHTML=\'

Reloading...

\'; setTimeout(function(){location.reload()},2500); return []}') def handle_save_settings(state, preset, extensions, show_controls, theme): diff --git a/modules/utils.py b/modules/utils.py index c285d401..117ad590 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -183,8 +183,18 @@ def get_available_instruction_templates(): def get_available_extensions(): - extensions = sorted(set(map(lambda x: x.parts[1], Path('extensions').glob('*/script.py'))), key=natural_keys) - return extensions + # User extensions (higher priority) + user_extensions = [] + user_ext_path = Path('user_data/extensions') + if user_ext_path.exists(): + user_exts = map(lambda x: x.parts[2], user_ext_path.glob('*/script.py')) + user_extensions = sorted(set(user_exts), key=natural_keys) + + # System extensions (excluding those overridden by user extensions) + system_exts = map(lambda x: x.parts[1], Path('extensions').glob('*/script.py')) + system_extensions = sorted(set(system_exts) - set(user_extensions), key=natural_keys) + + return user_extensions + system_extensions def get_available_loras(): diff --git a/modules/web_search.py b/modules/web_search.py index 401a42bb..3b1f6e18 100644 --- a/modules/web_search.py +++ b/modules/web_search.py @@ -1,6 +1,9 @@ import concurrent.futures +import html +import re from concurrent.futures import as_completed from datetime import datetime +from urllib.parse import quote_plus import requests @@ -44,19 +47,26 @@ def download_web_page(url, timeout=10): return "" -def perform_web_search(query, num_pages=3, max_workers=5): +def perform_web_search(query, num_pages=3, max_workers=5, timeout=10): """Perform web search and return results with content""" - from duckduckgo_search import DDGS - try: - with DDGS() as ddgs: - results = list(ddgs.text(query, max_results=num_pages)) + # Use DuckDuckGo HTML search endpoint + search_url = f"https://html.duckduckgo.com/html/?q={quote_plus(query)}" + headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'} + + response = requests.get(search_url, headers=headers, timeout=timeout) + response.raise_for_status() + + # Extract results with regex + titles = re.findall(r']*class="[^"]*result__a[^"]*"[^>]*>(.*?)', response.text, re.DOTALL) + urls = re.findall(r']*class="[^"]*result__url[^"]*"[^>]*>(.*?)', response.text, re.DOTALL) # Prepare download tasks download_tasks = [] - for i, result in enumerate(results): - url = result.get('href', '') - title = result.get('title', f'Search Result {i+1}') + for i in range(min(len(titles), len(urls), num_pages)): + url = f"https://{urls[i].strip()}" + title = re.sub(r'<[^>]+>', '', titles[i]).strip() + title = html.unescape(title) download_tasks.append((url, title, i)) search_results = [None] * len(download_tasks) # Pre-allocate to maintain order diff --git a/requirements/full/requirements.txt b/requirements/full/requirements.txt index 14828e8d..34fd13be 100644 --- a/requirements/full/requirements.txt +++ b/requirements/full/requirements.txt @@ -2,7 +2,6 @@ accelerate==1.5.* bitsandbytes==0.45.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -34,8 +33,8 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_amd.txt b/requirements/full/requirements_amd.txt index ec2040d0..9b18524a 100644 --- a/requirements/full/requirements_amd.txt +++ b/requirements/full/requirements_amd.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,7 +32,7 @@ sse-starlette==1.6.5 tiktoken # AMD wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64" diff --git a/requirements/full/requirements_amd_noavx2.txt b/requirements/full/requirements_amd_noavx2.txt index 4b50c693..6b9cc2a9 100644 --- a/requirements/full/requirements_amd_noavx2.txt +++ b/requirements/full/requirements_amd_noavx2.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,7 +32,7 @@ sse-starlette==1.6.5 tiktoken # AMD wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64" diff --git a/requirements/full/requirements_apple_intel.txt b/requirements/full/requirements_apple_intel.txt index a6e2925e..b7830355 100644 --- a/requirements/full/requirements_apple_intel.txt +++ b/requirements/full/requirements_apple_intel.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,7 +32,7 @@ sse-starlette==1.6.5 tiktoken # Mac wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl diff --git a/requirements/full/requirements_apple_silicon.txt b/requirements/full/requirements_apple_silicon.txt index 1b97d844..e48d4dee 100644 --- a/requirements/full/requirements_apple_silicon.txt +++ b/requirements/full/requirements_apple_silicon.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,8 +32,8 @@ sse-starlette==1.6.5 tiktoken # Mac wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl diff --git a/requirements/full/requirements_cpu_only.txt b/requirements/full/requirements_cpu_only.txt index fa553f7c..831ff51f 100644 --- a/requirements/full/requirements_cpu_only.txt +++ b/requirements/full/requirements_cpu_only.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,5 +32,5 @@ sse-starlette==1.6.5 tiktoken # llama.cpp (CPU only, AVX2) -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_cpu_only_noavx2.txt b/requirements/full/requirements_cpu_only_noavx2.txt index 505f8ae8..fb81f40b 100644 --- a/requirements/full/requirements_cpu_only_noavx2.txt +++ b/requirements/full/requirements_cpu_only_noavx2.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -33,5 +32,5 @@ sse-starlette==1.6.5 tiktoken # llama.cpp (CPU only, no AVX2) -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_cuda128.txt b/requirements/full/requirements_cuda128.txt index 84ffa327..3d29c93f 100644 --- a/requirements/full/requirements_cuda128.txt +++ b/requirements/full/requirements_cuda128.txt @@ -2,7 +2,6 @@ accelerate==1.5.* bitsandbytes==0.45.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -34,8 +33,8 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_cuda128_noavx2.txt b/requirements/full/requirements_cuda128_noavx2.txt index da995438..7528aed0 100644 --- a/requirements/full/requirements_cuda128_noavx2.txt +++ b/requirements/full/requirements_cuda128_noavx2.txt @@ -2,7 +2,6 @@ accelerate==1.5.* bitsandbytes==0.45.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -34,8 +33,8 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_noavx2.txt b/requirements/full/requirements_noavx2.txt index 13ecaf87..e86e4524 100644 --- a/requirements/full/requirements_noavx2.txt +++ b/requirements/full/requirements_noavx2.txt @@ -2,7 +2,6 @@ accelerate==1.5.* bitsandbytes==0.45.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* @@ -34,8 +33,8 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" diff --git a/requirements/full/requirements_nowheels.txt b/requirements/full/requirements_nowheels.txt index b1c3c6ea..30020989 100644 --- a/requirements/full/requirements_nowheels.txt +++ b/requirements/full/requirements_nowheels.txt @@ -1,7 +1,6 @@ accelerate==1.5.* colorama datasets -duckduckgo_search==8.0.2 einops fastapi==0.112.4 gradio==4.37.* diff --git a/requirements/portable/requirements.txt b/requirements/portable/requirements.txt index 49cd6264..e9fa61f1 100644 --- a/requirements/portable/requirements.txt +++ b/requirements/portable/requirements.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" diff --git a/requirements/portable/requirements_apple_intel.txt b/requirements/portable/requirements_apple_intel.txt index fca8208f..4f9b0668 100644 --- a/requirements/portable/requirements_apple_intel.txt +++ b/requirements/portable/requirements_apple_intel.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # Mac wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" diff --git a/requirements/portable/requirements_apple_silicon.txt b/requirements/portable/requirements_apple_silicon.txt index 86b00651..9f403a0b 100644 --- a/requirements/portable/requirements_apple_silicon.txt +++ b/requirements/portable/requirements_apple_silicon.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,6 +18,6 @@ sse-starlette==1.6.5 tiktoken # Mac wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" diff --git a/requirements/portable/requirements_cpu_only.txt b/requirements/portable/requirements_cpu_only.txt index fca46fb5..8e9baa32 100644 --- a/requirements/portable/requirements_cpu_only.txt +++ b/requirements/portable/requirements_cpu_only.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # llama.cpp (CPU only, AVX2) -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" diff --git a/requirements/portable/requirements_cpu_only_noavx2.txt b/requirements/portable/requirements_cpu_only_noavx2.txt index 3ebc2488..ebd63591 100644 --- a/requirements/portable/requirements_cpu_only_noavx2.txt +++ b/requirements/portable/requirements_cpu_only_noavx2.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # llama.cpp (CPU only, no AVX2) -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" diff --git a/requirements/portable/requirements_noavx2.txt b/requirements/portable/requirements_noavx2.txt index 2bdf257e..6802a337 100644 --- a/requirements/portable/requirements_noavx2.txt +++ b/requirements/portable/requirements_noavx2.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" diff --git a/requirements/portable/requirements_nowheels.txt b/requirements/portable/requirements_nowheels.txt index c22d6441..b7b73eff 100644 --- a/requirements/portable/requirements_nowheels.txt +++ b/requirements/portable/requirements_nowheels.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 diff --git a/requirements/portable/requirements_vulkan.txt b/requirements/portable/requirements_vulkan.txt index 0b98ee5a..624c222d 100644 --- a/requirements/portable/requirements_vulkan.txt +++ b/requirements/portable/requirements_vulkan.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" diff --git a/requirements/portable/requirements_vulkan_noavx2.txt b/requirements/portable/requirements_vulkan_noavx2.txt index 188dc085..edb82a31 100644 --- a/requirements/portable/requirements_vulkan_noavx2.txt +++ b/requirements/portable/requirements_vulkan_noavx2.txt @@ -1,4 +1,3 @@ -duckduckgo_search==8.0.2 fastapi==0.112.4 gradio==4.37.* html2text==2025.4.15 @@ -19,5 +18,5 @@ sse-starlette==1.6.5 tiktoken # CUDA wheels -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" -https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" +https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" diff --git a/start_linux.sh b/start_linux.sh index e2b00558..a991e1bc 100755 --- a/start_linux.sh +++ b/start_linux.sh @@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then exit $? fi -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null @@ -30,29 +30,29 @@ esac INSTALL_DIR="$(pwd)/installer_files" CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda" INSTALL_ENV_DIR="$(pwd)/installer_files/env" -MINICONDA_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-Linux-${OS_ARCH}.sh" +MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-${OS_ARCH}.sh" conda_exists="F" # figure out whether git and conda needs to be installed if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi # (if necessary) install git and conda into a contained environment -# download miniconda +# download miniforge if [ "$conda_exists" == "F" ]; then - echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh" + echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh" mkdir -p "$INSTALL_DIR" - curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh" + curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh" - chmod u+x "$INSTALL_DIR/miniconda_installer.sh" - bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX + chmod u+x "$INSTALL_DIR/miniforge_installer.sh" + bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX # test the conda binary - echo "Miniconda version:" + echo "Miniforge version:" "$CONDA_ROOT_PREFIX/bin/conda" --version - # delete the Miniconda installer - rm "$INSTALL_DIR/miniconda_installer.sh" + # delete the Miniforge installer + rm "$INSTALL_DIR/miniforge_installer.sh" fi # create the installer env diff --git a/start_macos.sh b/start_macos.sh index bff11bc1..6426229a 100755 --- a/start_macos.sh +++ b/start_macos.sh @@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then exit $? fi -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null @@ -30,29 +30,29 @@ esac INSTALL_DIR="$(pwd)/installer_files" CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda" INSTALL_ENV_DIR="$(pwd)/installer_files/env" -MINICONDA_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-MacOSX-${OS_ARCH}.sh" +MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-${OS_ARCH}.sh" conda_exists="F" # figure out whether git and conda needs to be installed if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi # (if necessary) install git and conda into a contained environment -# download miniconda +# download miniforge if [ "$conda_exists" == "F" ]; then - echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh" + echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh" mkdir -p "$INSTALL_DIR" - curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh" + curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh" - chmod u+x "$INSTALL_DIR/miniconda_installer.sh" - bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX + chmod u+x "$INSTALL_DIR/miniforge_installer.sh" + bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX # test the conda binary - echo "Miniconda version:" + echo "Miniforge version:" "$CONDA_ROOT_PREFIX/bin/conda" --version - # delete the Miniconda installer - rm "$INSTALL_DIR/miniconda_installer.sh" + # delete the Miniforge installer + rm "$INSTALL_DIR/miniforge_installer.sh" fi # create the installer env diff --git a/start_windows.bat b/start_windows.bat index f5e66ec2..68c6194e 100755 --- a/start_windows.bat +++ b/start_windows.bat @@ -16,7 +16,7 @@ if exist "portable_env" ( set PATH=%PATH%;%SystemRoot%\system32 -echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end +echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end @rem Check for special characters in installation path set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!"" @@ -36,8 +36,8 @@ set TEMP=%cd%\installer_files set INSTALL_DIR=%cd%\installer_files set CONDA_ROOT_PREFIX=%cd%\installer_files\conda set INSTALL_ENV_DIR=%cd%\installer_files\env -set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-Windows-x86_64.exe -set MINICONDA_CHECKSUM=43dcbcc315ff91edf959e002cd2f1ede38c64b999fefcc951bccf2ed69c9e8bb +set MINIFORGE_DOWNLOAD_URL=https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Windows-x86_64.exe +set MINIFORGE_CHECKSUM=b48cd98430170983076dfb51769a6d37668176f59bf3b59c4b21ac4c9bc24f39 set conda_exists=F @rem figure out whether git and conda needs to be installed @@ -47,40 +47,40 @@ if "%ERRORLEVEL%" EQU "0" set conda_exists=T @rem (if necessary) install git and conda into a contained environment @rem download conda if "%conda_exists%" == "F" ( - echo Downloading Miniconda from %MINICONDA_DOWNLOAD_URL% to %INSTALL_DIR%\miniconda_installer.exe + echo Downloading Miniforge from %MINIFORGE_DOWNLOAD_URL% to %INSTALL_DIR%\miniforge_installer.exe mkdir "%INSTALL_DIR%" - call curl -Lk "%MINICONDA_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniconda_installer.exe" || ( echo. && echo Miniconda failed to download. && goto end ) + call curl -Lk "%MINIFORGE_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniforge_installer.exe" || ( echo. && echo Miniforge failed to download. && goto end ) @rem Try CertUtil first - for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniconda_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINICONDA_CHECKSUM%"') do ( + for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniforge_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINIFORGE_CHECKSUM%"') do ( set "output=%%a" ) @rem If CertUtil fails, try PowerShell if not defined output ( - for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniconda_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINICONDA_CHECKSUM%''){echo true}"') do ( + for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniforge_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINIFORGE_CHECKSUM%''){echo true}"') do ( set "output=%%a" ) ) if not defined output ( - echo The checksum verification for miniconda_installer.exe has failed. - del "%INSTALL_DIR%\miniconda_installer.exe" + echo The checksum verification for miniforge_installer.exe has failed. + del "%INSTALL_DIR%\miniforge_installer.exe" goto end ) else ( - echo The checksum verification for miniconda_installer.exe has passed successfully. + echo The checksum verification for miniforge_installer.exe has passed successfully. ) - echo Installing Miniconda to %CONDA_ROOT_PREFIX% - start /wait "" "%INSTALL_DIR%\miniconda_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX% + echo Installing Miniforge to %CONDA_ROOT_PREFIX% + start /wait "" "%INSTALL_DIR%\miniforge_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX% @rem test the conda binary - echo Miniconda version: - call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniconda not found. && goto end ) + echo Miniforge version: + call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniforge not found. && goto end ) - @rem delete the Miniconda installer - del "%INSTALL_DIR%\miniconda_installer.exe" + @rem delete the Miniforge installer + del "%INSTALL_DIR%\miniforge_installer.exe" ) @rem create the installer env @@ -96,7 +96,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%" set "CUDA_HOME=%CUDA_PATH%" @rem activate installer env -call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) +call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end ) @rem setup installer env call python one_click.py %* diff --git a/update_wizard_linux.sh b/update_wizard_linux.sh index c81d9d9b..eb4a753c 100755 --- a/update_wizard_linux.sh +++ b/update_wizard_linux.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null diff --git a/update_wizard_macos.sh b/update_wizard_macos.sh index f58bb9e9..61a8110c 100755 --- a/update_wizard_macos.sh +++ b/update_wizard_macos.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi +if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi # deactivate existing conda envs as needed to avoid conflicts { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null diff --git a/update_wizard_windows.bat b/update_wizard_windows.bat index fac251a7..e9203c52 100755 --- a/update_wizard_windows.bat +++ b/update_wizard_windows.bat @@ -4,7 +4,7 @@ cd /D "%~dp0" set PATH=%PATH%;%SystemRoot%\system32 -echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end +echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end @rem fix failed install when installing to a separate drive set TMP=%cd%\installer_files @@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%" set "CUDA_HOME=%CUDA_PATH%" @rem activate installer env -call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) +call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end ) @rem update installer env call python one_click.py --update-wizard && ( diff --git a/user_data/extensions/place-your-extensions-here.txt b/user_data/extensions/place-your-extensions-here.txt new file mode 100644 index 00000000..e69de29b diff --git a/user_data/models/config.yaml b/user_data/models/config.yaml index 8521c4c6..038ebcf1 100644 --- a/user_data/models/config.yaml +++ b/user_data/models/config.yaml @@ -33,18 +33,14 @@ skip_special_tokens: false .*alpaca-native-4bit: instruction_template: 'Alpaca' - custom_stopping_strings: '"### End"' .*llava: instruction_template: 'LLaVA' - custom_stopping_strings: '"\n###"' .*llava.*1.5: instruction_template: 'Vicuna-v1.1' .*wizard.*mega: instruction_template: 'Wizard-Mega' - custom_stopping_strings: '""' .*starchat-beta: instruction_template: 'Starchat-Beta' - custom_stopping_strings: '"<|end|>"' (?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable)(?!.*chinese).*vicuna: instruction_template: 'Vicuna-v0' .*vicuna.*v0: @@ -151,7 +147,6 @@ instruction_template: 'Alpaca' .*(openorca-platypus2): instruction_template: 'OpenOrca-Platypus2' - custom_stopping_strings: '"### Instruction:", "### Response:"' .*longchat: instruction_template: 'Vicuna-v1.1' .*vicuna-33b: