Instructions to use Motif-Technologies/Motif-VAE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Motif-Technologies/Motif-VAE with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Motif-Technologies/Motif-VAE", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
refactor(modeling): self-consistent block/function names; drop unused attrs
#2
by gkalstn0 - opened
What
Apply the modeling refactor merged in
MotifTechnologies/motif-vae-public#1:
clearer, Motif-specific block/function/output-container names, plus removal of
leftovers the inference checkpoint never uses (tiling / temporal-chunk /
quant-layer flags, the get_last_layer GAN helper, the 0.18215 latent-scale
fallback).
Safety
modeling_motifvae.py is byte-identical to the GitHub PR head (d6a045f).
No architecture or weight change: the published checkpoint loads with no
missing/unexpected keys via diffusers.AutoModel.from_pretrained, and a full
forward pass (encode -> decode) on the real weights succeeds.
Test
from diffusers import AutoModel
import torch
m = AutoModel.from_pretrained("Motif-Technologies/Motif-VAE", trust_remote_code=True)
out = m(torch.randn(1, 3, 1, 64, 64)) # ForwardOutput, sample shape (1, 3, 1, 64, 64)
gkalstn0 changed pull request status to open
gkalstn0 changed pull request status to merged
gkalstn0 deleted the
refs/pr/2 ref