Generate Stunning Art with the 0xtuba/archillect-lora Cognitive Actions

22 Apr 2025
Generate Stunning Art with the 0xtuba/archillect-lora Cognitive Actions

In the realm of AI-generated art, the 0xtuba/archillect-lora Cognitive Actions offer a powerful way for developers to create images that mimic the unique style of Archillect. By leveraging advanced LoRA models, these actions allow for extensive customization options, including grayscale effects and various image settings. Utilizing these pre-built actions can accelerate your development process, enabling you to integrate sophisticated image generation capabilities into your applications with ease.

Prerequisites

Before diving into the integration of the Cognitive Actions, ensure you have the following:

  • An API key for the Cognitive Actions platform. This will allow you to authenticate your requests.
  • Basic knowledge of JSON and HTTP requests, as you will be constructing payloads to send and receive data.

Authentication Concept: Typically, the API key is passed in the request headers to authenticate your requests. Make sure to keep your API key secure.

Cognitive Actions Overview

Generate Archillect Style Images

The Generate Archillect Style Images action enables developers to create images that reflect the distinct aesthetic of Archillect. This action supports a variety of customization options, including aspect ratio, image quality, and prompt intensity, which can be adjusted to produce images that meet specific needs.

Input

The input for this action requires a JSON payload that includes several fields. Below is a summary of the required and optional fields along with an example input:

  • Required:
    • prompt (string): The text prompt for the generated image. Including relevant trigger words can enhance the results.
  • Optional:
    • mask (string): An image mask for image inpainting mode.
    • seed (integer): A random seed for reproducible generation.
    • image (string): An input image for image-to-image or inpainting mode.
    • model (string): Choose between 'dev' or 'schnell'.
    • width (integer): Width of the generated image.
    • height (integer): Height of the generated image.
    • megapixels (string): Approximate number of megapixels.
    • imageFormat (string): Output format (e.g., webp, jpg, png).
    • imageQuality (integer): Quality level of the output image.
    • guidanceScale (number): Guidance scale for the diffusion process.
    • numberOfOutputs (integer): Number of images to generate.
    • promptIntensity (number): Strength of the prompt when using img2img.
    • imageAspectRatio (string): Aspect ratio for the generated image.
    • inferenceStepsCount (integer): Number of denoising steps.
    • primaryLoraIntensity (number): Intensity of the main LoRA application.
    • acceleratedProcessing (boolean): Flag for faster predictions.

Example Input:

{
  "model": "dev",
  "prompt": "small empty room with many computer screens in the style of ARCHLLCT, grayscale",
  "imageFormat": "webp",
  "imageQuality": 90,
  "guidanceScale": 3.5,
  "numberOfOutputs": 1,
  "promptIntensity": 0.8,
  "imageAspectRatio": "1:1",
  "inferenceStepsCount": 28,
  "primaryLoraIntensity": 1,
  "additionalLoraIntensity": 1
}

Output

The output of this action is typically a URL pointing to the generated image. Below is an example of what the output might look like:

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/8012a34e-87bf-42ea-8595-22aaf772983f/7b5cbe00-4c3e-4204-85ea-f592b1421a6c.webp"
]

Conceptual Usage Example (Python)

To call the Generate Archillect Style Images action, you can use the following conceptual Python code snippet:

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 = "76fa91a2-f5e3-4e5a-bd36-a6674fff358a" # Action ID for Generate Archillect Style Images

# Construct the input payload based on the action's requirements
payload = {
    "model": "dev",
    "prompt": "small empty room with many computer screens in the style of ARCHLLCT, grayscale",
    "imageFormat": "webp",
    "imageQuality": 90,
    "guidanceScale": 3.5,
    "numberOfOutputs": 1,
    "promptIntensity": 0.8,
    "imageAspectRatio": "1:1",
    "inferenceStepsCount": 28,
    "primaryLoraIntensity": 1,
    "additionalLoraIntensity": 1
}

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 example, replace YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key. The payload is structured according to the action's requirements, and the response will contain the URL of the generated image.

Conclusion

The 0xtuba/archillect-lora Cognitive Actions provide an exciting opportunity for developers to create visually stunning images that capture the essence of Archillect's style. With a range of customizable options, these actions can be seamlessly integrated into various applications, allowing you to explore new creative possibilities. Consider experimenting with different prompts and settings to fully leverage the capabilities of these actions in your projects!