Other factors that play a role in ketosis
Carb intake isn’t the only thing you should be watching on the keto diet, protein and fat are important as well.
Protein is a sating macronutrient that keeps you full while keeping cravings at bay, resulting in consumption of fewer calories. Unlike carbs, protein is a vital component to a healthy diet. A moderate amount of protein promotes muscle preservation and growth while allowing you to stay in ketosis. Protein also increases energy enabling you to burn more calories.
A word of caution though, protein increases insulin when ingested in high quantities. The amount of protein you should incorporate into your diet depends on weight, age, gender, and activity level.
Use this simple equation to find the amount of protein you should be consuming on a daily basis:
Your weight in lbs x 0.6 = minimum daily protein consumption
Your weight in lbs x 1.0 = maximum daily protein consumption
By staying within the range calculated above, you will be able to maintain muscle mass while staying in ketosis.

When following the keto diet, a majority (60%-75%) of your calories should be derived from fats. Fat does not stimulate insulin secretion