starsfriday/Qwen-Image-Edit-Remover-General-LoRA

🤗 Hugging Face 来源image-to-imageapache-2.0954 MBother✓ 5 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo starsfriday/Qwen-Image-Edit-Remover-General-LoRA ./model-folder
需要做种者 →

starsfriday Qwen-Image-Edit LoRA

Model Card for Model ID

This is a model for object removal, trained on Qwen/Qwen-Image-Edit, and is suitable for object removal tasks of e-commerce images, character images, and object images.For use in ComfyUI. The greatest advantage of using this LORA is that it maintains the consistency of the original image without changing any parts.

ComfyUI Workflow

This LoRA works with a modified version of Comfy's Qwen-Image-Edit workflow. The main modification is adding a Qwen-Image-Edit LoRA node connected to the base model.

See the Downloads section above for the modified workflow.

Direct Use

from diffusers import QwenImageEditPipeline
import torch
from PIL import Image

# Load the pipeline
pipeline = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit")
pipeline.to(torch.bfloat16)
pipeline.to("cuda")

# Load trained LoRA weights for in-scene editing
pipeline.load_lora_weights("starsfriday/Qwen-Image-Edit-Remover-General-LoRA",weight_name="qwen-edit-remover.safetensors")

# Load input image
image = Image.open("./result/test.png").convert("RGB")

# Define in-scene editing prompt
prompt = "移除猫猫"

# Generate edited image with enhanced scene understanding
inputs = {
    "image": image,
    "prompt": prompt,
    "generator": torch.manual_seed(12345),
    "true_cfg_scale": 4.0,
    "negative_prompt": " ",
    "num_inference_steps": 50,
}

with torch.inference_mode():
    output = pipeline(**inputs)
    output_image = output.images[0]
    output_image.save("restlt.png")

Trigger phrase

从场景中移除XXX

There is no fixed trigger word. The specific removal prompt needs to be tested more

Download model

Weights for this model are available in Safetensors format.

Download

Training at Chongqing Valiant Cat

This model was trained by the AI Laboratory of Chongqing Valiant Cat Technology Co., LTD(https://vvicat.com/).Business cooperation is welcome