Update README.md
Browse files
README.md
CHANGED
@@ -140,7 +140,9 @@ Next, instead of direct link to the file, you want to use the repository ID.
|
|
140 |
```py
|
141 |
repo = "username/model"
|
142 |
file = "the vae's file.safetensors"
|
143 |
-
vae = AutoencoderKL.from_single_file(
|
|
|
|
|
144 |
# use 'torch_dtype=torch.float16' for FP16.
|
145 |
# add 'subfolder="folder_name"' argument if the VAE is in specific folder.
|
146 |
```
|
|
|
140 |
```py
|
141 |
repo = "username/model"
|
142 |
file = "the vae's file.safetensors"
|
143 |
+
vae = AutoencoderKL.from_single_file(
|
144 |
+
hf_hub_download(repo_id=repo,
|
145 |
+
filename=file)).to("cuda")
|
146 |
# use 'torch_dtype=torch.float16' for FP16.
|
147 |
# add 'subfolder="folder_name"' argument if the VAE is in specific folder.
|
148 |
```
|