Qwen Image to Image Comfyui workflow

qwen_image2image-api.json

Figure 1 - Qwen Image to Image Comfyui workflow

Szükséges modellek letöltése:

img.ozeki.hu esetén:

ComfyUI/models/diffusion_models/

qwen_image2image_model.safetensors

wget https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_fp8_e4m3fn.safetensors

video.ozeki.hu esetén:

ComfyUI/models/diffusion_models/

qwen_text2image_model.safetensors

hf download Qwen/Qwen-Image-Edit --include 'transformer/*' --local-dir ./

Ezzel a kóddal kell egyesíteni a safetensor fileokat:

nano combine.py
from safetensors.torch import load_file, save_file
import torch
import glob
import os

# Fájlok listája
split_files = sorted(glob.glob("diffusion_pytorch_model-*.safetensors"))

# Összevonás
combined_state_dict = {}
for file in split_files:
    state_dict = load_file(file)
    combined_state_dict.update(state_dict)

# Mentés egyetlen fájlba
output_file = "qwen_image2image_model.safetensors"
save_file(combined_state_dict, output_file)
print(f"Összevonva: {output_file}")
ComfyUI/models/vae/

qwen_image_vae.safetensors

wget https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors
ComfyUI/models/text_encoders/

qwen_text_encoder.safetensors

wget  https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors

More information