Numerous clinical applications rely on automated liver segmentation from medical images, but deep learning models' generalizability across many imaging modalities is still a major challenge. This study presents a detailed evaluation framework of U-Net-based models for liver segmentation by comparing four distinct pre-trained encoders: ResNet18, EfficientNetB3, DenseNet121, and MobileNetV2. The models were evaluated on three separate external validation datasets, which comprised both Magnetic Resonance Imaging (MRI) and Computed Tomography (CT) scans, after being trained on the LiverHccSeg (MRI) dataset. The external validation datasets were 3D-IRCADb-01 (CT), CHAOS (MRI), and SLiver07 (CT). All models showed strong results on the main MRI test set, with the DenseNet121 encoder achieving the best Dice Similarity Coefficient (DSC) of 0.928. On the other hand, the EfficientNetB3 encoder showed better generalization during external validation, with a DSC of 0.825 for CT on the 3D-IRCADb-01 dataset and 0.852 for the MRI dataset.