@@ -1840,7 +1840,7 @@ def create_completion(stop):
1840
1840
class Llava15ChatHandler :
1841
1841
_clip_free = None
1842
1842
1843
- def __init__ (self , clip_model_path : str , verbose : bool = False ):
1843
+ def __init__ (self , clip_model_path : str , verbose : bool = False ):
1844
1844
import llama_cpp .llava_cpp as llava_cpp
1845
1845
1846
1846
self ._llava_cpp = llava_cpp
@@ -1957,21 +1957,21 @@ def __call__(
1957
1957
with suppress_stdout_stderr (disable = self .verbose ):
1958
1958
embed = (
1959
1959
self ._llava_cpp .llava_image_embed_make_with_bytes (
1960
- ctx_clip = self .clip_ctx ,
1961
- n_threads = llama .context_params .n_threads ,
1962
- image_bytes = c_ubyte_ptr ,
1963
- image_bytes_length = len (image_bytes ),
1960
+ self .clip_ctx ,
1961
+ llama .context_params .n_threads ,
1962
+ c_ubyte_ptr ,
1963
+ length = len (image_bytes ),
1964
1964
)
1965
1965
)
1966
1966
try :
1967
1967
n_past = ctypes .c_int (llama .n_tokens )
1968
1968
n_past_p = ctypes .pointer (n_past )
1969
1969
with suppress_stdout_stderr (disable = self .verbose ):
1970
1970
self ._llava_cpp .llava_eval_image_embed (
1971
- ctx_llama = llama .ctx ,
1972
- embed = embed ,
1973
- n_batch = llama .n_batch ,
1974
- n_past = n_past_p ,
1971
+ llama .ctx ,
1972
+ embed ,
1973
+ llama .n_batch ,
1974
+ n_past_p ,
1975
1975
)
1976
1976
assert llama .n_ctx () >= n_past .value
1977
1977
llama .n_tokens = n_past .value
0 commit comments