We recently introduced an animal model of incubation of methamphetamine craving after choice-based voluntary abstinence in male rats. Here we studied the generality of this phenomenon to (1) female rats, and (2) male and female rats with a history of heroin self-administration. We first trained rats to self-administer palatable food pellets for 6 days (6 h per day) for either methamphetamine (0.1 mg/kg/infusion) or heroin (0.1 mg/kg/infusion) for 12 days (6 h/day). We then assessed relapse to drug seeking under extinction conditions after 1 and 21 abstinence days. Between tests, the rats underwent either voluntary abstinence (achieved via a discrete choice procedure between drug and palatable food; 20 trials/day) or home-cage forced abstinence. We found no sex differences in methamphetamine self-administration or in the strong preference for the palatable food over methamphetamine during the choice-based voluntary abstinence. In both sexes, methamphetamine seeking in the relapse tests was higher after 21 days of either voluntary or forced abstinence than after 1 day (incubation of methamphetamine craving). We also found no sex differences in heroin self-administration or the strong preference for the palatable food over heroin during the choice-based voluntary abstinence. However, male and female rats with a history of heroin self-administration showed incubation of heroin craving after forced but not voluntary abstinence. Our results show that incubation of methamphetamine craving after voluntary abstinence generalizes to female rats. Unexpectedly, prolonged voluntary abstinence prevented the emergence of incubation of heroin craving in both sexes.