mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-29 02:49:30 +01:00
fix returned dtypes for LLaVA (#1547)
This commit is contained in:
parent
9b272bc8e5
commit
65beb51b0b
@ -245,7 +245,9 @@ def tokenizer_modifier(state, prompt, input_ids, input_embeds):
|
|||||||
|
|
||||||
prompt, input_ids, input_embeds, total_embedded = llava_embedder.forward(prompt, images, state)
|
prompt, input_ids, input_embeds, total_embedded = llava_embedder.forward(prompt, images, state)
|
||||||
print(f'LLaVA - Embedded {total_embedded} image(s) in {time.time()-start_ts:.2f}s')
|
print(f'LLaVA - Embedded {total_embedded} image(s) in {time.time()-start_ts:.2f}s')
|
||||||
return prompt, input_ids.unsqueeze(0).to(shared.model.device), input_embeds.unsqueeze(0).to(shared.model.device)
|
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))
|
||||||
|
|
||||||
|
|
||||||
def ui():
|
def ui():
|
||||||
|
Loading…
Reference in New Issue
Block a user