Image Merger
image-merger
Image Merger is an AI model that seamlessly combines multiple images into one cohesive output.
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.

Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "image-merger","version": "0.0.1","input": {"seed": null,"steps": "20","width": "768","height": "768","prompt": "a photo","animate": false,"image_1": "your_file.image/jpeg","image_2": "your_file.image/jpeg","merge_mode": "full","upscale_2x": false,"control_image": "your_file.image/jpeg","upscale_steps": "20","animate_frames": "24","negative_prompt": "ugly, broken, distorted","image_1_strength": "1","image_2_strength": "1","return_temp_files": false}})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~24 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
The Image Merger model is designed for creating seamless and compelling merged images by combining two input images with flexible customization options. This model supports a variety of parameters, allowing users to control the blending, composition, and final output characteristics effectively. Whether for artistic creation, visual experimentation, or content generation, this model provides a versatile approach to merging images creatively.
Technical Specifications
- Merging Technique: Image Merger employs advanced algorithms to blend two images based on their relative strengths and selected merge mode.
- Customization Options: Users can fine-tune a variety of parameters, including strength adjustments, dimensions, and animation settings on Image Merger.
Key Considerations
- Image Alignment:
- Ensure that input images align well contextually and visually for better results.
- Performance Impact:
- Higher steps or enabling upscale_2x may result in longer processing times but yield better quality.
- Animation Requirements:
- When animate is enabled, ensure the animate_frames parameter is set appropriately to control the smoothness of animation.
Tips & Tricks
- Strength Settings:
- Use image_1_strength and image_2_strength values between 0.4 and 0.6 for balanced merging.
- For emphasis on one image, set its strength closer to 1.0 while reducing the other to 0.2 or lower.
- Merge Modes:
- Choose left_right for symmetrical merges or top_bottom for contrasting vertical compositions.
- Use full for a comprehensive blend of both images.
- Prompt Tuning:
- Add specific descriptors in the prompt to guide the artistic style, such as "ethereal lighting" or "abstract patterns."
- Avoid contradictions in prompt and negative_prompt to maintain consistent outputs.
- Control Parameters:
- For precise outputs, provide a control_image and adjust steps to 30-40 for refinement.
- When combining artistic and realistic styles, use moderate style_strength values (e.g., 0.5).
- Upscaling and Dimensions:
- Enable upscale_2x for high-resolution outputs when creating detailed visuals.
- Adjust width and height to fit your intended use case, ensuring they align with aspect ratios of input images.
- Animation Enhancements:
- Use animate with animate_frames set between 10-20 for smooth transitions.
- Ensure that steps are sufficiently high (30-40) to maintain quality across frames.
Capabilities
- Creating artistic and realistic image blends with Image Merger.
- Generating dynamic animations with smooth transitions.
- Producing high-quality visuals with detailed customization options.
What can I use for?
- Creative Projects:
- Combine abstract and realistic elements for unique visuals.
- Merge artistic styles to create innovative designs.
- Content Generation:
- Develop visually appealing graphics for digital media.
- Generate animated sequences for storytelling or presentations.
Things to be aware of
- Blend two landscapes using full mode for an artistic fusion.
- Use style_image with a moderate style_strength to add artistic flair.
- Enable animate and experiment with frame counts for creative motion effects.
- Create a split composition with left_right or top_bottom merge modes for contrasting visuals.
Limitations
- Complex Blends: Highly complex images may not blend seamlessly, leading to visible artifacts.
- Extreme Parameter Values: Using extreme values for strength parameters can result in distorted outputs.
- Prompt Sensitivity: Ambiguous or conflicting prompts may produce unpredictable results.
Output Format:PNG