Use dataserver to restore the model database without affecting master.
dataserver -d /devname -w model
sqlsrvr -d physicalname -w model
If you can issue use model successfully, you can restore your model database from a backup with load database.
Issue the dataserver command described above.
Reissue all the commands you issued to change model.