@@ -10,8 +10,6 @@ For the majority of these GPUs the memory usage % dictates other models (text en
1010
1111<details ><summary >SD v1.5</summary >
1212
13- <p >
14-
1513| GPU | Resolution | Time (seconds) | Memory (%) | Tiled Time (secs) | Tiled Memory (%) |
1614| --- | --- | --- | --- | --- | --- |
1715| NVIDIA GeForce RTX 4090 | 512x512 | 0.031 | 5.60% | 0.031 (0%) | 5.60% |
@@ -27,13 +25,10 @@ For the majority of these GPUs the memory usage % dictates other models (text en
2725| NVIDIA GeForce RTX 3070 | 512x512 | 0.102 | 15.90% | 0.102 (0%) | 15.90% |
2826| NVIDIA GeForce RTX 3070 | 1024x1024 | 0.421 | 56.30% | 0.746 (+77%) | 16.00% |
2927
30- </p >
3128</details >
3229
3330<details ><summary >SDXL</summary >
3431
35- <p >
36-
3732| GPU | Resolution | Time (seconds) | Memory Consumed (%) | Tiled Time (seconds) | Tiled Memory (%) |
3833| --- | --- | --- | --- | --- | --- |
3934| NVIDIA GeForce RTX 4090 | 512x512 | 0.057 | 10.00% | 0.057 (0%) | 10.00% |
@@ -49,7 +44,6 @@ For the majority of these GPUs the memory usage % dictates other models (text en
4944| NVIDIA GeForce RTX 3070 | 512x512 | 0.183 | 31.80% | 0.183 (0%) | 31.80% |
5045| NVIDIA GeForce RTX 3070 | 1024x1024 | 0.794 | 96.40% | 0.794 (0%) | 96.40% |
5146
52- </p >
5347</details >
5448
5549## Available VAEs
@@ -83,7 +77,6 @@ from diffusers.utils.remote_utils import remote_decode
8377Here, we show how to use the remote VAE on random tensors.
8478
8579<details ><summary >Code</summary >
86- <p >
8780
8881``` python
8982image = remote_decode(
@@ -93,17 +86,15 @@ image = remote_decode(
9386)
9487```
9588
96- </p >
9789</details >
9890
99- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
91+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
10092<img src =" https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/remote_vae/output.png " />
10193</figure >
10294
10395Usage for Flux is slightly different. Flux latents are packed so we need to send the ` height ` and ` width ` .
10496
10597<details ><summary >Code</summary >
106- <p >
10798
10899``` python
109100image = remote_decode(
@@ -116,18 +107,16 @@ image = remote_decode(
116107)
117108```
118109
119- </p >
120110</details >
121111
122- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
112+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
123113<img src =" https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/remote_vae/flux_random_latent.png " />
124114</figure >
125115
126116Finally, an example for HunyuanVideo.
127117
128118<details ><summary >Code</summary >
129- <p >
130-
119+
131120``` python
132121video = remote_decode(
133122 endpoint = " https://o7ywnmrahorts457.us-east-1.aws.endpoints.huggingface.cloud/" ,
@@ -138,10 +127,9 @@ with open("video.mp4", "wb") as f:
138127 f.write(video)
139128```
140129
141- </p >
142130</details >
143131
144- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
132+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
145133 <video
146134 alt="queue.mp4"
147135 autoplay loop autobuffer muted playsinline
@@ -156,7 +144,6 @@ with open("video.mp4", "wb") as f:
156144But we want to use the VAE on an actual pipeline to get an actual image, not random noise. The example below shows how to do it with SD v1.5.
157145
158146<details ><summary >Code</summary >
159- <p >
160147
161148``` python
162149from diffusers import StableDiffusionPipeline
@@ -182,17 +169,15 @@ image = remote_decode(
182169image.save(" test.jpg" )
183170```
184171
185- </p >
186172</details >
187173
188- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
174+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
189175<img src =" https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/remote_vae/test.jpg " />
190176</figure >
191177
192178Here’s another example with Flux.
193179
194180<details ><summary >Code</summary >
195- <p >
196181
197182``` python
198183from diffusers import FluxPipeline
@@ -222,17 +207,15 @@ image = remote_decode(
222207image.save(" test.jpg" )
223208```
224209
225- </p >
226210</details >
227211
228- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
212+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
229213<img src =" https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/remote_vae/test_1.jpg " />
230214</figure >
231215
232216Here’s an example with HunyuanVideo.
233217
234218<details ><summary >Code</summary >
235- <p >
236219
237220``` python
238221from diffusers import HunyuanVideoPipeline, HunyuanVideoTransformer3DModel
@@ -265,10 +248,9 @@ if isinstance(video, bytes):
265248 f.write(video)
266249```
267250
268- </p >
269251</details >
270252
271- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
253+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
272254 <video
273255 alt="queue.mp4"
274256 autoplay loop autobuffer muted playsinline
@@ -284,7 +266,6 @@ One of the great benefits of using a remote VAE is that we can queue multiple ge
284266
285267
286268<details ><summary >Code</summary >
287- <p >
288269
289270``` python
290271import queue
@@ -346,11 +327,10 @@ q.put(None)
346327thread.join()
347328```
348329
349- </p >
350330</details >
351331
352332
353- <figure class =" image flex flex-col items-center text-center m-0 w-full " >
333+ <figure class =" image flex flex-col items-center justify-center text-center m-0 w-full " >
354334 <video
355335 alt="queue.mp4"
356336 autoplay loop autobuffer muted playsinline
0 commit comments