CM3Leon Versions Save

An open source implementation of "Scaling Autoregressive Multi-Modal Models: Pretraining and Instruction Tuning", an all-new multi modal AI that uses just a decoder to generate both text and images

0.1.2

8 months ago

Changelog

Bug 1: AttributeError: 'ViTransformerWrapper' object has no attribute 'patch_to_embeding' Description: The 'ViTransformerWrapper' object was trying to access an attribute 'patch_to_embeding' which did not exist.

Solution: The attribute name was likely misspelled. It should be 'patch_to_embedding' instead of 'patch_to_embeding'. The attribute name was corrected in the code.

Bug 2: IndexError: tuple index out of range Description: The code was trying to access an index that did not exist in the tuple x.shape.

Solution: Added a check to ensure that x has at least two dimensions before trying to access x.shape[1]. If x is a 1D tensor, an error message is raised.

Bug 3: TypeError: randint(): argument 'size' (position 2) must be tuple of ints, not int Description: The torch.randint() function was called with an integer as the second argument, but it expects a tuple to specify the size of the output tensor.

Solution: Changed the second argument of torch.randint() to a tuple. For example, if a 1D tensor with one element is needed, the corrected line is caption_tokens = torch.randint(0, 4, (1,)).

Bug 4: AttributeError: cannot assign module before Module.init() call Description: A module was assigned before calling the parent class's init() method.

Solution: Moved the super().init() call to the beginning of the init() method to ensure that the necessary setup is done before assigning submodules.