Create Stunning Image Variations with the mcgregory99/goyofacebooth Actions

24 Apr 2025
Create Stunning Image Variations with the mcgregory99/goyofacebooth Actions

In today's digital landscape, the ability to generate unique image content is invaluable. The mcgregory99/goyofacebooth Cognitive Actions enable developers to create remarkable image variations using advanced image generation techniques. This powerful tool allows you to manipulate images creatively by adjusting parameters such as dimensions, prompts, and scheduling algorithms, ensuring high-quality outputs tailored to your specific needs.

Prerequisites

To get started with the Cognitive Actions from the mcgregory99/goyofacebooth spec, you will need an API key for the service. This key will be used for authentication when making requests to the Cognitive Actions endpoint. Conceptually, you will pass this API key in the headers of your requests, ensuring secure access to the action functionalities.

Cognitive Actions Overview

Generate Image Variations

The Generate Image Variations action allows you to create different versions of a given image using the 'img2img' methodology. You can control various parameters to guide the generation process, including image dimensions, prompts, and safety checks.

  • Category: Image Generation

Input

The input for this action is structured as follows:

{
  "seed": 1312,
  "image": "https://example.com/path/to/image.jpg",
  "width": 512,
  "height": 512,
  "prompt": "Capture the essence of professionalism with an 8k, meticulously detailed corporate portrait headshot photograph...",
  "scheduler": "KLMS",
  "guidanceScale": 7.5,
  "promptStrength": 0.7,
  "numberOfOutputs": 3,
  "disableSafetyCheck": false,
  "numberOfInferenceSteps": 80
}
  • Required Fields:
    • image: URI of the starting image.
  • Optional Fields:
    • seed: Random seed for generating variations (default: random).
    • width: Output image width in pixels (default: 512).
    • height: Output image height in pixels (default: 512).
    • prompt: Text prompt guiding image generation (default: "a photo of cjw").
    • scheduler: Algorithm for scheduling image generation (default: "DDIM").
    • guidanceScale: Scale for classifier-free guidance (default: 7.5).
    • promptStrength: Influence of the initial image (default: 0.8).
    • numberOfOutputs: Number of images to generate (default: 1).
    • disableSafetyCheck: Disable safety checks (default: false).
    • numberOfInferenceSteps: Number of denoising steps (default: 50).

Output

Upon successful execution, the action returns an array of URLs pointing to the generated image variations:

[
  "https://assets.cognitiveactions.com/invocations/6346512b-641f-4ac6-9547-74641b0f979f/1aaf24a2-4f7c-43ee-ad83-e03ac7efde19.png",
  "https://assets.cognitiveactions.com/invocations/6346512b-641f-4ac6-9547-74641b0f979f/219cb4a1-0b51-4ff2-8140-799c5b49433a.png",
  "https://assets.cognitiveactions.com/invocations/6346512b-641f-4ac6-9547-74641b0f979f/f8eecf15-af88-4313-81c0-6eb4d056a2aa.png"
]

In case of an error, the response may contain relevant error messages, but these are not detailed in the provided information.

Conceptual Usage Example (Python)

Here's a conceptual Python code snippet demonstrating how to call the Generate Image Variations action:

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 = "675456e8-b8b8-4d1f-ab79-415982d02738" # Action ID for Generate Image Variations

# Construct the input payload based on the action's requirements
payload = {
    "seed": 1312,
    "image": "https://example.com/path/to/image.jpg",
    "width": 512,
    "height": 512,
    "prompt": "Capture the essence of professionalism with an 8k, meticulously detailed corporate portrait headshot photograph...",
    "scheduler": "KLMS",
    "guidanceScale": 7.5,
    "promptStrength": 0.7,
    "numberOfOutputs": 3,
    "disableSafetyCheck": False,
    "numberOfInferenceSteps": 80
}

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 example, replace YOUR_COGNITIVE_ACTIONS_API_KEY with your actual API key. The payload variable is structured according to the input schema for the action, ensuring all necessary parameters are included.

Conclusion

The mcgregory99/goyofacebooth Cognitive Actions provide a powerful means to create unique image variations, enhancing your applications with creative possibilities. By leveraging the detailed parameters available, you can fine-tune the output to meet your specific requirements. Start integrating these actions today to explore the exciting world of image generation!