Only 'detract' works in this context; however, you must add the word 'from' to maintain standard English prose.
The cloudy weather did not detract from the beautiful view of the valley.
If you don't want to add 'from,' then you could substitute 'detract' with 'obscure' or 'diminish.'