pipe: sketch state conversion