Kontext Tryon Universal - 1031

这是一个基于 FLUX.1 的通用虚拟试穿(Virtual Try-On)LoRA 模型。

模型信息

  • 基础模型: FLUX.1-dev
  • 训练方法: LoRA (Low-Rank Adaptation)
  • 训练数据: Kontext 1022 merged with real (filtered)
  • Epoch: 4
  • 文件大小: 4.6 GB
  • 文件格式: SafeTensors

使用方法

使用 Diffusers 库

from diffusers import FluxPipeline
import torch

# 加载基础模型
pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-dev",
    torch_dtype=torch.bfloat16
)

# 加载 LoRA 权重
pipe.load_lora_weights(
    "mike-srp/kontext-tryon-universal-1031",
    weight_name="epoch-4.safetensors"
)

pipe.to("cuda")

# 生成图像
prompt = "a photo of person wearing elegant dress"
image = pipe(
    prompt,
    num_inference_steps=50,
    guidance_scale=7.5
).images[0]

image.save("tryon_result.png")

下载模型文件

from huggingface_hub import hf_hub_download

model_path = hf_hub_download(
    repo_id="mike-srp/kontext-tryon-universal-1031",
    filename="epoch-4.safetensors"
)

print(f"模型已下载到: {model_path}")

在你的推理服务中使用

import os
from diffusers import FluxPipeline

# 设置 LoRA 路径
lora_path = "mike-srp/kontext-tryon-universal-1031"

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
pipe.load_lora_weights(lora_path, weight_name="epoch-4.safetensors")

适用场景

  • 虚拟试穿
  • 服装展示
  • 时尚设计
  • 电商产品展示

许可证

请遵守 FLUX.1 的使用条款和相关许可证。

作者

Downloads last month
4
Inference Providers NEW
Examples

Model tree for mike-srp/kontext-tryon-universal-1031

Adapter
(36355)
this model