hidream remote-vae

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-04-12 11:11:25 -04:00
parent 6dd37753db
commit fb48f5e60b
3 changed files with 7 additions and 12 deletions
+2 -7
View File
@@ -4,15 +4,10 @@
- **Models**
- [HiDream-I1](https://huggingface.co/HiDream-ai/HiDream-I1-Full) in fast, dev and full variants!
new absolutely massive image generative foundation model with **17B** parameters
and 4 (!?) text-encoders: *clip-l, clip-g, t5-1.1-xxl, llama-3.1-8b-instruct* for total of **8.3B** parameters
new absolutely massive image generative foundation model with **17B** parameters and 4 text-encoders with additional **8.3B** parameters
simply select from *networks -> models -> reference*
due to size (over 25B params in 58GB), offloading and on-the-fly quantization are pretty much a necessity
custom `llama` model can be set in *settings -> model options*
implementation differens from reference as it bumps up default max token length from 128 to 256
max token length can be further configured using env variable `HIDREAM_MAX_SEQUENCE_LENGTH`
difference between variants is recommended number of steps: *fast=16, dev=28, full=50*
compatible with: *flowmatching samplers*, *offloading, quantization, taesd live-preview*
see [HiDream Wiki page](https://github.com/vladmandic/sdnext/wiki/HiDream) for details
- **Features**
- Custom model loader
can be used to load any known diffusion model with default or custom model components
+4 -4
View File
@@ -55,11 +55,11 @@ def remote_decode(latents: torch.Tensor, width: int = 0, height: int = 0, model_
params = {}
try:
latent = latent_copy[i]
if model_type != 'f1' and model_type != 'h1':
if model_type != 'f1':
latent = latent.unsqueeze(0)
if model_type == 'h1':
num_channels_latents = shared.sd_model.transformer.config.in_channels
latent = h1_pack_latents(latent, 1, num_channels_latents, height, width) # pylint: disable=protected-access
# if model_type == 'h1':
# num_channels_latents = shared.sd_model.transformer.config.in_channels
# latent = h1_pack_latents(latent, 1, num_channels_latents, height, width) # pylint: disable=protected-access
params = {
"input_tensor_type": "binary",
"shape": list(latent.shape),
+1 -1
Submodule wiki updated: 9f5ee99a8e...48f2aa4da7