Giter Site home page Giter Site logo

josephrocca / dalle-encoder-decoder-js Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 347.54 MB

A JavaScript port of OpenAI's DALL-E encoder/decoder (using TensorFlow.js)

Home Page: https://josephrocca.github.io/dalle-encoder-decoder-js/demo.html

License: MIT License

Jupyter Notebook 60.16% HTML 12.14% JavaScript 27.70%

dalle-encoder-decoder-js's Introduction

DALL-E Encoder/Decoder for JavaScript

A JavaScript port of OpenAI's DALL-E encoder/decoder (using TensorFlow.js). Works in the browser but takes about 200x longer to encode/decode compared to Pytorch (not sure why - I'd have expected an order of magnitude difference but not >2 OOM). Should work in Deno once it gets OffscreenCanvas and WebGL support.

Demo

https://josephrocca.github.io/dalle-encoder-decoder-js/demo.html

Usage

import {encode, decode} from "./mod.js";

let latent = await encode("https://i.imgur.com/2BU6QVe.jpg"); // the encode function accepts a URL, or Image, or ImageData, or ImageBitmap, or Canvas, or OffscreenCanvas, etc.
console.log(latent);
let pixelData = await decode(latent);
console.log(pixelData);

// see demo.html for an expanded example

dalle-encoder-decoder-js's People

Contributors

josephrocca avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

reebby proales

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.