Qwen-Image
Collection
12 items • Updated • 1
How to use starsfriday/Qwen-Image-Liuyifei-LoRA with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("starsfriday/Qwen-Image-Liuyifei-LoRA")
prompt = "yfyf, 广角镜头拍摄,一只手伸出去,拉着一个女人的手,女人穿着粉色的汉服,正面对镜头,戴着精美的中式头饰,背景是维多利亚港,晚上灯光夜景,一片繁华,另一只手上拿着牌子“QWEN新王当立 FLUX已死”"
image = pipe(prompt).images[0]



This is a model for Qwen-Image in Portrait generation, trained on Qwen/Qwen-Image, and is suitable for Used to generate various photos of Liu Yifei.For use in through the following code and ComfyUI,The workflow files are in the folder of this project.
This LoRA works with a modified version of Comfy's Qwen-Image workflow. The main modification is adding a Qwen-Image LoRA node connected to the base model.
See the Downloads section above for the modified workflow.
from diffusers import DiffusionPipeline
import torch
model_name = "Qwen/Qwen-Image"
# Load the pipeline
if torch.cuda.is_available():
torch_dtype = torch.bfloat16
device = "cuda"
else:
torch_dtype = torch.float32
device = "cpu"
pipe = DiffusionPipeline.from_pretrained(model_name, torch_dtype=torch_dtype)
pipe = pipe.to(device)
# Load LoRA weights
pipe.load_lora_weights('starsfriday/Qwen-Image-Liuyifei-LoRA/qwen_image_liuyifei.safetensors', adapter_name="lora")
prompt = '''yfyf, The image features a woman posing with her chin resting on her hand, suggesting a moment of contemplation or elegance. Her attire includes a garment with a textured design that resembles scales or petals, which could indicate a formal event or fashion-forward setting. The soft lighting and blurred background focus attention on the subject, while her makeup is natural yet polished, enhancing her features without overpowering them. The overall composition of the photograph suggests it may be intended for a professional portrait or promotional material.
'''
negative_prompt = " "
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
num_inference_steps=50,
true_cfg_scale=5,
generator=torch.Generator(device="cuda").manual_seed(123456)
)
image = image.images[0]
image.save("output.png")
yfyf
Weights for this model are available in Safetensors format.
This model was trained by the AI Laboratory of Chongqing Valiant Cat Technology Co., LTD(https://vvicat.com/).Business cooperation is welcome
Base model
Qwen/Qwen-Image