Which anime? I don't watch much anime so it's unlikely, although one loose inspiration was Sarazanmai!
I was talking about Made in Abyss, it just seemed a bit similar.