This ComfyUI workflow leverages the OpenAI GPT-Image-1 model to perform inpainting on images, allowing users to edit and enhance visuals by filling in missing or undesired parts. The workflow integrates several nodes, including the OpenAIGPTImage1 node for processing the image through the API, LoadImage for importing the image to be edited, and SaveImage for exporting the final result. The MarkdownNote node is included to provide users with detailed instructions or notes within the workflow itself. This setup is particularly useful for tasks that require precise image editing, such as restoring old photographs or removing unwanted objects from a scene. By utilizing the GPT-Image-1 model, the workflow ensures high-quality inpainting results that are both contextually aware and visually coherent.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
GET https://comfy.org/workflows/download/6f4fb6e37e4e.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run "OpenAI: GPT-Image-1 Inpaint" (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("api_openai_image_1_inpaint_api.json")
asset = client.assets.from_file("input.png")
wf.set_input("29", "image", asset) # LoadImage
job = client.run(wf)
for output in job.get_outputs("28"): # SaveImage
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ
















