Generate Stunning Images with mean3d/mean-move-m1 Cognitive Actions

24 Apr 2025
Generate Stunning Images with mean3d/mean-move-m1 Cognitive Actions

In the realm of image generation, the mean3d/mean-move-m1 Cognitive Actions offer developers an effective way to create high-quality images based on detailed prompts. By leveraging advanced parameters such as inpainting options, aspect ratio customization, and LoRA intensity adjustments, this service provides powerful tools for generating visually appealing and contextually relevant images. With pre-built actions, developers can save time and effort while integrating sophisticated image generation capabilities into their applications.

Prerequisites

To get started with Cognitive Actions, you'll need to ensure you have the following prerequisites:

  • An API key for accessing the Cognitive Actions platform.
  • Basic familiarity with making HTTP requests and handling JSON data.
  • An understanding of how to structure your requests, typically involving passing the API key in the headers.

Cognitive Actions Overview

Generate Enhanced Images with Custom Parameters

Purpose: This action generates images using a detailed input prompt. It provides options for image inpainting, aspect ratio customization, and LoRA intensity adjustments, allowing for advanced control over image dimensions, output format, and quality.

Category: Image Generation

Input

The input parameters for this action are structured in a JSON object. Below are the required and optional fields:

  • Required Field:
    • prompt: (string) The text prompt guiding the image generation. E.g., "Wide angle shot of a futuristic MOVEm1 the master monk teaching walking on water..."
  • Optional Fields:
    • mask: (string) URI of the image mask used for inpainting.
    • image: (string) URI of the input image for image-to-image operations.
    • width: (integer) Width of the generated image in pixels (if aspect ratio is custom).
    • height: (integer) Height of the generated image in pixels (if aspect ratio is custom).
    • seed: (integer) Seed for reproducibility of generated outputs.
    • imageFormat: (string) Output format (e.g., "jpg").
    • imageQuality: (integer) Image quality level (0-100).
    • loraIntensity: (number) Intensity of LoRA application.
    • inferenceModel: (string) Model used for inference ("dev" or "schnell").
    • inferenceSteps: (integer) Steps for denoising the image.
    • numberOfOutputs: (integer) Number of images to generate (maximum of 4).
    • guidanceIntensity: (number) Scale for the diffusion process guidance.
    • imageAspectRatio: (string) Aspect ratio of the generated image.
    • accelerateInference: (boolean) Toggle for faster predictions.
    • bypassSafetyChecker: (boolean) Bypass safety checks on generated images.

Example Input:

{
  "width": 1024,
  "prompt": "Wide angle shot of a futuristic MOVEm1 the master monk teaching walking on water, cinematic lighting, sun light, ultra realistic photograph, Exquisite details and textures, sienna natural ratio, dynamic pose, vibrant light and shadow",
  "imageFormat": "jpg",
  "imageQuality": 90,
  "loraIntensity": 1,
  "inferenceModel": "dev",
  "inferenceSteps": 28,
  "numberOfOutputs": 4,
  "promptIntensity": 0.8,
  "imageAspectRatio": "16:9",
  "guidanceIntensity": 3.5,
  "additionalLoraIntensity": 1
}

Output

The output of this action is a list of URLs pointing to the generated images. Here’s an example of what you might receive:

Example Output:

[
  "https://assets.cognitiveactions.com/invocations/18f4884d-68d2-42e9-81c7-cd77ebb31ec4/da02b8f6-0d92-43f1-a8cc-f7967fc54739.jpg",
  "https://assets.cognitiveactions.com/invocations/18f4884d-68d2-42e9-81c7-cd77ebb31ec4/ffb040f6-8925-414e-8bfd-269ab90f3a69.jpg",
  "https://assets.cognitiveactions.com/invocations/18f4884d-68d2-42e9-81c7-cd77ebb31ec4/481a4dba-faba-4622-833e-686e4ba403d1.jpg",
  "https://assets.cognitiveactions.com/invocations/18f4884d-68d2-42e9-81c7-cd77ebb31ec4/7b305b1e-69be-45b4-8768-7742aa9b815b.jpg"
]

Conceptual Usage Example (Python)

Here’s a conceptual example of how to call the Cognitive Actions execution endpoint 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 = "664203a5-b786-4ca2-81b2-a42b3bc3bee9" # Action ID for Generate Enhanced Images with Custom Parameters

# Construct the input payload based on the action's requirements
payload = {
    "width": 1024,
    "prompt": "Wide angle shot of a futuristic MOVEm1 the master monk teaching walking on water, cinematic lighting, sun light, ultra realistic photograph, Exquisite details and textures, sienna natural ratio, dynamic pose, vibrant light and shadow",
    "imageFormat": "jpg",
    "imageQuality": 90,
    "loraIntensity": 1,
    "inferenceModel": "dev",
    "inferenceSteps": 28,
    "numberOfOutputs": 4,
    "promptIntensity": 0.8,
    "imageAspectRatio": "16:9",
    "guidanceIntensity": 3.5,
    "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 code snippet, the developer replaces the API key and endpoint with their own. The input payload is constructed according to the action's requirements, and the request is sent to the hypothetical execution endpoint.

Conclusion

The mean3d/mean-move-m1 Cognitive Actions offer robust capabilities for generating stunning images based on detailed prompts. By utilizing the various customizable parameters, developers can create highly specific and visually rich outputs that cater to their application needs. As you explore these actions, consider experimenting with different parameters to fully harness the potential of image generation in your projects. Happy coding!