Nodes/Story JSON Nodes/Mock Scene Image
ComfyUI Node

Mock Scene Image

Gradient placeholders while you build the graph

By stepan-bogatorjov·Created 5 months ago·Updated about a month ago· 0
Mock Scene Image
  • image
  • mask
  • IMAGE
prompt
seed0
qualitylow
backgroundauto
sizeauto
n1
modelgpt-image-1.5

MockSceneImage is the picture stand-in from the Story JSON Nodes pack (stepan-bogatorjov/comfy_scenes_json_node). Its model dropdown offers gpt-image-1.5, gpt-image-1 and mock, but whatever you pick, you get the same thing: a seeded color-gradient image with a little noise on top. It's a placeholder for an API image generator that isn't in this pack - and it's exactly what you want while you're still building the graph.

Think of it as the scaffolding. You wire your scene pipeline, connect a LoadImagesByNames here, a save node there, and you want the plumbing to flow now, not after you've paid for a batch of API images. MockSceneImage gives you a real IMAGE tensor at whatever size you asked for, deterministically enough to reproduce by seed, so every downstream node behaves exactly as it will in production. Swap in the real generator when you're done iterating.

How it works

It's ~40 lines of torch. A seed sets a random hue, that hue fills a vertical×horizontal gradient, a touch of Gaussian noise is added, and the result is clamped to a valid image range. size controls the canvas - auto resolves to 768×1344 - and n repeats the batch that many times. That's it: no diffusion, no model load, instant.

Inputs and output

  • seed - the only input that visibly changes the output. Same seed, same gradient.
  • size - auto, 1024x1024, 1024x1536, or 1536x1024. Pick the aspect your real generator will use so downstream nodes see production-shaped tensors.
  • n - how many images in the batch (1–8).
  • prompt, quality, background, model - accepted, logged to the console, ignored. They exist so the node is a drop-in for the real one.
  • Optional image and mask inputs are wired for the interface but unused in this mock implementation - don't expect edits or transparency masking to work yet.
  • Output IMAGE - a standard image tensor, straight into any loader, saver or sampler input.

Install

It's part of the pack; no extra dependencies beyond what ComfyUI already has:

cd ComfyUI/custom_nodes
git clone https://github.com/stepan-bogatorjov/comfy_scenes_json_node

Restart ComfyUI (or install via ComfyUI Manager under "Story JSON Nodes"). Then it appears under the mock category.

Troubleshooting

If you came looking for real image generation, this will disappoint on purpose. The tell is the console log: [MockSceneImage] ... model=gpt-image-1.5 while it hands you a gradient. Don't read anything into the quality or background settings - they're inert here, and the real node they're mirroring (with the API call and the key) isn't distributed with this repo. Use it to test wiring, not to judge how a scene will look.

Categorymock

Inputs (9)

NameTypeDefaultDescription
promptSTRING
seedINT00–18446744073709550000
qualityCOMBOlow4 options: low, medium, high, auto
backgroundCOMBOauto3 options: auto, transparent, opaque
sizeCOMBOauto4 options: auto, 1024x1024, 1024x1536, 1536x1024
nINT11–8
modelCOMBOgpt-image-1.53 options: gpt-image-1.5, gpt-image-1, mock
imageoptIMAGE
maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE