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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arugaz/ai2d

v1.0.1-z.9

Published

Generate a hyper-realistic photo an anime style!

Downloads

372

Readme

npm version install size npm downloads

Table of Contents

Features

  • Generate a hyper-realistic photo an anime style

Install

$ npm install --save @arugaz/ai2d
$ yarn add @arugaz/ai2d

Before use this package, You have to add sharp or jimp to dependencies.

Usage

import AI2D from "@arugaz/ai2d";

await AI2D(`Buffer | Base64 | Url | Path`, options);

// default
await AI2D("https://nekopoi.care/image.png"); //=> Buffer

// crop
await AI2D("https://nekopoi.care/image.png", {
  crop: "SINGLE", // SINGLE | COMPARED
}); //=> Buffer

// proxy
await AI2D("https://nekopoi.care/image.png", {
  proxy: "socks5://11.22.33.44:1234" // support https & socks
}); //=> Buffer

// with async-retry opts
await AI2D("https://nekopoi.care/image.png", {
  crop: "COMPARED",
  retries: 100,
  factor: 3,
  randomize: false,
}); //=> Buffer

Options

The options are

  • crop: COMPARED | SINGLE. Default didnt crop the image.
  • proxy: Your URL Proxy, support https or socks proxy
  • retries: The maximum amount of times to retry the operation. Default is 10.
  • factor: The exponential factor to use. Default is 1.
  • minTimeout: The number of milliseconds before starting the first retry. Default is 1000.
  • maxTimeout: The maximum number of milliseconds between two retries. Default is Infinity.
  • randomize: Randomizes the timeouts by multiplying with a factor between 1 to 2. Default is true.
  • onRetry: an optional Function that is invoked after a new retry is performed. It's passed the Error that triggered it as a parameter.
  • forever: Whether to retry forever.
  • unref: Whether to unref the setTimeout's.

Tldr

From December 6 to December 15 the AI had been available only in China or with Chinese proxies. Since December 16 the AI works for the rest of the world (UPD: still doesn't work in some countries) again so using proxies is not needed anymore, but it's limited and allows you to generate only one type of media. Seems like it's impossible to find FREE alive proxies. Don't waste your time searching and just buy it somewhere.

License

MIT