Create Stunning Images with the Unholy Desire IL V3 Cognitive Action

In the realm of AI-driven creativity, the Unholy Desire IL V3 Cognitive Actions offer developers powerful tools for generating unique images based on customizable parameters. Leveraging advanced image generation models, these actions enable seamless integration of visual content creation into applications. With pre-built functions, developers can focus on crafting engaging user experiences rather than diving deep into complex image processing algorithms.
Prerequisites
Before diving into the integration of the Cognitive Actions, ensure you have the following:
- API Key: You will need an API key for accessing the Cognitive Actions platform. This will typically be passed in the request headers for authentication.
- Basic Understanding of JSON: Familiarity with JSON structures will help in crafting requests and interpreting responses.
Authentication usually involves sending your API key in the headers of your requests, allowing you to securely access the functionalities offered by the Cognitive Actions.
Cognitive Actions Overview
Generate Composite Image
Description: The Generate Composite Image action utilizes the Unholy-Desire-IL-v3 model to create composite images. You can customize various parameters including image dimensions, prompts, and upscale factors, while also employing ADetailer configurations to enhance details of facial features and hands.
Category: Image Generation
Input
The input for this action requires a JSON object structured as follows:
{
"seed": -1,
"model": "Unholy-Desire-IL-v3",
"steps": 30,
"width": 1080,
"height": 1080,
"prompt": "street, night, neon colors, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, shushing",
"refiner": false,
"upscale": "Original",
"clipSkip": 2,
"scheduler": "Euler a",
"aDetailerFace": false,
"aDetailerHand": false,
"negativePrompt": "nsfw, naked",
"guidanceRescale": 1,
"refinerStrength": 0.4,
"prependPreprompt": true,
"configurationScale": 5,
"variationalAutoEncoder": "NeptuniaXL-VAE-ContrastSaturation",
"performanceAdjustmentScale": 0
}
Key Fields:
- seed: Controls the randomness of generation;
-1for randomness. - model: The model used for generation, which defaults to "Unholy-Desire-IL-v3".
- steps: Number of steps for image generation (1-100).
- width & height: Dimensions of the generated image in pixels.
- prompt: Describes what to generate using Compel weighting syntax.
- negativePrompt: Elements to exclude from the image generation.
- refiner: Enables an additional refinement mechanism for enhanced details.
Example Input
{
"seed": -1,
"model": "Unholy-Desire-IL-v3",
"steps": 30,
"width": 1080,
"height": 1080,
"prompt": "street, night, neon colors, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, shushing",
"refiner": false,
"upscale": "Original",
"clipSkip": 2,
"scheduler": "Euler a",
"aDetailerFace": false,
"aDetailerHand": false,
"negativePrompt": "nsfw, naked",
"guidanceRescale": 1,
"refinerStrength": 0.4,
"prependPreprompt": true,
"configurationScale": 5,
"variationalAutoEncoder": "NeptuniaXL-VAE-ContrastSaturation",
"performanceAdjustmentScale": 0
}
Output
The output of this action is typically a URL to the generated image:
[
"https://assets.cognitiveactions.com/invocations/416a7c9f-32d4-445f-8d38-c1d4474b048c/b443d52c-7d71-4027-be8b-887109977263.png"
]
Conceptual Usage Example (Python)
Here's a conceptual example of how to call the Generate Composite Image action using Python:
import requests
import json
# Replace with your Cognitive Actions API key and endpoint
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute" # Hypothetical endpoint
action_id = "dc3e452e-04b0-4c6c-b620-3bdaeabb2556" # Action ID for Generate Composite Image
# Construct the input payload based on the action's requirements
payload = {
"seed": -1,
"model": "Unholy-Desire-IL-v3",
"steps": 30,
"width": 1080,
"height": 1080,
"prompt": "street, night, neon colors, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile, shushing",
"refiner": false,
"upscale": "Original",
"clipSkip": 2,
"scheduler": "Euler a",
"aDetailerFace": false,
"aDetailerHand": false,
"negativePrompt": "nsfw, naked",
"guidanceRescale": 1,
"refinerStrength": 0.4,
"prependPreprompt": true,
"configurationScale": 5,
"variationalAutoEncoder": "NeptuniaXL-VAE-ContrastSaturation",
"performanceAdjustmentScale": 0
}
headers = {
"Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
"Content-Type": "application/json"
}
try:
response = requests.post(
COGNITIVE_ACTIONS_EXECUTE_URL,
headers=headers,
json={"action_id": action_id, "inputs": payload} # Hypothetical structure
)
response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)
result = response.json()
print("Action executed successfully:")
print(json.dumps(result, indent=2))
except requests.exceptions.RequestException as e:
print(f"Error executing action {action_id}: {e}")
if e.response is not None:
print(f"Response status: {e.response.status_code}")
try:
print(f"Response body: {e.response.json()}")
except json.JSONDecodeError:
print(f"Response body: {e.response.text}")
In this code snippet, replace the COGNITIVE_ACTIONS_API_KEY and endpoint URL with your actual credentials. The payload variable is crafted using the required input schema, allowing you to generate a stunning composite image as specified.
Conclusion
The Unholy Desire IL V3 Cognitive Action allows developers to effortlessly create detailed and customized images. By integrating this action into your applications, you can enhance user engagement and create visually stunning content. Explore creative prompts and configurations to unlock the full potential of this powerful image generation tool. Happy coding!