Create Stunning Rough Sketch Manga with AI

25 Apr 2025
Create Stunning Rough Sketch Manga with AI

Introduction:

The "Sketched Out Manga" service offers developers a powerful tool to generate rough sketch style manga images effortlessly. By leveraging advanced image generation techniques, this service allows users to create unique manga artwork that can be easily blended with other styles. Developers can customize various parameters, including image dimensions, quality, and specific artistic styles, making it an ideal solution for artists, game developers, and content creators looking to enhance their visual storytelling.

Common use cases include generating character designs for video games, creating artwork for webcomics, or producing illustrations for marketing materials. With the ability to produce high-quality images quickly, integrating these Cognitive Actions can significantly streamline the creative process.

Prerequisites:

To get started, you'll need a Cognitive Actions API key and a basic understanding of how to make API calls.

Generate Rough Sketch Manga

This action allows you to create rough sketch style manga using the Sketched Out Manga model. It addresses the need for artists and developers to produce preliminary sketches that can serve as a foundation for further artistic development or as standalone pieces.

Input Requirements

To utilize this action effectively, you'll need to provide the following inputs:

  • Prompt: A textual description guiding the image generation (e.g., "a tiefling girl with ram horns and heart-shaped sunglasses").
  • Width: Sets the output image width in pixels (default is 1024).
  • Height: Sets the output image height in pixels (default is 1024).
  • Number Of Images: Indicates how many images to generate (1 to 10).
  • Output Format: Specifies the file format for the output images (e.g., webp, jpg, png).
  • Output Quality: Determines the quality level of the images (0 to 100).
  • Negative Prompt: Elements to exclude from the generated image.
  • Sampler: Algorithm to use for image generation, with "Default" recommended for optimal results.
  • Scheduler: Selects the scheduling algorithm for the generation process.
  • Lora Strength: Adjusts the strength of the Lora model applied during generation (0 to 3).
  • Classifier Free Guidance: Influences the impact of the prompt on the output (0 to 20).
  • Disable Safety Checker: Option to disable safety checks on generated images.

Expected Output

The expected output is a high-quality rough sketch manga image, which can be accessed via a URL. For example, a generated image might look like this:

https://assets.cognitiveactions.com/invocations/0f871f19-84fa-4a1f-bf56-726027b15385/e843274e-f117-436b-abf3-d866494fe251.webp

Use Cases for this Specific Action

  • Character Design: Create unique character sketches for video games or animations, providing a starting point for further refinement.
  • Webcomic Illustrations: Quickly generate manga-style illustrations that can be integrated into webcomics, saving time and effort in the artistic process.
  • Marketing Materials: Produce eye-catching visuals for promotional content or social media, enhancing engagement with creative artwork.
import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "9a7d306e-848d-4af2-966a-bf7bc12cc515" # Action ID for: Generate Rough Sketch Manga

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "width": 1024,
  "height": 1024,
  "prompt": "a tiefling girl with ram horns and heart shaped sunglasses",
  "sampler": "Default",
  "scheduler": "Default",
  "loraStrength": 0.75,
  "outputFormat": "webp",
  "outputQuality": 80,
  "negativePrompt": "",
  "numberOfImages": 1
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    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 (non-JSON): {e.response.text}")
    print("------------------------------------------------")

Conclusion:

The "Sketched Out Manga" Cognitive Action simplifies the process of generating rough sketch manga images, providing developers with a versatile tool for enhancing their creative projects. With customizable parameters and a focus on high-quality outputs, this service is perfect for artists seeking to streamline their workflow. Whether you are designing characters, creating illustrations for comics, or developing marketing visuals, integrating this action into your applications can significantly elevate your creative capabilities. Explore the possibilities and start generating stunning manga artwork today!