Even after increasing the number of parameters and becoming egregiously slow , it still is unable to generate images, I m assuming its overfitting but I cant say for certain. even though it reach loss levels similar to the fully connected model it doesn’t perform as good.
class Model(nn.Module):
    def __init__(self):
        super().__init__()

        self.encoder = nn.Sequential(
        nn.Conv2d(in_channels=1, out_channels=24, kernel_size=3, stride=2, padding=1),
        nn.LeakyReLU(),
        nn.Conv2d(in_channels=24, out_channels=48, kernel_size=3, stride=2, padding=1),
        nn.LeakyReLU(),
        nn.Conv2d(in_channels=48, out_channels=96, kernel_size=3)
        )

        self.fc1 = nn.Linear(in_features=96*5*5, out_features=1200)
        self.fc2 = nn.Linear(in_features=1200, out_features=600)
        self.fc_mu = nn.Linear(in_features=600, out_features=20)
        self.fc_logvar = nn.Linear(in_features=600, out_features=20)

        self.conv5 =  nn.Linear(in_features=20, out_features=96*5*5) 


        self.decoder = nn.Sequential(
            nn.ConvTranspose2d(in_channels=96, out_channels=48, kernel_size=3),
            nn.LeakyReLU(),
            nn.ConvTranspose2d(in_channels=48, out_channels=24, kernel_size=3, stride=2, padding=1, output_padding=1),
            nn.LeakyReLU(),
            nn.ConvTranspose2d(in_channels=24, out_channels=1, kernel_size=3, stride=2, padding=1, output_padding=1),
            nn.Sigmoid()
        )


    def passToEnoch(self, image):

        t = image

        t = self.encoder(t)
        t = self.fc1(t.reshape(100,-1))
        t = self.fc2(t)
        mu = self.fc_mu(t)
        logvar = self.fc_logvar(t)

        return mu, logvar

    def passToDenoch(self, BN):

        t = BN
       
        t = t.reshape(100,96,5,5)
        t = self.decoder(t)
        GenImg = t

        return GenImg
    
    def Reparameterise(self, mean, logvar):
       
        std = logvar.mul(0.5).exp_()
        eps = std.data.new(std.size()).normal_()
        return eps.mul(std).add_(mean)
        

    def forward(self, image):

        mu, logvar = self.passToEnoch(image)

        
        z = self.Reparameterise(mu, logvar)
        z = self.conv5(z)

        construction = self.passToDenoch(z)
        
        return construction, mu, logvar

epoch 0 total_loss_1: 254.0756600423177 reconstruction_loss:  231.1596802246094 KLD:  22.915979824928442
epoch 1 total_loss_1: 141.40640200195313 reconstruction_loss:  116.31750934244792 KLD:  25.08889241129557
epoch 2 total_loss_1: 126.85437965494792 reconstruction_loss:  100.08900904947917 KLD:  26.765370650227865
epoch 3 total_loss_1: 120.90743160807291 reconstruction_loss:  93.52300227864583 KLD:  27.38442930094401
epoch 4 total_loss_1: 117.74371357421875 reconstruction_loss:  90.27648059895833 KLD:  27.467232918294272
epoch 5 total_loss_1: 115.44130123697917 reconstruction_loss:  87.98953850911458 KLD:  27.451762455240885
epoch 6 total_loss_1: 113.64397905273438 reconstruction_loss:  86.25507771809896 KLD:  27.388901236979166
epoch 7 total_loss_1: 112.21055922851562 reconstruction_loss:  84.92787290852864 KLD:  27.282686189778644
epoch 8 total_loss_1: 111.06344233398437 reconstruction_loss:  83.91212922363282 KLD:  27.15131326904297
epoch 9 total_loss_1: 110.11857666015625 reconstruction_loss:  83.0612642171224 KLD:  27.05731242675781
epoch 10 total_loss_1: 109.25627236328125 reconstruction_loss:  82.33233040364583 KLD:  26.92394188639323
epoch 11 total_loss_1: 108.61756567382812 reconstruction_loss:  81.75407697753906 KLD:  26.863488631184897
epoch 12 total_loss_1: 108.02086090494792 reconstruction_loss:  81.28328525390624 KLD:  26.737575720214842
epoch 13 total_loss_1: 107.53491346028646 reconstruction_loss:  80.84818310546875 KLD:  26.686730619303386
epoch 14 total_loss_1: 107.04162428385416 reconstruction_loss:  80.43439178873697 KLD:  26.607232442220052
epoch 15 total_loss_1: 106.61778201497395 reconstruction_loss:  80.10782824707032 KLD:  26.509954032389324
epoch 16 total_loss_1: 106.26496030273438 reconstruction_loss:  79.8152283203125 KLD:  26.449732063802085
epoch 17 total_loss_1: 105.94519632161459 reconstruction_loss:  79.5302062906901 KLD:  26.414990108235678
epoch 18 total_loss_1: 105.67471401367187 reconstruction_loss:  79.33153162434895 KLD:  26.343182397460936
epoch 19 total_loss_1: 105.33589560546875 reconstruction_loss:  79.04250388183594 KLD:  26.293391638183593