If you want to invest in the red-hot cannabis industry to capture some of its formidable expected growth, you've probably already realized that there are a bunch of less-than-spectacular options out there. Many marijuana stocks boast unenviable features like abject unprofitability, weak revenue growth, and massive overhead costs.

The good news is that you don't need to buy into any of those subpar stocks and hope they turn around at some point -- you can just invest in a quality company instead. Both of the businesses I'll discuss today are profitable, rapidly growing, and strongly positioned to keep doing those two things for quite some time. And, as a bonus, they both pay dividends, so holding them for a long time will be especially lucrative.

A worker at a cannabis dispensary weighs two pieces of dried marijuana flower while standing behind a counter.

Image source: Getty Images.

1. Scotts Miracle-Gro

Scotts Miracle-Gro (SMG -1.25%) is worth holding for two decades because it's positioned to profit as the cannabis industry grows over time. Rather than selling marijuana products to consumers, the company's angle is providing cannabis businesses with the fertilizers and cultivation hardware, such as hydroponics equipment, that they need to survive and expand. So, if cannabis is legalized nationwide, the business will get a major inflow of new customers -- but if not, it will still be exposed to plenty of growth in demand in states where the plant is already legal in some form.

Scotts also has a burgeoning consumer gardening business selling pesticides, herbicides, and plant food. While this segment may not be as much of a growth driver, the diversification makes Scotts a safer investment, which is a significant consideration for a long-term holding. In other words, it won't require any new legislation to continue earning profits and growing revenue, nor does its success hinge on the continuation of the cannabis boom. 

Investors will also appreciate the stock's dividend, which might rise over time if its free cash flow continues to improve. Though its yield of 1.39% isn't much at the moment (about equal to the S&P 500's average), reinvesting it over the course of 20 years would result in major gains from compounding. And, to sweeten the deal even more, management has hinted at the possibility of special dividend payments that could begin in the near future.

^SPX Chart

^SPX data by YCharts

2. Innovative Industrial Properties

Much like Scotts Miracle-Gro, Innovative Industrial Properties (IIPR -0.82%) (IIP) provides a very important input to marijuana businesses. In this REIT's case, it's cash.

Because the legal environment of the U.S. is fractured and often restricted with regard to selling cannabis, it can be difficult for companies in the industry to get funding to fuel their expansion. But they can typically buy at least some real estate to use for growing and selling their products. IIP helps these companies convert their land and buildings into liquid capital by buying their real estate and then leasing it back to them. 

This business model means that Innovative Industrial Properties builds up a portfolio of income-bearing properties without needing to go through the trouble of finding tenants or constructing new spaces. And since its tenants need the floorspace to stay in business themselves, IIP's cash flows are highly reliable -- the weighted average length of its existing leases stands at 16.7 years. So, as the cannabis industry grows from its current size of $61 billion to reach an estimated size of $100 billion by 2030, it'll have plenty of new prospects clamoring for funding. And 20 years from now, its addressable market will likely be even larger, though it might have competing cannabis REITs to fend off before then.

But there is one risk that shareholders should be aware of. If cannabis is legalized in the U.S., IIP may have a harder time finding new real estate to buy from cultivators. Should traditional sources of financing become more available to the cannabis industry, the company's sale-leaseback transactions may not look as attractive as a bank loan. Still, that wouldn't disrupt the rental revenue from its current portfolio, nor would it preclude pivoting its business model to adjust to the new realities. 

As an REIT, IIP is obligated to pay out the vast majority of its taxable income to its investors on a quarterly basis. Right now, its dividend yield of 2.77% is a major part of the stock's appeal, and the company already has a history of raising it on a regular basis. Since the dividend's initiation at $0.15 in June 2017, IIP has increased it to $1.40 as of this June. So, investors who are willing to hold onto the stock for the next 20 years will see their cost basis driven down aggressively by each subsequent raise, likely resulting in massive returns. But, investors also need to be aware that they'll get taxed on the dividend payments, so it might be advantageous to hold the stock in a tax-sheltered account.