-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation of process of setting up the environment to run o…
…n compute nodes. Added python script to download and save models from Huggingface.
- Loading branch information
Tyler Sweat
committed
Feb 13, 2023
1 parent
86e7c1f
commit 7035c6a
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from pipeline_attend_and_excite import AttendAndExcitePipeline | ||
|
||
model = input("Huggingface model to save: ") | ||
modelname = input("Model name to save to ./models: ") | ||
|
||
stable = AttendAndExcitePipeline.from_pretrained(model) | ||
|
||
stable.save_pretrained(f"./models/{modelname}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Environment setup for sending batch Attend and Excite jobs | ||
|
||
If the `miniconda3` module is not yet loaded, run: | ||
`module load miniconda3` | ||
|
||
Create the latent diffusion model environment, `ldm`, by running: | ||
`conda env create -f environment.yaml` | ||
|
||
Add the following to `~/.bashrc` | ||
|
||
```bash | ||
# Activate ldm conda environment. | ||
conda activate ldm | ||
|
||
# Add LD_LIBRARY_PATH | ||
export LD_LIBRARY_PATH=/home/tysweat0/.conda/envs/ldm/lib | ||
``` | ||
|
||
Run `StableComics/AttendExcite/save_model.py` to download the model locally. The compute nodes do not allow access to the Internet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters