`PreTrainedModel` will NOT inherit from `GenerationMixin`
Got an error:
From πv4.50π onwards, PreTrainedModel
will NOT inherit from GenerationMixin
, and this model will lose the ability to call generate
and other related functions.
- If you're using
trust_remote_code=True
, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes - If you are the owner of the model architecture code, please modify your model class such that it inherits from
GenerationMixin
(afterPreTrainedModel
, otherwise you'll get an exception). - If you are not the owner of the model architecture class, please contact the model code owner to update it.
in Florence2Run node in comfyui
have updated all the nodes, issue stays
you need to update your transfomers
How to do it ? I meant update transfomers
If you are embeded version of comfyUI:
you comfyui folder path\python_embeded\python.exe -m pip install -U transformers
No flash_attn import to remove
Florence2LanguageForConditionalGeneration has generative capabilities, as prepare_inputs_for_generation
is explicitly overwritten. However, it doesn't directly inherit from GenerationMixin
. From πv4.50π onwards, PreTrainedModel
will NOT inherit from GenerationMixin
, and this model will lose the ability to call generate
and other related functions.
- If you're using
trust_remote_code=True
, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes - If you are the owner of the model architecture code, please modify your model class such that it inherits from
GenerationMixin
(afterPreTrainedModel
, otherwise you'll get an exception). - If you are not the owner of the model architecture class, please contact the model code owner to update it.
I'm getting above error everytime when i try use