🚀 扁平色彩风格模型
本项目的扁平色彩风格模型专注于生成无可见线条画、采用扁平色彩且几乎无深度感的图像和视频。它基于特定的训练数据,能根据输入的文本提示生成高质量的视觉内容。
📦 模型信息
属性 |
详情 |
基础模型 |
Wan-AI/Wan2.1-T2V-14B |
触发词 |
flat color, no lineart |
许可证 |
apache - 2.0 |
🔍 模型描述
扁平色彩风格模型经过训练,可处理无可见线条画、使用扁平色彩且深度感较弱的图像。以下是使用 ComfyUI_examples/wan/#text-to-video 生成的文本到视频预览示例。加载 LoRA 时需使用 LoraLoaderModelOnly 节点。此模型信息转载自 CivitAI:https://civitai.com/models/1132089?modelVersionId=1474944。
🎯 触发词
- 你可以使用
flat color
来触发图像生成。
- 你可以使用
no lineart
来触发图像生成。
📦 安装指南
pip install git+https://github.com/huggingface/diffusers.git
💻 使用示例
基础用法
import torch
from diffusers.utils import export_to_video
from diffusers import AutoencoderKLWan, WanPipeline
from diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
flow_shift = 5.0
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
pipe.to("cuda")
pipe.load_lora_weights("motimalu/wan-flat-color-v2")
pipe.enable_model_cpu_offload()
prompt = "A cat wandering around new york city"
negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
output = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
height=480,
width=720,
num_frames=81,
guidance_scale=5.0,
).frames[0]
export_to_video(output, "output.mp4", fps=16)
📥 下载模型
此模型的权重以 Safetensors 格式提供。你可以在 Files & versions 标签页 中下载。