cyan2k / molmo-7b-bnb-4bit

4bit bitsandbytes quants of the best 7B vlms
Apache License 2.0
17 stars 2 forks source link

problem with image normalization #6

Open zoldaten opened 2 weeks ago

zoldaten commented 2 weeks ago

not working with .png: ValueError: operands could not be broadcast together with shapes (560,560,4) (1,1,3) (560,560,4)

C:\Users{user}.cache\huggingface\modules\transformers_modules\cyan2k\molmo-7B-D-bnb-4bit\51097c4251a023d72485963c1ab69f3b6d6a1ec6\image_preprocessing_molmo.py

def normalize_image(image, offset, scale):
    print(image.shape) #(784, 784, 3)  #(784, 1008, 4) - not working
    image -= np.array(offset, dtype=np.float32)[None, None, :]
    image /= np.array(scale, dtype=np.float32)[None, None, :]
    return image

could be fixed ?

cyan2k commented 1 week ago

should be fixed, because preprocessing happens on our side now. Can you confirm?