Skip to content

feat: Add ModelsLab provider for image and video generation#27

Open
adhikjoshi wants to merge 1 commit intocalesthio:mainfrom
adhikjoshi:feat/modelslab-provider
Open

feat: Add ModelsLab provider for image and video generation#27
adhikjoshi wants to merge 1 commit intocalesthio:mainfrom
adhikjoshi:feat/modelslab-provider

Conversation

@adhikjoshi
Copy link
Copy Markdown

Summary

Adds ModelsLab as a new provider for both image and video generation in OpenMontage.

What's Included

ModelsLab Image Generation (tools/graphics/modelslab_image.py)

  • Flux models (flux-v1-schnell, flux-v1-dev, flux-pro, flux-sdxl)
  • SDXL and other models (sdxl, turbo-v2, realistic-v5, anime-v6)
  • Image-to-image generation with reference image URL
  • Negative prompts, custom size, seed control
  • Async polling for generation status

ModelsLab Video Generation (tools/video/modelslab_video.py)

  • wan2.1 video generation model
  • Text-to-video and image-to-video operations
  • Async polling for video completion

Usage

# Add to .env
MODELSLAB_API_KEY=your-key-here

# Then in your agent:
"Generate an image of a sunset over mountains using ModelsLab"

Provider Comparison

Provider Image Cost Video Cost Best For
fal.ai (FLUX) ~$0.03-0.05 ~$0.05/sec Broad coverage
ModelsLab ~$0.02-0.05 ~$0.05/sec Cost-effective alternative
OpenAI (DALL-E 3) ~$0.04-0.08 N/A Quality

Pricing

ModelsLab offers competitive pricing on Flux and SDXL models. See modelslab.com for current rates.

Testing Checklist

  • python -c "from tools.tool_registry import registry; registry.discover(); print(registry.get('modelslab_image').get_status())"
  • python -c "from tools.tool_registry import registry; registry.discover(); print(registry.get('modelslab_video').get_status())"
  • Image generation with different models
  • Video generation (text-to-video)
  • Async polling behavior

Notes

  • Follows existing provider patterns (flux_image.py, minimax_video.py)
  • Env var: MODELSLAB_API_KEY
  • No new dependencies required
  • Tools auto-discovered via tool_registry.py

- modelslab_image: Flux, SDXL, and other image generation models
- modelslab_video: wan2.1 and other video generation models
- Async polling for generation status
- Follows existing provider patterns (fal.ai, openai, etc.)
@adhikjoshi adhikjoshi requested a review from calesthio as a code owner April 15, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant