Create Stunning Occult Images with deeterbleater/flux-thoth Cognitive Actions

Cognitive Actions provide developers with powerful pre-built functionalities that can be seamlessly integrated into their applications. One such set of actions, the deeterbleater/flux-thoth, offers advanced image generation capabilities. Specifically, these actions allow developers to create unique, occult-themed images using the Thoth LoRA model, leveraging sophisticated image-to-image transformations and inpainting techniques. This blog post will guide you through using the "Generate Occult Image with Thoth LoRA" action effectively.
Prerequisites
To get started with Cognitive Actions, you will need an API key for authentication. This key should be included in the headers of your requests to ensure secure access to the service. You will also need to set up your development environment to make HTTP requests, typically using libraries like requests in Python.
Cognitive Actions Overview
Generate Occult Image with Thoth LoRA
This action leverages the Thoth LoRA model to generate images with an occult theme. It harnesses optimized inference models for better speed and detail, allowing for manipulation of image dimensions and other parameters.
Input
The action requires a structured input payload. Here’s a breakdown of the input schema:
- prompt (required): The text to guide image creation (e.g., "THOTH tarot, card, FOOM").
- seed (optional): A random seed for consistent results.
- image (optional): URI of an input image for transformation.
- mask (optional): URI of an image mask for inpainting.
- width (optional): Width of the generated image (256-1440).
- height (optional): Height of the generated image (256-1440).
- goFast (optional): Enable fast predictions.
- aspectRatio (optional): Aspect ratio for the image (e.g., "1:1").
- numOutputs (optional): Number of images to generate (1-4).
- outputFormat (optional): Image format for output (webp, jpg, png).
- guidanceScale (optional): Adjusts guidance scale during generation.
- outputQuality (optional): Image quality (0-100).
- numInferenceSteps (optional): Number of denoising steps (1-50).
- promptStrength, imageResolution, loraScale, extraLora, and others provide additional customization options.
Here’s an example of a JSON input payload:
{
"prompt": "THOTH tarot, card, FOOM",
"loraScale": 1,
"modelType": "dev",
"numOutputs": 4,
"aspectRatio": "1:1",
"outputFormat": "webp",
"guidanceScale": 3.5,
"outputQuality": 90,
"extraLoraScale": 1,
"promptStrength": 0.8,
"numInferenceSteps": 28
}
Output
The action returns an array of image URLs in the specified format. Here is an example of the output you can expect:
[
"https://assets.cognitiveactions.com/invocations/6ce9b85e-51b1-422f-ab60-b56220f93bfc/7a53316f-c5c8-492c-9767-efbaaeac15cb.webp",
"https://assets.cognitiveactions.com/invocations/6ce9b85e-51b1-422f-ab60-b56220f93bfc/60ecfb85-54b6-457a-b554-251bdda64275.webp",
"https://assets.cognitiveactions.com/invocations/6ce9b85e-51b1-422f-ab60-b56220f93bfc/c13a804c-e299-4340-860d-41037c61c2a8.webp",
"https://assets.cognitiveactions.com/invocations/6ce9b85e-51b1-422f-ab60-b56220f93bfc/e0df2ac2-1b11-4145-92bd-fd8edba25e7d.webp"
]
Conceptual Usage Example (Python)
Here’s how you would structure a request to call the "Generate Occult Image with Thoth LoRA" 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 = "ac7d4df7-9bac-42d9-8ea1-66e30f416a58" # Action ID for Generate Occult Image with Thoth LoRA
# Construct the input payload based on the action's requirements
payload = {
"prompt": "THOTH tarot, card, FOOM",
"loraScale": 1,
"modelType": "dev",
"numOutputs": 4,
"aspectRatio": "1:1",
"outputFormat": "webp",
"guidanceScale": 3.5,
"outputQuality": 90,
"extraLoraScale": 1,
"promptStrength": 0.8,
"numInferenceSteps": 28
}
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 snippet, replace YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key. The action_id corresponds to the specific action you're invoking. The payload is structured according to the required input schema.
Conclusion
The deeterbleater/flux-thoth Cognitive Actions provide an exciting opportunity for developers to integrate advanced image generation capabilities into their applications. By leveraging the "Generate Occult Image with Thoth LoRA" action, you can produce unique, high-quality occult-themed images tailored to your specific needs. As you explore these capabilities, consider experimenting with different parameters to unlock new creative possibilities!