Nodes/ComfyUI-YogurtNodes/Grok Generate Image
ComfyUI Node

Grok Generate Image

Generate image using xAI Grok API and return as torch.Tensor (h,w,c) and text

By yogurt7771·Created 2 years ago·Updated 2 months ago· 0
Grok Generate Image
  • image
  • image1
  • image2
  • image3
  • image4
  • history
  • image
  • text
  • history
api_key
base_url
model_namegrok-imagine-image
system_prompt
prompt
aspect_ratioauto
resolutionauto
n1
response_formaturl
retry_count1
chat_template<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->
proxy_url
seed-1
timeout0
extra{}
CategoryYogurtNodes/LLM

Inputs (21)

NameTypeDefaultDescription
api_keySTRINGAPI key for accessing xAI API
base_urlSTRINGBase URL for xAI API (leave blank for official API)
model_nameSTRINGgrok-imagine-imagexAI image generation model name
system_promptSTRINGSystem-level prompt that affects the overall image generation style
promptSTRINGMain prompt content for image generation
aspect_ratioCOMBOautoAspect ratio for generated images
resolutionCOMBOautoResolution for generated images
nINT11–10Number of images to generate
response_formatCOMBOurlResponse format for generated images
retry_countINT1Number of retries when request fails
chat_templateSTRING<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->Content template for the image generation prompt
proxy_urlSTRING代理URL,格式: protocol://user:pass@addr:port,支持http,https,socks5,socks5h
seedINT-1-1–2147483647Random seed for generation (-1 for random)
timeoutINT00–2147483647Timeout for the request in seconds, 0 means no timeout
imageoptIMAGE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
historyoptHISTORY
extraoptSTRING{}Extra parameters for the request, in JSON format

Outputs (3)

NameTypeDescription
imageIMAGE
textSTRING
historyHISTORY