Variation Of The Nebular And Stellar Dust Attenuation Curve With Physical Properties Of Local And High-Redshift Star-Forming Galaxies