From d4a9b5ea9708deef1357cf11f91d384b438089aa Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 30 Mar 2023 17:34:44 -0300 Subject: [PATCH 01/12] Remove redundant preset (see the plot in #587) --- README.md | 2 +- modules/shared.py | 2 +- presets/Pygmalion.txt | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 presets/Pygmalion.txt diff --git a/README.md b/README.md index 97f26ccb..169c894b 100644 --- a/README.md +++ b/README.md @@ -240,4 +240,4 @@ Before reporting a bug, make sure that you have: - Gradio dropdown menu refresh button, code for reloading the interface: https://github.com/AUTOMATIC1111/stable-diffusion-webui - Verbose preset: Anonymous 4chan user. - NovelAI and KoboldAI presets: https://github.com/KoboldAI/KoboldAI-Client/wiki/Settings-Presets -- Pygmalion preset, code for early stopping in chat mode, code for some of the sliders, --chat mode colors: https://github.com/PygmalionAI/gradio-ui/ +- Code for early stopping in chat mode, code for some of the sliders: https://github.com/PygmalionAI/gradio-ui/ diff --git a/modules/shared.py b/modules/shared.py index 348defa3..51fdf36c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -41,7 +41,7 @@ settings = { 'chat_default_extensions': ["gallery"], 'presets': { 'default': 'NovelAI-Sphinx Moth', - '.*pygmalion': 'Pygmalion', + '.*pygmalion': 'NovelAI-Storywriter', '.*RWKV': 'Naive', }, 'prompts': { diff --git a/presets/Pygmalion.txt b/presets/Pygmalion.txt deleted file mode 100644 index f8b2ca55..00000000 --- a/presets/Pygmalion.txt +++ /dev/null @@ -1,6 +0,0 @@ -do_sample=True -top_p=0.9 -top_k=0 -temperature=0.5 -repetition_penalty=1.1 -typical_p=1.0 From bb69e054a7241798a8bc0c784747653aa753daab Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:08:50 -0300 Subject: [PATCH 02/12] Add dummy file --- loras/place-your-loras-here.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 loras/place-your-loras-here.txt diff --git a/loras/place-your-loras-here.txt b/loras/place-your-loras-here.txt new file mode 100644 index 00000000..e69de29b From f9940b79dc9f67477cec3819dbfb250f5e92a658 Mon Sep 17 00:00:00 2001 From: ye7iaserag Date: Fri, 31 Mar 2023 04:56:49 +0200 Subject: [PATCH 03/12] Implement character gallery using Dataset --- extensions/gallery/script.py | 38 +++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py index fbf23bc9..e96fe40a 100644 --- a/extensions/gallery/script.py +++ b/extensions/gallery/script.py @@ -1,20 +1,23 @@ from pathlib import Path - import gradio as gr - from modules.html_generator import get_image_cache +from modules.chat import load_character +from modules.shared import gradio, settings - -def generate_html(): +def generate_css(): css = """ - .character-gallery { + .character-gallery > .gallery { margin: 1rem 0; - display: grid; + display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-column-gap: 0.4rem; grid-row-gap: 1.2rem; } + .character-gallery > .label { + display: none !important; + } + .character-container { cursor: pointer; text-align: center; @@ -45,14 +48,16 @@ def generate_html(): overflow-wrap: anywhere; } """ + return css - container_html = f'