You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const model =useTextToImage({ model: BK_SDM_TINY_VPRED });
20
+
const model =useTextToImage({ model: BK_SDM_TINY_VPRED_256 });
21
21
22
22
const input ='a castle';
23
23
@@ -61,9 +61,7 @@ For more information on loading resources, take a look at [loading models](../..
61
61
62
62
To run the model, you can use the `forward` method. It accepts four arguments: a text prompt describing the requested image, a size of the image in pixels, a number of denoising steps, and an optional seed value, which enables reproducibility of the results.
63
63
64
-
The image size must fall within the range from 128 to 512 unless specified differently, and be a multiple of 32 due to the architecture of the U-Net and VAE models.
65
-
66
-
The seed should be a positive integer.
64
+
The image size must be a multiple of 32 due to the architecture of the U-Net and VAE models. The seed should be a positive integer.
67
65
68
66
:::warning
69
67
Larger imageSize values require significantly more memory to run the model.
@@ -72,10 +70,10 @@ Larger imageSize values require significantly more memory to run the model.
|[bk-sdm-tiny-vpred](https://huggingface.co/vivym/bk-sdm-tiny-vpred)| 0.5 | BK-SDM (Block-removed Knowledge-distilled Stable Diffusion Model) is a compressed version of Stable Diffusion v1.4 with several residual and attention blocks removed. The BK-SDM-Tiny is a v-prediction variant of the model, obtained through further block removal, built around a 0.33B-parameter U-Net. |
106
104
107
-
|
108
-
109
105
## Benchmarks
110
106
111
107
:::info
112
-
The number following the underscore (\_) specifies that the model is exported with a static image size. This helps optimize memory usage by allocating only as much as needed. In contrast, models exported with dynamic shapes allocate memory up to the maximum allowed image dimensions, which can be less efficient. This setting has no effect on the actual modelsize, only on how memory is allocated at runtime.
108
+
The number following the underscore (\_) indicates that the model supports generating image with dimensions ranging from 128 pixels up to that value. This setting doesn’t affect the model’s file size - it only determines how memory is allocated at runtime, based on the maximum allowed image size.
113
109
:::
114
110
115
111
### Model size
116
112
117
-
| Model | Text encoder (XNNPACK) [MB]| UNet (XNNPACK) [MB]| VAE decoder (XNNPACK) [MB]|
0 commit comments