Skip to content

'BertLMHeadModel' object has no attribute 'generate' #555

@yesokyin

Description

@yesokyin

Traceback (most recent call last):
File "/Grounded-Segment-Anything-main/automatic_label_tag2text_demo.py", line 306, in
res = inference_tag2text(raw_image , tag2text_model, specified_tags)
File "/Grounded-Segment-Anything-main/recognize-anything/ram/inference.py", line 11, in inference_tag2text
caption, tag_predict = model.generate(image,
File "/Grounded-Segment-Anything-main/recognize-anything/ram/models/tag2text.py", line 355, in generate
outputs = self.text_decoder.generate(
File "/granded_sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1931, in getattr
raise AttributeError(
AttributeError: 'BertLMHeadModel' object has no attribute 'generate'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions