I'm suffering from a problem of an "ZeroDivisionError: division by zero" Error in functions.py in training phase.
def get_object_localization_loss( cross_attention_scores, object_segmaps, image_token_idx, image_token_idx_mask, loss_fn, ): num_layers = len(cross_attention_scores) loss = 0 for k, v in cross_attention_scores.items(): layer_loss = get_object_localization_loss_for_one_layer( v, object_segmaps, image_token_idx, image_token_idx_mask, loss_fn ) loss += layer_loss return loss / num_layers
Seems that the cross_attention_scores has remained empty since initializing self.unet in ConsistentID model.
The environment has been set up as [requirements.txt].
How can I fix this?
Is there anyone facing the same problem?
Hi, @JackAILab Fascinating job!
I'm suffering from a problem of an "ZeroDivisionError: division by zero" Error in functions.py in training phase.
def get_object_localization_loss( cross_attention_scores, object_segmaps, image_token_idx, image_token_idx_mask, loss_fn, ): num_layers = len(cross_attention_scores) loss = 0 for k, v in cross_attention_scores.items(): layer_loss = get_object_localization_loss_for_one_layer( v, object_segmaps, image_token_idx, image_token_idx_mask, loss_fn ) loss += layer_loss return loss / num_layers
Seems that the cross_attention_scores has remained empty since initializing self.unet in ConsistentID model. The environment has been set up as [requirements.txt]. How can I fix this? Is there anyone facing the same problem?