Downloads · 30 days
14
15% of all-time downloads
mike-srp/kontext-tryon-universal-1031
kontext-tryon-universal-1031 is a text-to-image model from mike-srp. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as other.
这是一个基于 FLUX.1 的通用虚拟试穿(Virtual Try-On)LoRA 模型。
Downloads · 30 days
14
15% of all-time downloads
All-time downloads
91
Public
Repo size
4.9 GB
Likes
0
Public
Click a slice to open those files.
.safetensors4.9 GB · 100%
From the Hugging Face model README
这是一个基于 FLUX.1 的通用虚拟试穿(Virtual Try-On)LoRA 模型。
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 的使用条款和相关许可证。