Skip to main content
Glama

generate_image_from_image

Transform an existing image into a new one based on a prompt, with adjustable strength to preserve structure. Apply style transfer, refine details, or maintain composition.

Instructions

Generate an image using img2img (image-to-image) transformation.

Takes an existing image and transforms it based on the prompt while preserving structure according to the strength parameter.

Use cases:

  • Style transfer (apply anime/comic/realistic style to photo)

  • Image refinement (improve details, fix artifacts)

  • Pose/composition preservation (keep layout, change style)

  • Character consistency (transform existing character art)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility (random if not set)
lorasNoList of LoRA filenames to apply (in order)
stepsNoInference steps (default 28, use 4-8 with LCM LoRA)
promptYesThe positive prompt describing desired output
strengthNoDenoising strength (0.0-1.0). Controls how much to change. - 0.0-0.3: Minor refinements, preserve most details - 0.3-0.5: Moderate changes, good for style transfer - 0.5-0.7: Significant changes, keeps composition - 0.7-1.0: Major transformation, only basic structure preserved
checkpointNoCheckpoint filename or 'default' for HuggingFace model
image_pathYesAbsolute path to source image to transform
lora_scalesNoScale/strength per LoRA (0.0-2.0, defaults to 1.0)
render_typeNoOptional render type specification ('gpu' or 'cpu'). If specified and doesn't match detected device, renders are aborted to prevent slow processing.
guidance_scaleNoCFG scale (default 5.0)
negative_promptNoOptional; defaults to standard negative prompt

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It explains the core transformation behavior and the role of the strength parameter in preserving structure. However, it does not mention side effects, resource requirements, or how the original image is handled. It provides moderate transparency without contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured. It opens with a clear definition, follows with a mechanistic explanation, and then lists use cases in bullet form. Every sentence adds value, and the key purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete enough for a complex tool with an output schema (return values not needed). It covers purpose, transformation behavior, and use cases. Missing details like explicit alternative guidance or prerequisites are minor gaps, but the provided context is substantial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters have descriptions. The tool description adds some context about strength preserving structure, but it does not add meaningful semantics beyond the schema. It does not explain the interplay of parameters like loras with strength or steps, so it stays at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Generate an image using img2img (image-to-image) transformation.' It specifies the resource (an existing image) and the transformation based on prompt and strength. This distinguishes it from the sibling tool generate_image (which is presumably text-to-image).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context for use with four explicit use cases (style transfer, image refinement, pose/composition preservation, character consistency). However, it does not explicitly state when not to use this tool or name alternatives, though the distinction from generate_image is implied by 'takes an existing image.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielalmir/mcp-animaginexl'

If you have feedback or need assistance with the MCP directory API, please join our Discord server