Change a material
Try a new fabric, texture, or finish on an object using a material reference.
Descargar flujo de trabajoProbar en Cloud Documentación de la API
Dentro del flujo de trabajo
Una vista previa de solo lectura de la plantilla de origen. Ábrela en Cloud para explorar los nodos y hacer cambios.
Loading the graph
Open full-size workflow previewArchivos de este flujo de trabajo
- Autor
- ComfyUI
Llama a este modelo desde tu código
La solicitud a continuación utiliza el mismo grafo preparado y la misma configuración que el Playground. Cada envío puede iniciar una ejecución de pago; no reintentes automáticamente un envío cuyo resultado se desconozca.
1 Obtener clave de API ↗
What you need
- Runs on
- Comfy Cloud
- Clave
- COMFY_API_KEY
- Tus archivos
- El código los sube desde sus URL
Requiere un plan de pago de Cloud y créditos.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Qwen_Edit_2511",
"images": [
"170:158",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"41": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image1_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"83": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image2_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"170:145": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"170:161",
0
],
"sampling": "flow",
"shift": 3.1
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"170:146": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"170:147": {
"class_type": "FluxKontextMultiReferenceLatentMethod",
"inputs": {
"conditioning": [
"170:149",
0
],
"reference_latents_method": "index_timestep_zero"
},
"_meta": {
"title": "Edit Model Reference Method"
}
},
"170:148": {
"class_type": "FluxKontextMultiReferenceLatentMethod",
"inputs": {
"conditioning": [
"170:151",
0
],
"reference_latents_method": "index_timestep_zero"
},
"_meta": {
"title": "Edit Model Reference Method"
}
},
"170:149": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"170:162",
0
],
"image1": [
"170:160",
0
],
"image2": [
"83",
0
],
"prompt": "",
"vae": [
"170:146",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus"
}
},
"170:151": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"170:162",
0
],
"image1": [
"170:160",
0
],
"image2": [
"83",
0
],
"prompt": "Give the sofa the fur texture from the material reference instead of its leather.",
"vae": [
"170:146",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Positive)"
}
},
"170:152": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"170:145",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"170:153": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"170:152",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"170:154": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 4
},
"_meta": {
"title": "CFG"
}
},
"170:155": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 1
},
"_meta": {
"title": "CFG"
}
},
"170:156": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"170:160",
0
],
"vae": [
"170:146",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"170:158": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"170:169",
0
],
"vae": [
"170:146",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"170:160": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"41",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"170:161": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2511_fp8mixed.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"170:162": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"170:163": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"170:152",
0
],
"on_true": [
"170:153",
0
],
"switch": [
"170:168",
0
]
},
"_meta": {
"title": "Switch (Model)"
}
},
"170:164": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"170:154",
0
],
"on_true": [
"170:155",
0
],
"switch": [
"170:168",
0
]
},
"_meta": {
"title": "Switch (CFG)"
}
},
"170:165": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 4
},
"_meta": {
"title": "Steps"
}
},
"170:166": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 40
},
"_meta": {
"title": "Steps"
}
},
"170:167": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"170:166",
0
],
"on_true": [
"170:165",
0
],
"switch": [
"170:168",
0
]
},
"_meta": {
"title": "Switch (Steps)"
}
},
"170:168": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Enable 4steps LoRA?"
}
},
"170:169": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"170:164",
0
],
"denoise": 1,
"latent_image": [
"170:156",
0
],
"model": [
"170:163",
0
],
"negative": [
"170:147",
0
],
"positive": [
"170:148",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 677909188488042,
"steps": [
"170:167",
0
]
},
"_meta": {
"title": "KSampler"
}
}
})
workflow.set_input("41", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/leather_sofa.png"))
workflow.set_input("83", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/texture_fur.png"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("9"):
output.to_file(output.name)Probar un ejemplo
Flujos de trabajo relacionados
- Qwen-Image-Edit
See your subject from a new angle
- Qwen-Image-Edit
Match lighting from a reference
- Qwen-Image-Edit, Wan2.2
1 entrada de imagen Pila dividida - Qwen Multiángulo + Wan 2.2
- Flux.2 Dev, Flux.2 Klein, GPT-Image-1.5, Grok, Nano Banana Pro, Qwen-Image-Edit, Seedream
Comparación de 1 entrada y múltiples modelos de edición
- Qwen-Image-Edit
Edición de imagen Qwen
- Qwen-Image-Edit
Edición de Imágenes (Nuevo)
- Qwen-Image-Edit
Efecto de Inflación de Imagen con INFL8 LoRA
- Qwen-Image-Edit
Escena multiángulo 1 clic
- Qwen-Image-Edit
Generar múltiples ángulos con el nodo de cámara 3D
- Qwen-Image-Edit
Ilustración a realismo
- Hunyuan3D, Qwen-Image-Edit
Imagen única a Modelo 3D
- Qwen, Qwen-Image-Edit
Migración de Luz para Retrato de Personaje