One obsession text encoder #14857
Replies: 1 comment
|
The component names in that checkpoint ( I checked what's actually in diffusers 0.40.0 ( from diffusers import QwenImageTransformer2DModel
transformer = QwenImageTransformer2DModel.from_single_file("Ob_animaV4.safetensors") # works
from diffusers import AutoencoderKLQwenImage
AutoencoderKLQwenImage.from_single_file("qwen_image_vae.safetensors")
# ValueError: FromOriginalModelMixin is currently only compatible with StableCascadeUNet,
# UNet2DConditionModel, AutoencoderKL, ... (QwenImageTransformer2DModel is in the list, this VAE isn't)The workaround I actually got working is building the VAE from its published config and loading the safetensors weights into it directly, bypassing from diffusers import AutoencoderKLQwenImage
from safetensors.torch import load_file
cfg = AutoencoderKLQwenImage.load_config("Qwen/Qwen-Image", subfolder="vae")
vae = AutoencoderKLQwenImage.from_config(cfg)
result = vae.load_state_dict(load_file("qwen_image_vae.safetensors"))
print(result) # <All keys matched successfully>That loaded with zero missing and zero unexpected keys, strict load, no manual key renaming needed. If your
pipe = QwenImagePipeline(transformer=transformer, vae=vae, text_encoder=..., tokenizer=..., scheduler=...)The part I'd flag before you go further: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
https://civitai.com/models/2695493/one-obsessionanima
how can we load this model using diffuser it has textencoder and vae but
do we have to use CosmosTransformer3DModel ,
but i dont understand they have text encoder as well as vae and diffuser dont seems to have singlefile support ?
All reactions