You can find Ditto in Giant Chasm at any point after you gain access to it, which is after defeating the Gym Leader in Nacrene City.
However, you'll need to have a Pokémon that can learn the move "Sweet Scent" to help you locate Ditto. This move will make wild Pokémon appear more frequently, increasing your chances of encountering Ditto.
Here's a breakdown of how to find Ditto:
1. Defeat the Nacrene City Gym Leader to gain access to Giant Chasm.
2. Learn the "Sweet Scent" move: This can be learned by several Pokémon, like the Budew you can find near Nacrene City.
3. Enter Giant Chasm: This area is located to the east of Nacrene City.
4. Use "Sweet Scent" to increase your chances of encountering Ditto.
5. Keep exploring Giant Chasm: Ditto is a rare encounter, so you may need to explore for a while before finding one.
Note: The "Sweet Scent" move is crucial for finding Ditto, as it will significantly increase your chances of encountering this rare Pokémon.