The unfolding transformation has been widely used in many declarative frameworks for improving the efficiency of programs. Inspired by our previous experiences in fuzzy logic languages not dealing with similarity relations, in this work we try to adapt such operation to the so-called FASILL language (acronym of «Fuzzy Aggregators and Similarity Into a Logic Language») which has been developed in our research group for coping with implicit/explicit truth degree annotations, a great variety of connectives and unification by similarity. The traditional unfolding transformation is based on the application of unifiers on the heads and computational steps on the bodies of program rules. However, when considering similarity relations, the premature generation and application of weak (similarity-based) unifers at unfolding time could destroy the correctness of the transformation. In this paper we study how to avoid this risk by compiling what we call similarity constraints on transformed rules, whose further evaluation is delayed at running time. Moreover, our technique minimizes the size and number of occurrences of such constructs in transformed programs to gain efficiency while preserving semantics.