**Algorithm 1:** Unsupervised Virtual Try-on (UVIRT) |

**Require:** The weight of latent ${L}_{1}$ loss ${\lambda}_{latent}$, the weight of pixel ${L}_{1}$ loss ${\lambda}_{pixel}$, the weight of whitening regularization loss ${\lambda}_{w}$, the weight of coloring regularization loss ${\lambda}_{c}$, the batchsize m, Adam
hyperparameters $\alpha {\beta}_{1},{\beta}_{2}$ |

**Require:** Initial style and content encoder parameters in domain $\mathcal{A}$ and $\mathcal{B}$ ${\varphi}_{{s}_{\mathcal{A}}},{\varphi}_{{s}_{\mathcal{B}}},{\varphi}_{{c}_{\mathcal{A}}},{\varphi}_{{c}_{\mathcal{B}}}$, initial
decoder parameters in domain $\mathcal{A}$ and $\mathcal{B}$${\theta}_{\mathcal{A}},{\theta}_{\mathcal{B}}$, initial discriminator parameters in domain $\mathcal{A}$ and $\mathcal{B}$${\psi}_{\mathcal{A}},{\psi}_{\mathcal{B}}$ |

**while**$\varphi ,\theta $ has not converged **do** |

**for**$i=1,\dots ,m$**do** |

Sample each domain real data ${x}_{\mathcal{A}}\sim {p}_{dat{a}_{\mathcal{A}}}\left(x\right),{x}_{\mathcal{B}}\sim {p}_{dat{a}_{\mathcal{B}}}\left(x\right)$ |

${s}_{\mathcal{A}},{s}_{\mathcal{B}}={StyleEncoder}_{{\varphi}_{{s}_{\mathcal{A}}}}\left({x}_{\mathcal{A}}\right),{StyleEncoder}_{{\varphi}_{{s}_{\mathcal{B}}}}\left({x}_{\mathcal{B}}\right)$ |

${c}_{\mathcal{A}},{c}_{\mathcal{B}}={ContentEncoder}_{{\varphi}_{{c}_{\mathcal{A}}}}\left({x}_{\mathcal{A}}\right),{ContentEncoder}_{{\varphi}_{{c}_{\mathcal{B}}}}\left({x}_{\mathcal{B}}\right)$ |

${c}_{\mathcal{BA}},{c}_{\mathcal{AB}}={GDWCT}_{{\theta}_{\mathcal{A}}}({c}_{\mathcal{B}},{s}_{\mathcal{A}}),{GDWCT}_{{\theta}_{\mathcal{B}}}({c}_{\mathcal{A}},{s}_{\mathcal{B}})$ |

${x}_{\mathcal{BA}},{x}_{\mathcal{AB}}={Decoder}_{{\theta}_{\mathcal{A}}}\left({c}_{\mathcal{BA}}\right),{Decoder}_{{\theta}_{\mathcal{B}}}\left({c}_{\mathcal{AB}}\right)$ |

${\mathcal{L}}_{{D}_{adv}}^{\mathcal{A}},{\mathcal{L}}_{{G}_{adv}}^{\mathcal{A}}\leftarrow \frac{1}{2}{\left({D}_{{\psi}_{\mathcal{A}}}\left({x}_{\mathcal{A}}\right)-1\right)}^{2}+\frac{1}{2}{\left({D}_{{\psi}_{\mathcal{A}}}\left({x}_{\mathcal{BA}}\right)\right)}^{2},\phantom{\rule{1.em}{0ex}}\frac{1}{2}{\left({D}_{{\psi}_{\mathcal{A}}}\left({x}_{\mathcal{BA}}\right)-1\right)}^{2}$ |

${\mathcal{L}}_{{D}_{adv}}^{\mathcal{B}},{\mathcal{L}}_{{G}_{adv}}^{\mathcal{B}}\leftarrow \frac{1}{2}{\left({D}_{{\psi}_{\mathcal{B}}}\left({x}_{\mathcal{B}}\right)-1\right)}^{2}+\frac{1}{2}{\left({D}_{{\psi}_{\mathcal{B}}}\left({x}_{\mathcal{AB}}\right)\right)}^{2},\phantom{\rule{1.em}{0ex}}\frac{1}{2}{\left({D}_{{\psi}_{\mathcal{B}}}\left({x}_{\mathcal{AB}}\right)-1\right)}^{2}$ |

$\psi \leftarrow Adam\left({\nabla}_{{\psi}_{\mathcal{A}},{\psi}_{\mathcal{B}}}\frac{1}{m}{\sum}_{i=1}^{m}{\mathcal{L}}_{{D}_{adv}}^{\mathcal{A}}+{\mathcal{L}}_{{D}_{adv}}^{\mathcal{B}},{\psi}_{\mathcal{A}}+{\psi}_{\mathcal{B}},\alpha ,{\beta}_{1}{\beta}_{2}\right)$ |

${s}_{\mathcal{BA}},{s}_{\mathcal{AB}}={StyleEncoder}_{{\varphi}_{{s}_{\mathcal{A}}}}\left({x}_{\mathcal{BA}}\right),{StyleEncoder}_{{\varphi}_{{s}_{\mathcal{B}}}}\left({x}_{\mathcal{AB}}\right)$ |

${c}_{\mathcal{BA}},{c}_{\mathcal{AB}}={ContentEncoder}_{{\varphi}_{{c}_{\mathcal{A}}}}\left({x}_{\mathcal{BA}}\right),{ContentEncoder}_{{\varphi}_{{c}_{\mathcal{B}}}}\left({x}_{\mathcal{AB}}\right)$ |

${c}_{\mathcal{ABA}},{c}_{\mathcal{BAB}}={GDWCT}_{{\theta}_{\mathcal{A}}}({c}_{\mathcal{AB}},{s}_{\mathcal{BA}}),{GDWCT}_{{\theta}_{\mathcal{B}}}({c}_{\mathcal{BA}},{s}_{\mathcal{AB}})$ |

${x}_{\mathcal{ABA}},{x}_{\mathcal{BAB}}={Decoder}_{{\theta}_{\mathcal{A}}}\left({c}_{\mathcal{ABA}}\right),{Decoder}_{{\theta}_{\mathcal{B}}}\left({c}_{\mathcal{BAB}}\right)$ |

${c}_{\mathcal{AA}},{c}_{\mathcal{BB}}={GDWCT}_{{\theta}_{\mathcal{A}}}({c}_{\mathcal{A}},{s}_{\mathcal{A}}),{GDWCT}_{{\theta}_{\mathcal{B}}}({c}_{\mathcal{B}},{s}_{\mathcal{B}})$ |

${x}_{\mathcal{AA}},{x}_{\mathcal{BB}}={Decoder}_{{\theta}_{\mathcal{A}}}\left({c}_{\mathcal{AA}}\right),{Decoder}_{{\theta}_{\mathcal{B}}}\left({c}_{\mathcal{BB}}\right)$ |

${\mathcal{L}}_{s}^{\mathcal{BA}},{\mathcal{L}}_{s}^{\mathcal{AB}}\leftarrow {\u2225{s}_{\mathcal{BA}}-{s}_{\mathcal{A}}\u2225}_{1},{\u2225{s}_{\mathcal{AB}}-{s}_{\mathcal{B}}\u2225}_{1}$ |

${\mathcal{L}}_{c}^{\mathcal{BA}},{\mathcal{L}}_{c}^{\mathcal{AB}}\leftarrow {\u2225{c}_{\mathcal{BA}}-{c}_{\mathcal{B}}\u2225}_{1},{\u2225{c}_{\mathcal{AB}}-{c}_{\mathcal{A}}\u2225}_{1}$ |

${\mathcal{L}}_{cyc}^{\mathcal{ABA}},{\mathcal{L}}_{cyc}^{\mathcal{BAB}}\leftarrow {\u2225{x}_{\mathcal{ABA}}-{x}_{\mathcal{A}}\u2225}_{1},{\u2225{x}_{\mathcal{BAB}}-{x}_{\mathcal{B}}\u2225}_{1}$ |

${\mathcal{L}}_{i}^{\mathcal{AA}},{\mathcal{L}}_{i}^{\mathcal{BB}}\leftarrow {\u2225{x}_{\mathcal{AA}}-{x}_{\mathcal{A}}\u2225}_{1},{\u2225{x}_{\mathcal{BB}}-{x}_{\mathcal{B}}\u2225}_{1}$ |

${\Sigma}_{c}^{\mathcal{B}},{\Sigma}_{c}^{\mathcal{A}}=ComputeCovariance\left({c}_{\mathcal{B}}\right),ComputeCovariance\left({c}_{\mathcal{A}}\right)$ |

${\mathcal{R}}_{w}^{\mathcal{B}},{\mathcal{R}}_{w}^{\mathcal{A}}\leftarrow {\u2225{\Sigma}_{c}^{\mathcal{B}}-I\u2225}_{1},{\u2225{\Sigma}_{c}^{\mathcal{A}}-I\u2225}_{1}$ |

$U{D}^{\mathcal{A}},U{D}^{\mathcal{B}}={s}_{\mathcal{A}}^{CT},{s}_{\mathcal{B}}^{CT}$ |

${D}^{\mathcal{A}},{D}^{\mathcal{B}}=Compute{L}_{2}Norm\left({s}_{\mathcal{A}}^{CT}\right),Compute{L}_{2}Norm\left({s}_{\mathcal{B}}^{CT}\right)$ |

${U}^{\mathcal{A}},{U}^{\mathcal{B}}=\frac{U{D}^{\mathcal{A}}}{{D}^{\mathcal{A}}},\frac{U{D}^{\mathcal{B}}}{{D}^{\mathcal{B}}}$ |

${\mathcal{R}}_{c}^{\mathcal{A}},{\mathcal{R}}_{c}^{\mathcal{B}}\leftarrow {\u2225{U}_{\mathcal{A}}^{T}{U}_{\mathcal{A}}-I\u2225}_{1},{\u2225{U}_{\mathcal{B}}^{T}{U}_{\mathcal{B}}-I\u2225}_{1}$ |

$\varphi ,\theta \leftarrow Adam({\nabla}_{{\varphi}_{{s}_{\mathcal{A}}},{\varphi}_{{s}_{\mathcal{B}}},{\varphi}_{{c}_{\mathcal{A}}},{\varphi}_{{c}_{\mathcal{B}}},{\theta}_{\mathcal{A}},{\theta}_{\mathcal{B}}}\frac{1}{m}{\sum}_{i=1}^{m}{\lambda}_{lantent}\left({\mathcal{L}}_{s}^{\mathcal{BA}}+{\mathcal{L}}_{s}^{\mathcal{AB}}+{\mathcal{L}}_{c}^{\mathcal{BA}}+{\mathcal{L}}_{c}^{\mathcal{AB}}\right)+$ |

${\lambda}_{pixel}\left({\mathcal{L}}_{cyc}^{\mathcal{ABA}}+{\mathcal{L}}_{cyc}^{\mathcal{BAB}}+{\mathcal{L}}_{i}^{\mathcal{AA}}+{\mathcal{L}}_{i}^{\mathcal{BB}}\right)+{\lambda}_{w}\left({\mathcal{R}}_{w}^{\mathcal{B}}+{\mathcal{R}}_{w}^{\mathcal{A}}\right)+{\lambda}_{c}\left({\mathcal{R}}_{c}^{\mathcal{B}}+{\mathcal{R}}_{c}^{\mathcal{A}}\right)+{\mathcal{L}}_{{D}_{adv}}^{\mathcal{B}}+{\mathcal{L}}_{{G}_{adv}}^{\mathcal{B}},$ |

${\varphi}_{{s}_{\mathcal{A}}}+{\varphi}_{{s}_{\mathcal{B}}}+{\varphi}_{{c}_{\mathcal{A}}}+{\varphi}_{{c}_{\mathcal{B}}}+{\theta}_{\mathcal{A}}+{\theta}_{\mathcal{B}},\alpha ,{\beta}_{1}{\beta}_{2})$ |

**end for** |

**end while** |