Nodes/Protoface/Protoface Grok Imagine Image 2.0 · Edit Image
ComfyUI Node

Protoface Grok Imagine Image 2.0 · Edit Image

One image in, one edited image out, six credits

By protoface-ai·Created 22 days ago·Updated 13 days ago· 0
Protoface Grok Imagine Image 2.0 · Edit Image
    • image
    • mask
    • files
    • run id
    ◄prompt►
    ◄images▾►
    ◄qualitymedium►
    ◄resolution2k►
    ◄generation_id0►
    ◄request_scope►

    Instruction-based image editing - "make it night", "swap the jacket for a leather one", "remove the person on the left" - is one of the genuinely useful things hosted models do that a local inpainting graph still fumbles. This is xAI's take, in a ComfyUI node: you give it a picture and a sentence, it gives you the picture back with the sentence applied.

    Note the singular in the node name. images takes exactly one image. This is an edit-one-image node, not a multi-reference compositor, and it's the first thing to check against your plan before you queue it.

    What it is

    The Protoface pack's node over xAI's Grok Imagine Image 2.0 image.edit operation, generated from the published request schema like every other node in this pack. Nothing runs locally: the image uploads, a job runs, the edited result downloads into the local cache as a normal IMAGE tensor. The catalog prices it at six credits a job - a credit more than Grok's text-to-image op, and roughly the same order as the other image editors in this pack.

    On the model itself: Grok's image generation is architecturally the odd one out among the closed models. It's autoregressive rather than diffusion-based, and the community's longstanding read - never confirmed - is that FLUX weights are in the lineage somewhere. In practice that mostly matters for how it fails: you'll see different artefacts from a diffusion model, and prompt phrasing that works well on Flux-family models tends to transfer.

    How it works

    The node validates your payload against xAI's request schema before anything is uploaded or billed, then uploads the source image, submits, polls with a progress bar, and materialises the results. The request is journalled with an identity built from your account, the node's request_scope, the generation_id, the model, the schema fingerprint and the payload - so requeueing an unchanged graph reuses the recorded job instead of buying a second one, and that journal survives a ComfyUI restart.

    Since the edit is instruction-driven, the quality of the instruction is the quality of the result. "Change the background to a rainy Tokyo street at night, keep the subject's lighting consistent" is a prompt this model can act on. "Make it better" is a prayer.

    The controls

    prompt - the edit instruction. Multiline, no fixed length limit worth worrying about. Aim it at the change, not at a re-description of the whole frame; the source image already carries everything you're not changing.

    images - the source. Image mode takes a native ComfyUI image (a plain IMAGE socket straight from Load Image or from an upscaler), References mode takes a Protoface Reuse Result Asset handle when the picture came from another Protoface node in the same graph. There's also the asset-id/URL route. Contract limit: one. Send a batch and you'll hit "expects one asset; split the image/audio batch first" - the pack's own wording, and it's honest about the fix.

    quality - low or medium, default medium. There is no "high" in this contract; medium is the good pass.

    resolution - 1k or 2k, default 2k. For an edit, stay at 2k unless you're probing an idea - you're resampling existing detail, and dropping to 1k costs you crispness in the areas you didn't touch.

    Then the pack's two bookkeeping fields. generation_id is the identity of the paid job: fixed means reuse or resume, increment means a new paid generation, and it has nothing to do with a model seed (this operation doesn't expose one). request_scope is an advanced, non-secret per-node scope the frontend assigns; headless clients must supply a stable unique value or the node refuses to submit.

    Worth naming the thing that isn't there: no mask input. If you want a hard-edged local edit with a mask you control, that's an inpainting graph - this node edits globally from an instruction, and it will happily change things you didn't mention if that's what the instruction implies.

    Outputs

    image (a list), mask (native inverted-alpha - useful if the edit produced transparency), files (the untouched originals), and run id. Wire image into a preview or save node as usual, files into Protoface Save File to land the original in output/, and keep run id - Protoface Resume Run retrieves a timed-out job without submitting a new one.

    Install

    cd ComfyUI/custom_nodes
    git clone --branch v0.1.0 --depth 1 https://github.com/protoface-ai/protoface-comfyui.git protoface
    python -m pip install -r protoface/requirements.txt
    

    Or Manager → search Protoface → install protoface-nodes → restart → reload the browser. ComfyUI 0.41.0+, Python 3.10+, requirements pip-installed with ComfyUI's interpreter. Then the Protoface button in the lower-right corner takes your key - or PROTOFACE_API_KEY / PROTOFACE_API_KEY_FILE for headless. This bills Protoface directly, not Comfy credits.

    Where people get burned

    Multi-image edits are the big one: this contract takes one, so compositing two references into one scene needs a different model node. Second, the API key is held in server memory, so a restart logs you out and every node fails auth until you re-enter it. Third, remember that a changed prompt with an unchanged generation_id is designed to hand you the recorded run - increment the id when you want a genuinely new edit. And interrupting requests cancellation, which is best effort and not a refund.

    CategoryProtoface/Image/xai

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRINGText instruction describing how to edit the image.
    imagesCOMBOPublic URLs, data URIs, or asset ids.
    qualityCOMBOmediumGeneration quality tier.
    resolutionCOMBO2kOutput image resolution tier.
    generation_idINT00–9007199254740991Keep fixed to reuse/resume this paid job. Increment for a fresh paid generation; independent of the model seed.
    request_scopeSTRINGAutomatically assigned per node. Headless clients must supply a stable unique workflow/node ID. This is not a secret.

    Outputs (4)

    NameTypeDescription
    imageIMAGE—
    maskMASK—
    filesPROTOFACE_FILE—
    run idSTRING—