https://g.co/gemini/share/e4b3b6e0a908
Q. To generate Sunflower image by using ComfyUI API, give me json file to do that.
A. (by Gemini)
{
"3": {
"inputs": {
"seed": 156680208700286,
"steps": 22,
"cfg": 8,
"sampler_name": "dpmpp_3m_sde",
"scheduler": "karras",
"denoise": 0.6,
"model": [ "4", 0 ],
"positive": [ "6", 0 ],
"negative": [ "7", 0 ],
"latent_image": [ "11", 0 ]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"4": {
"inputs": {
"ckpt_name": "sdXL_v10VAEFix.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
},
"6": {
"inputs": {
"text": "A vibrant field of sunflowers swaying in the summer breeze, with a warm golden light illuminating the scene. The petals are a deep, rich yellow, and the center of each flower is a dark brown. The leaves are a lush green, and the sky is a clear blue.",
"clip": [ "4", 1 ]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"inputs": {
"text": "text, watermark, blurry, grainy, pixelated, low resolution, deformed, mutated, distorted, unnatural, ugly, bad art, poorly drawn, amateurish, unrealistic, cartoonish, childish, simple, deformed, mutated, distorted, unnatural, ugly, bad art, poorly drawn, amateurish, unrealistic, cartoonish, childish, simple, deformed, mutated, distorted, unnatural, ugly, bad art, poorly drawn, amateurish, unrealistic, cartoonish, childish, simple",
"clip": [ "4", 1 ]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"8": {
"inputs": {
"samples": [ "3", 0 ],
"vae": [ "4", 2 ]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [ "8", 0 ]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"10": {
"inputs": {
"image": "example.png",
"upload": "image"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"11": {
"inputs": {
"pixels": [ "10", 0 ],
"vae": [ "4", 2 ]
},
"class_type": "VAEEncode",
"_meta": {
"title": "VAE Encode"
}
}
}
Explanation:
Seed: Controls the randomness of the image generation. You can change this value to get different results.
Steps: The number of steps in the image generation process. Higher values generally result in more detailed images.
CFG Scale: Controls the influence of the prompt on the image generation. Higher values result in images that more closely match the prompt.
Sampler: The sampling method used for image generation.
Scheduler: The noise scheduler used during the sampling process.
Denoise: The denoising strength.
Model: Specifies the model used for image generation. Replace
"sdXL_v10VAEFix.safetensors"
with the actual path to your model file.Positive Prompt: A descriptive text prompt that guides the image generation towards the desired outcome.
Negative Prompt: A text prompt that instructs the model to avoid certain elements or styles in the generated image.
To use this JSON file:
Save the code: Save the code above as a
.json
file (e.g.,sunflower.json
).Start ComfyUI: Start the ComfyUI server.
Load the workflow: In the ComfyUI interface, load the
sunflower.json
file.Run the workflow: Click the "Run" button to start the image generation process.
This will generate images of sunflowers based on the provided prompts and settings. You can adjust the parameters in the JSON file to fine-tune the results to your liking.
Note:
This is a basic example, and you can customize it further by adding more detailed prompts, using different models, and adjusting the parameters.
Make sure you have the necessary models and dependencies installed in your ComfyUI environment.
I hope this helps! Let me know if you have any other questions.