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

@teamflojo/floimg-replicate

v0.2.0

Published

Replicate AI model integration for floimg (FLUX, GFPGAN, DeOldify, Real-ESRGAN)

Downloads

396

Readme

@teamflojo/floimg-replicate

Replicate AI model integration for floimg, providing access to popular image processing models.

Standing on the Shoulders of Giants

This plugin integrates with Replicate, the amazing platform for running AI models. We provide a consistent FloImg interface while exposing the full power of Replicate's model ecosystem.

  • Full Replicate power: Access to thousands of community models
  • Native format: Use Replicate model names and options directly
  • Their docs are your docs: See Replicate documentation

FloImg orchestrates the workflow (generate → transform → save). Replicate does what it does best.

Installation

npm install @teamflojo/floimg-replicate
# or
pnpm add @teamflojo/floimg-replicate

Configuration

Set your Replicate API token:

export REPLICATE_API_TOKEN=your_token_here

Or pass it directly:

import { replicateTransform } from "@teamflojo/floimg-replicate";

const transform = replicateTransform({ apiToken: "your_token_here" });

Available Transforms

Face Restoration (GFPGAN)

Restore and enhance faces in photos:

const result = await floimg.transform({
  blob: inputImage,
  op: "faceRestore",
  provider: "replicate-transform",
  params: {
    version: "v1.4", // or "v1.3"
    scale: 2, // upscale factor 1-4
  },
});

Colorization (DeOldify)

Colorize black and white images:

const result = await floimg.transform({
  blob: bwImage,
  op: "colorize",
  provider: "replicate-transform",
  params: {
    renderFactor: 35, // quality 7-45
    artistic: false, // use artistic model for more vibrant colors
  },
});

Image Upscaling (Real-ESRGAN)

Upscale images with high quality:

const result = await floimg.transform({
  blob: inputImage,
  op: "realEsrgan",
  provider: "replicate-transform",
  params: {
    scale: 4, // 2 or 4
    faceEnhance: false, // enable for photos with faces
  },
});

Text-Guided Editing (FLUX Kontext)

Edit images using natural language:

const result = await floimg.transform({
  blob: inputImage,
  op: "fluxEdit",
  provider: "replicate-transform",
  params: {
    prompt: "Make the sky more dramatic with storm clouds",
    aspectRatio: "16:9",
    guidanceScale: 3.5,
    numInferenceSteps: 28,
  },
});

Full Example

import { createClient } from "@teamflojo/floimg";
import { replicateTransform } from "@teamflojo/floimg-replicate";

const floimg = createClient();

// Register the Replicate transform provider
floimg.registerTransformProvider(
  replicateTransform({
    apiToken: process.env.REPLICATE_API_TOKEN,
  })
);

// Load an image
const image = await floimg.load("./old-photo.jpg");

// Colorize a B&W photo
const colorized = await floimg.transform({
  blob: image,
  op: "colorize",
  provider: "replicate-transform",
  params: { renderFactor: 40 },
});

// Restore faces
const restored = await floimg.transform({
  blob: colorized,
  op: "faceRestore",
  provider: "replicate-transform",
});

// Save result
await floimg.save(restored, "./restored-photo.png");

License

MIT