The RNA world hypothesis suggests that RNA once catalyzed reactions now performed by proteins. Rediscovering these functions requires exploring sequence spaces beyond natural RNAs. While machine learning (ML)-based RNA design shows promise, it struggles to extrapolate beyond training data. In contrast, biophysics-based approaches leveraging RNA secondary (2D) structure operate independently of training data but are not tailored for functional discovery. We present a hybrid generative model that combines a Potts model with the thermodynamic folding model of RNA 2D structure. This approach disentangles folding contributions from functional signals, such as binding, enabling the data-driven component to focus on tertiary interactions and improving contact predictions. This disentanglement introduces structural imprinting, a novel strategy that uses structural variability to guide mutations, which showed great promise in uncovering hidden natural diversity. By bridging ML and biophysics, this model tackles the longstanding challenge of expanding diversity beyond the mere reproduction of the training data.