Skip to content

Commit

Permalink
Merge pull request #5152 from oobabooga/dev
Browse files Browse the repository at this point in the history
Merge dev branch
  • Loading branch information
oobabooga authored Jan 2, 2024
2 parents 3e3a66e + 7cce88c commit 3f28925
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions css/chat_style-cai-chat.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.message {
display: grid;
grid-template-columns: 60px minmax(0, 1fr);
padding-bottom: 25px;
padding-bottom: 15px;
font-size: 15px;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 22.5px !important;
Expand Down Expand Up @@ -52,10 +52,6 @@
margin-bottom: 10px !important;
}

.message-body p:last-child, .chat .message-body ul:last-child, .chat .message-body ol:last-child {
margin-bottom: 0 !important;
}

.dark .message-body p em {
color: rgb(138 138 138) !important;
}
Expand Down
4 changes: 4 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
left: calc(100% - 168px);
}

#show-controls span {
opacity: 0.6;
}

#typing-container {
display: none;
position: absolute;
Expand Down
3 changes: 0 additions & 3 deletions modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def load_tokenizer(model_name, model):


def huggingface_loader(model_name):

path_to_model = Path(f'{shared.args.model_dir}/{model_name}')
params = {
'low_cpu_mem_usage': True,
Expand Down Expand Up @@ -170,10 +169,8 @@ def huggingface_loader(model_name):

# Load with quantization and/or offloading
else:

if not any((shared.args.cpu, torch.cuda.is_available(), is_xpu_available(), torch.backends.mps.is_available())):
logger.warning('torch.cuda.is_available() and is_xpu_available() returned False. This means that no GPU has been detected. Falling back to CPU mode.')

shared.args.cpu = True

if shared.args.cpu:
Expand Down
1 change: 0 additions & 1 deletion modules/ui_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ def create_event_handlers():
shared.gradio['mode'].change(
lambda x: gr.update(visible=x != 'instruct'), gradio('mode'), gradio('chat_style'), show_progress=False).then(
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
partial(chat.character_is_loaded, raise_exception=True), gradio('interface_state'), None).success(
chat.load_latest_history, gradio('interface_state'), gradio('history')).then(
chat.redraw_html, gradio(reload_arr), gradio('display')).then(
lambda x: gr.update(choices=(histories := chat.find_all_histories(x)), value=histories[0]), gradio('interface_state'), gradio('unique_id'))
Expand Down

0 comments on commit 3f28925

Please sign in to comment.