Prevent unwanted log messages from modules
This commit is contained in:
parent
fb91406e93
commit
e116d31180
20 changed files with 120 additions and 111 deletions
|
@ -1,5 +1,4 @@
|
|||
import base64
|
||||
import logging
|
||||
import re
|
||||
import time
|
||||
from functools import partial
|
||||
|
@ -10,6 +9,7 @@ import torch
|
|||
|
||||
from extensions.multimodal.multimodal_embedder import MultimodalEmbedder
|
||||
from modules import shared
|
||||
from modules.logging_colors import logger
|
||||
|
||||
params = {
|
||||
"add_all_images_to_prompt": False,
|
||||
|
@ -78,7 +78,7 @@ def tokenizer_modifier(state, prompt, input_ids, input_embeds):
|
|||
return prompt, input_ids, input_embeds
|
||||
|
||||
prompt, input_ids, input_embeds, total_embedded = multimodal_embedder.forward(prompt, state, params)
|
||||
logging.info(f'Embedded {total_embedded} image(s) in {time.time()-start_ts:.2f}s')
|
||||
logger.info(f'Embedded {total_embedded} image(s) in {time.time()-start_ts:.2f}s')
|
||||
return (prompt,
|
||||
input_ids.unsqueeze(0).to(shared.model.device, dtype=torch.int64),
|
||||
input_embeds.unsqueeze(0).to(shared.model.device, dtype=shared.model.dtype))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue