AttributeError: 'Qwen2ForCausalLM' object has no attribute 'diffusion_generate'

#1
by happyme531 - opened

Tried running the example code in How to Use section in readme, but encountered this error:

`torch_dtype` is deprecated! Use `dtype` instead!
The following generation flags are not valid and may be ignored: ['temperature', 'top_k']. Set `TRANSFORMERS_VERBOSITY=info` for more details.
Traceback (most recent call last):
  File "/data007/zt/llm/open-dcoder-0.5B/./test_hf.py", line 55, in <module>
    outputs = model.diffusion_generate(
  File "/data007/zt/llm/open-dcoder-0.5B/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1931, in __getattr__
    raise AttributeError(
AttributeError: 'Qwen2ForCausalLM' object has no attribute 'diffusion_generate'

ya it's not supported by huggingface yet u should use the github code to run inference

Sign up or log in to comment