Blend two TPMS lattice structures. Gradient transition

Hi,
I need to create a multi-morphology TPMS lattice (e.g Gyroid+Diamond) with a smooth transition, so blend two types of unit cells, not only a classical linear transition but maybe layer-by-layer; or replace a unit cell locally where it is needed. Do you know how can I make this transition?

e.g. 1.PNG
e.g.2