<PAGE>   1

                                                                    EXHIBIT 10.4

                        AMENDMENT NO. 2 AND WAIVER TO THE
                             STOCKHOLDERS' AGREEMENT


         AMENDMENT NO. 2 dated as of July 25, 2001 (this "Amendment") to the
Stockholders' Agreement dated as of February 25, 1998 as amended on December 18,
1998 (the "Stockholders' Agreement") by and among Universal Hospital Services,
Inc., a Minnesota corporation (the "Company"), those persons listed as the
Management Holders on the signature pages herein (the "Management Holders") and
those persons listed as the JWC Holders on the signature pages herein (the "JWC
Holders"). Capitalized terms used and not defined herein shall have the meanings
ascribed to them in the Stockholders' Agreement.

         On the date of this Amendment, the Company intends to offer its Common
Stock in an initial public offering, in which UBS Warburg and U.S. Bancorp Piper
Jaffray are acting as co-lead underwriters (the "Offering").

         The JWC Holders desire, and the Company and the Management Holders
agree, that certain provisions of the Stockholders' Agreement be amended in
certain respects in connection with the Offering.

         Pursuant to Section 4.2 of the Stockholders' Agreement, any amendment
to the Stockholders' Agreement must be in writing (other than certain amendments
to the Schedule of Stockholders) and shall require the written consent of (a)
the Company, (b) either the JWC Representative or the holders of a majority of
Common Stock Equivalents at the time held by the JWC Holders and (c) if adverse
to the interests of a particular Stockholder or Stockholder Group, that
Stockholder or the holders of a majority of the Common Stock Equivalents at the
time held by that Stockholder Group, as the case may be.

         The Management Holders executing and delivering this Amendment hold
more than a majority of the Common Stock Equivalents held by all the Management
Holders as of the date of this Amendment. The JWC Representative executing and
delivering this Amendment has the power and authority to so execute and deliver
this amendment on behalf of the JWC Holders.

         In consideration of the foregoing, the parties hereto, intending to be
legally bound, hereby agree as follows:

         1. Clause (ii) of Section 3.2 of the Stockholders' Agreement is hereby
restated in its entirety as follows:

         (ii) second, the Registrable Securities, sought to be included in such
     registration by each Holder pro rata with the Common Stock Equivalents
     sought to be included in such registration by ReliaStar Financial Corp. (or
     its transferees, if any) so that each Holder and ReliaStar Financial Corp.
     (or its transferees, if any) shall be on a parity basis with respect to
     each other as to the number of shares included in or underlying the Common
     Stock Equivalents which are included in such registration by each of them
     as a percentage of those sought to be included; provided, however, that in
     the case of the


<PAGE>   2


     initial public offering of the Common Stock, in which UBS Warburg and U.S.
     Bancorp Piper Jaffray are acting as co-lead underwriters as contemplated as
     of the date of this amendment, Registrable Securities for the account of
     any JWC Holders or for the account of ReliaStar Financial Corp. (or its
     transferees, if any) shall be included prior to Registrable Securities for
     the account of any other Holders.

         2. This Amendment shall be effective as of the date hereof, and except
as set forth herein, the Stockholders' Agreement remains in full force and
effect and is otherwise unaffected and unaltered by this Amendment.

         3. This Amendment may be executed in two or more counterparts, each of
which shall be deemed an original but all of which together shall constitute one
and the same instrument, and all signatures need not appear on any one
counterpart. A facsimile or photocopy of an executed counterpart of this
Amendment shall be sufficient to bind the party or parties whose signature(s)
appear thereon.



                                       2
<PAGE>   3



                        UNIVERSAL HOSPITAL SERVICES, INC.

                        Amendment No. 2 and Waiver to the
                             Stockholders' Agreement


                           Counterpart Signature Page

         This Amendment is executed under SEAL as of this ___ day of July, 2001.


                               THE COMPANY:

                               UNIVERSAL HOSPITAL SERVICES, INC.


                               -----------------------------------------------
                               David E. Dovenberg
                               President and Chief Executive Officer



                               THE JWC REPRESENTATIVE:


                               By:
                                  --------------------------------------------
                                  Steven G. Segal, as the JWC Representative
                                  pursuant to Section 4.8 of the Stockholders'
                                  Agreement



                               THE MANAGEMENT HOLDERS:


                               -----------------------------------------------




                                       3