"docker/vscode:/vscode.git/clone" did not exist on "82c7e879876822864b5ceaf2c99eb01159266bcd"
Resolve AttributeError by utilizing device calculation at the start of the...
Resolve AttributeError by utilizing device calculation at the start of the forward function (#27347) This commit addresses the 'NoneType' object AttributeError within the IdeficsModel forward function. Previously, the 'device' attribute was accessed directly from input_ids, resulting in a potential 'NoneType' error. Now, the device is properly calculated at the beginning of the forward function and utilized consistently throughout, ensuring the 'image_hidden_states' are derived from the correct device. This modification enables smoother processing and compatibility, ensuring the correct device attribution for 'image_encoder_embeddings' in the IdeficsModel forward pass.
Showing
Please register or sign in to comment