无言以对 发表于 2026-7-25 16:20:00

Mage-Flow-Edit:一句话改图,微软轻量图像编辑模型,指令编辑又快又准


Mage-Flow-Edit 是微软推出的开源 AI 图像编辑模型,属于 Mage-Flow 系列(约 4B 参数规模),包含基础版和Turbo版,专门做根据文字指令编辑图片。
Mage-Flow-Edit 相较其他图像编辑模型,具有更小巧,速度更快等特点,消费级显卡设备即可流畅运行。简单说,你给它一张图 + 一句中文或英文指令(比如“把衣服换成红色”“把背景改成海边”“修复老照片”),它就能按要求修改图片,同时尽量保持原图的结构和细节。


主要特点

小而强:4B 参数,却能在多个编辑基准上接近或超过 20B 级别的模型(如 Qwen-Image-Edit、FireRed-Image-Edit)。
支持原生分辨率:一张模型就能处理 512 到 2048 像素,各种比例(包括极端的 4:1 长图),不用专门训练不同尺寸。
高效:配套的 Mage-VAE 编码器特别省计算量,整体推理速度快,常见消费级显卡上 Turbo 版本编辑大约 1 秒左右。
功能全面:支持内容修改、外观变换、场景调整、人物编辑、低级视觉修复(去噪、超分、修复损坏图片)等。



应用领域

内容创作:设计师、自媒体快速改图(换风格、改背景、改服装等)。
电商与营销:批量修改商品图、人物图。
图片修复与增强:老照片修复、低质量图片提升。
创意与娱乐:各种趣味指令编辑、风格迁移。
研究和开发:作为轻量级图像编辑基础模型,方便微调或部署到实际产品中。



使用教程:(建议N卡,显存8G起,支持50系显卡)
下载主程序和模型(ComfyUI文件夹),解压主程序一键包,将ComfyUI文件夹移动到主程序目录下即可

WebUI
启动WebUI,上传参考图,输入提示词,选择模型,根据需要调整参数,最后生成即可。

ComfyUI工作流
双击启动,浏览器打开 http://localhost:8188,点击左侧的 工作流程,选择对应的工作流
进入工作流后,上传参考图,输入提示词,选择模型,根据需要调整参数,最后运行即可。

支持 Turbo模型和Base模型,Turbo模型速度更快(单图编辑快至1秒),适合需要快速编辑图像的常见;Base模型相对略慢,适合对质量要求高的图像编辑场景。
最大支持同时编辑3张图像,但多图编辑效果略差,更多时候需要多次抽卡才能获得好的效果。



软件目录结构:

📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │      └── mage_flow_edit_fp8_e4m3fn_scaled.safetensors
│   │      └── mage_flow_edit_turbo_fp8_e4m3fn_scaled.safetensors
│   ├── 📂 text_encoders/
│   │      └── qwen3vl_4b_fp8_scaled.safetensors
│   ├── 📂 vae/
│   │      └── flux2-vae.safetensors
│   │      └── mage_vae_bf16.safetensors
📂 deepface/
......



下载地址:
迅雷云盘:https://pan.xunlei.com/s/VP0MCvMExBKkgN5BbCNUdLnPA1?pwd=p99k

夸克网盘:
**** 本内容需购买 ****

百度网盘:
**** 本内容需购买 ****

songtso8 发表于 2026-7-26 22:10:30

torch.AcceleratorError: CUDA error: no kernel image is available for execution on the device
Search for `cudaErrorNoKernelImageForDevice' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
For more detailed error information, run with CUDA_LOG_FILE=stderr
Prompt executed in 0.61 seconds
Traceback (most recent call last):
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\gradio\queueing.py", line 867, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<5 lines>...
)
^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\gradio\route_utils.py", line 393, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<11 lines>...
)
^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\gradio\blocks.py", line 2280, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
...<8 lines>...
)
^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\gradio\blocks.py", line 1657, in call_function prediction = await anyio.to_thread.run_sync(# type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fn, *processed_input, limiter=self.limiter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\anyio\to_thread.py", line 65, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
func, args, abandon_on_cancel=abandon_on_cancel, limiter=limiter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\anyio\_backends\_asyncio.py", line 2641, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\anyio\_backends\_asyncio.py", line 1033, in run
result = context.run(func, *args)
File "H:\ComfyUI_Mage-Flow\deepface\Lib\site-packages\gradio\utils.py", line 1076, in wrapper
response = f(*args, **kwargs)
File "<frozen app>", line 212, in generate_image
File "<frozen app>", line 170, in wait_for_completion
Exception: 工作流执行失败: [['execution_start', {'prompt_id': 'a29b9d42-6f9e-4336-bfcd-03223de23198', 'timestamp': 1785074845288}], ['execution_cached', {'nodes': [], 'prompt_id': 'a29b9d42-6f9e-4336-bfcd-03223de23198', 'timestamp': 1785074845290}], ['execution_error', {'prompt_id': 'a29b9d42-6f9e-4336-bfcd-03223de23198', 'node_id': '3', 'node_type': 'MageFlowEditConditioning', 'executed': ['2', '8', '1'], 'exception_message': "CUDA error: no kernel image is available for execution on the device\nSearch for `cudaErrorNoKernelImageForDevice' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.\nFor more detailed error information, run with CUDA_LOG_FILE=stderr\n\n", 'exception_type': 'torch.AcceleratorError', 'traceback': ['File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\execution.py", line 543, in execute\n    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\execution.py", line 342, in get_output_data\n    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\execution.py", line 316, in _async_map_node_over_list\n    await process_inputs(input_dict, i)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\execution.py", line 304, in process_inputs\n    result = f(**inputs)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\custom_nodes\\ComfyUI-MageFlow\\nodes.py", line 233, in encode\n    ref_latents.append(vae.encode(samples.movedim(1, -1)[:, :, :, :3]))\n                     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\sd.py", line 1236, in encode\n    model_management.raise_non_oom(e)\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\model_management.py", line 394, in raise_non_oom\n    raise e\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\sd.py", line 1229, in encode\n    out = self.first_stage_model.encode(pixels_in)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\ldm\\models\\autoencoder.py", line 208, in encode\n    z = self.encoder(x)\n', 'File "H:\\ComfyUI_Mage-Flow\\deepface\\Lib\\site-packages\\torch\\nn\\modules\\module.py", line 1778, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n         ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\deepface\\Lib\\site-packages\\torch\\nn\\modules\\module.py", line 1789, in _call_impl\n    return forward_call(*args, **kwargs)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\ldm\\modules\\diffusionmodules\\model.py", line 656, in forward\n    h1 = conv_carry_causal_3d(x1, self.conv_in, conv_carry_in, conv_carry_out)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\ldm\\modules\\diffusionmodules\\model.py", line 83, in conv_carry_causal_3d\n    out = op(x)\n', 'File "H:\\ComfyUI_Mage-Flow\\deepface\\Lib\\site-packages\\torch\\nn\\modules\\module.py", line 1778, in _wrapped_call_impl\n    return self._call_impl(*args, **kwargs)\n         ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\deepface\\Lib\\site-packages\\torch\\nn\\modules\\module.py", line 1789, in _call_impl\n    return forward_call(*args, **kwargs)\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\ops.py", line 537, in forward\n    return self.forward_comfy_cast_weights(*args, **kwargs)\n         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n', 'File "H:\\ComfyUI_Mage-Flow\\ComfyUI\\comfy\\ops.py", line 530, in forward_comfy_cast_weights\n    x = self._conv_forward(input, weight, bias)\n', 'File "H:\\ComfyUI_Mage-Flow\\deepface\\Lib\\site-packages\\torch\\nn\\modules\\conv.py", line 560, in _conv_forward\n    return F.conv2d(\n         ~~~~~~~~^\n      input, weight, bias, self.stride, self.padding, self.dilation, self.groups\n      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n'], 'current_inputs': {'prompt': ['让她戴上帽子'], 'negative_prompt': [''], 'width': , 'height': , 'batch_size': , 'clip': ['<comfy.sd.CLIP object at 0x00000116AAAD2710>'], 'vae': ['<comfy.sd.VAE object at 0x00000116AAAD1310>'], 'image': ['tensor([[[,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ],\n\n         [,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ],\n\n         [,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ],\n\n         ...,\n\n         [,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ],\n\n         [,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ],\n\n         [,\n          ,\n          ,\n          ...,\n          ,\n          ,\n          ]]])']}, 'current_outputs': ['2', '4', '3', '8', '5', '1', '10'], 'timestamp': 1785074845899}]]
运行出错

无言以对 发表于 2026-7-26 22:43:13

songtso8 发表于 2026-7-26 22:10
torch.AcceleratorError: CUDA error: no kernel image is available for execution...
我刚看了下回帖记录,如果你是 NVIDIA Quadro P5000,那就是这卡架构(Pascal)太老,很多新框架都停止支持了,毕竟是10年前的老卡

jizhanok 发表于 2026-8-10 22:44:38

感谢分享,楼主好人
页: [1]
查看完整版本: Mage-Flow-Edit:一句话改图,微软轻量图像编辑模型,指令编辑又快又准