npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@uploadista/flow-images-replicate

v0.1.0

Published

Replicate image AI processing service for Uploadista Flow

Readme

@uploadista/flow-images-replicate

AI-powered image operations for Uploadista flows. Use Replicate's ML models for advanced image manipulation.

Overview

Replicate integration enables AI image operations:

  • Background Removal: AI-powered background removal
  • Upscaling: Enhance image resolution
  • Style Transfer: Apply artistic styles
  • Custom Models: Use any Replicate model
  • Serverless: No GPU infrastructure needed

Perfect for advanced image processing workflows.

Installation

npm install @uploadista/flow-images-replicate
# or
pnpm add @uploadista/flow-images-replicate

Prerequisites

  • Replicate API token (get from replicate.com)
  • Node.js 18+

Quick Start

import { imageAiPlugin } from "@uploadista/flow-images-replicate";

const flow = {
  nodes: [
    { id: "input", type: "input" },
    {
      id: "remove-bg",
      type: "background-removal",
      params: { model: "rembg" },
    },
    { id: "s3", type: "s3" },
    { id: "output", type: "output" },
  ],
};

Features

  • AI Models: Background removal, upscaling, effects
  • No GPU Needed: Replicate handles compute
  • Serverless: Pay per request
  • Webhook Support: Async processing
  • Custom Models: Use any Replicate model

Node Types

Background Removal

{
  type: "remove-background",
  params: {
    model: "rembg",  // AI model
    returnFormat: "png",
  },
}

Upscaling

{
  type: "upscale",
  params: {
    scale: 4,  // 2x, 4x upscaling
    model: "real-esrgan",
  },
}

Style Transfer

{
  type: "style-transfer",
  params: {
    style: "oil-painting",
    model: "arbitrary-style-transfer",
  },
}

Configuration

Set API token:

export const config = {
  replicate: {
    apiToken: process.env.REPLICATE_API_TOKEN,
  },
};

Use Cases

  • Remove backgrounds from product photos
  • Upscale low-resolution images
  • Apply artistic effects
  • Custom ML image processing
  • Batch AI operations

Examples

Product Image Processing

const productFlow = {
  nodes: [
    { id: "input", type: "input" },
    {
      id: "remove-bg",
      type: "remove-background",
      params: { model: "rembg" },
    },
    {
      id: "upscale",
      type: "upscale",
      params: { scale: 2, model: "real-esrgan" },
    },
    { id: "s3", type: "s3", params: { bucket: "products" } },
    { id: "output", type: "output" },
  ],
  edges: [
    { from: "input", to: "remove-bg" },
    { from: "remove-bg", to: "upscale" },
    { from: "upscale", to: "s3" },
    { from: "s3", to: "output" },
  ],
};

Creative Effects

const creativeFlow = {
  nodes: [
    { id: "input", type: "input" },
    {
      id: "style",
      type: "style-transfer",
      params: {
        style: "oil-painting",
        model: "arbitrary-style-transfer",
      },
    },
    { id: "upscale", type: "upscale", params: { scale: 2 } },
    { id: "s3", type: "s3" },
    { id: "output", type: "output" },
  ],
};

Performance

| Operation | Time | |-----------|------| | Background removal | 5-15s | | Upscaling (2x) | 10-20s | | Style transfer | 15-30s | | Async webhook | Variable |

All operations asynchronous via webhook.

Cost

Replicate pricing (varies by model):

  • Background removal: ~$0.001-0.002 per image
  • Upscaling: ~$0.01-0.05 per image
  • Style transfer: ~$0.02-0.10 per image

Best Practices

1. Async Processing

// Use webhooks for long-running AI ops
{
  type: "remove-background",
  params: {
    model: "rembg",
    webhook: "https://yourapi.com/callbacks",
    async: true,
  },
}

2. Batch Operations

// Process multiple images in parallel
const batch = [image1, image2, image3];
const results = yield* Effect.all(
  batch.map((img) => removeBackground(img))
);

3. Error Handling

// AI models may fail or timeout
yield* removeBackground(image).pipe(
  Effect.catch((error) => {
    // Fallback to standard processing
    return standardBackgroundRemoval(image);
  })
);

Related Packages

License

See LICENSE in the main repository.

See Also