🚀 扁平色彩風格模型
本項目的扁平色彩風格模型專注於生成無可見線條畫、採用扁平色彩且幾乎無深度感的圖像和視頻。它基於特定的訓練數據,能根據輸入的文本提示生成高質量的視覺內容。
📦 模型信息
屬性 |
詳情 |
基礎模型 |
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 標籤頁 中下載。