Inference without images

#36
by psologub - opened

Hi there,

is it possible to run inference without images?

When I tried, I got this error:

Traceback (most recent call last):
  File "<ipython-input-191-595c66deec92>", line 131, in get_transformers_response
    completion = model.generate(**inputs)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py", line 2231, in generate
    result = self._sample(
  File "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py", line 3222, in _sample
    outputs = self(**model_inputs, return_dict=True)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/llava_next/modeling_llava_next.py", line 874, in forward
    inputs_embeds = inputs_embeds.to(image_features.dtype)
AttributeError: 'NoneType' object has no attribute 'dtype'
Llava Hugging Face org

@psologub it should be possible but currently due it is broken, will fix it soon

@RaushanTurganbay May I know when it will be fixed??

Llava Hugging Face org

@khj4310 will be fixed after the release, and we already have a PR here https://github.com/huggingface/transformers/pull/34502

Feel free to install from PR in the meanwhile and I will try to merge it ASAP

is there any updates?

Sign up or log in to comment