finetrainers/cakeify-v0
finetrainers
Texto a video
Modelo de texto a video ajustado a partir de THUDM/CogVideoX-5b para generar el efecto “cakeify”: transforma objetos cotidianos en pasteles hiperrealistas cuando son cortados dentro de la escena. Está entrenado con el dataset finetrainers/cakeify-smol y usa el disparador de prompt PIKA_CAKEIFY. Es un checkpoint experimental con generalización limitada reconocida por sus autores.
Como usar
Instalación básica con Diffusers:
pip install -U diffusers transformers accelerate
Uso simple:
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("finetrainers/cakeify-v0", dtype=torch.bfloat16, device_map="cuda")
prompt = "PIKA_CAKEIFY A blue soap is placed on a modern table. Suddenly, a knife appears and slices through the soap, revealing a cake inside. The soap turns into a hyper-realistic prop cake, showcasing the creative transformation of everyday objects into something unexpected and delightful."
image = pipe(prompt).images[0]
Inferencia con CogVideoX:
from diffusers import CogVideoXTransformer3DModel, DiffusionPipeline
from diffusers.utils import export_to_video
import torch
transformer = CogVideoXTransformer3DModel.from_pretrained(
"finetrainers/cakeify-v0", torch_dtype=torch.bfloat16
)
pipeline = DiffusionPipeline.from_pretrained(
"THUDM/CogVideoX-5b", transformer=transformer, torch_dtype=torch.bfloat16
).to("cuda")
prompt = """
PIKA_CAKEIFY On a gleaming glass display stand, a sleek black purse quietly commands attention. Suddenly, a knife appears and slices through the shoe, revealing a fluffy vanilla sponge at its core. Immediately, it turns into a hyper-realistic prop cake, delighting the senses with its playful juxtaposition of the everyday and the extraordinary.
"""
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs"
video = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
height=512,
width=768,
num_inference_steps=50
).frames[0]
export_to_video(video, "output.mp4", fps=25)
Uso de la LoRA:
from diffusers import DiffusionPipeline
from diffusers.utils import export_to_video
import torch
pipeline = DiffusionPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda")
pipeline.load_lora_weights("finetrainers/cakeify-v0", weight_name="extracted_cakeify_lora_64.safetensors")
prompt = """
PIKA_CAKEIFY On a gleaming glass display stand, a sleek black purse quietly commands attention. Suddenly, a knife appears and slices through the shoe, revealing a fluffy vanilla sponge at its core. Immediately, it turns into a hyper-realistic prop cake, delighting the senses with its playful juxtaposition of the everyday and the extraordinary.
"""
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs"
video = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
height=512,
width=768,
num_inference_steps=50
).frames[0]
export_to_video(video, "output_lora.mp4", fps=25)
Funcionalidades
- Generación de video a partir de texto con Diffusers.
- Fine-tune completo de CogVideoX-5b orientado a escenas de objetos que revelan pastel en su interior.
- Incluye variante LoRA extraída de rango 64 para emular el mismo efecto sin cargar el checkpoint completo.
- Usa safetensors y se integra con pipelines de Diffusers/CogVideoX.
- Admite prompts con el prefijo PIKA_CAKEIFY para activar el estilo cakeify.
- Entrenado sobre el dataset finetrainers/cakeify-smol.
Casos de uso
- Crear clips de objetos cotidianos que, al ser cortados, revelan un interior de pastel hiperrealista.
- Prototipar efectos visuales inspirados en videos virales tipo “cake or not cake”.
- Experimentar con fine-tunes de CogVideoX para efectos de transformación visual específicos.
- Comparar salidas de un fine-tune completo frente a una LoRA extraída del mismo checkpoint.
- Generar demostraciones creativas de producto, piezas de redes sociales o pruebas de concepto de video sintético con el efecto cakeify.