using the model

#2
by AmmarYasser - opened

when i run the code
from transformers import AutoModel
from PIL import Image
model = AutoModel.from_pretrained("ECOFRI/CXR-LLAVA-v2", trust_remote_code=True)
model = model.to("cuda")
cxr_image = Image.open("img.jpg")
response = model.write_radiologic_report(cxr_image)

it gives me that error :
ValueError: The model class you are passing has a config_class attribute that is not consistent with the config class you passed (model has <class 'transformers_modules.ECOFRI.CXR-LLAVA-v2.b2224786bb90d54b1e1291171866706cfbb44e2b.CXR_LLAVA_HF.CXRLLAVAConfig'> and you passed <class 'transformers_modules.ECOFRI.CXR-LLAVA-v2.b2224786bb90d54b1e1291171866706cfbb44e2b.CXR_LLAVA_HF.CXRLLAVAConfig'>. Fix one of those so they match!

and i dont know how to fix that error

AmmarYasser changed discussion status to closed

Sign up or log in to comment