Giter Club home page Giter Club logo

expo-stable-diffusion's Introduction

Hi 👋, I'm Andrei Zgîrvaci

Senior React Native Developer at Callstack

👋 About me

✍️ Latest from my Blog

expo-stable-diffusion's People

Contributors

andrei-zgirvaci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

expo-stable-diffusion's Issues

How to do Img2Img with the library

I found out about a project recently that restores photos of stillborn infants so that parents get to see their child the way they were meant to be born.

https://www.babyangelpics.com/

I know Stable Diffusion can do Img2Img on Hugging Face, and I was wondering how you could do the same with this library so that you could make an app that gives parents photos of their children from the ones taken from the birth while letting the parents keep their privacy.

Stable Diffusion Model never loads.

Hi and thank you for this great idea of making SD available in react-native with iOS.
I have tried to run the example you have given in the repository in my iPhone 13 Pro Max but I do not get any response from 'loadModel' method it awaits there forever no errors,warnings or whatsoever. its stuck at loading model log
What am I missing ? @andrei-zgirvaci

const MODEL_PATH = FileSystem.documentDirectory + "coreml-stable-diffusion-2-1";
const SAVE_PATH = FileSystem.cacheDirectory + "image.jpeg";

export default function App() {

  const loadModel = async () => {
    console.log("loading model");
    await ExpoStableDiffusion.loadModel(MODEL_PATH);
    console.log("loaded model");
  };

  const generateImage = async () => {
    console.log("generating");
    await ExpoStableDiffusion.generateImage({
      prompt: "a photo of an astronaut riding a horse on mars",
      stepCount: 25,
      savePath: SAVE_PATH,
    });
    console.log("generated");
  };

  return (
    <View style={styles.container}>
      <Text>Testing Expo Stable Diffusion</Text>

      <Button onPress={loadModel} title="Load the Model" />

      <Button onPress={generateImage} title="Generate the image" />
    </View>
  );
}

File "GeneratedImages/image.jpeg" does not exist.

Thanks for your great work, it is much appreciated.

I am using expo-dev-client. I have build a develop client for the simulator. I imitated your example.
After await ExpoStableDiffusion.loadModel(MODEL_PATH) followed by await ExpoStableDiffusion.generateImage(), after a few minutes "File "GeneratedImages/image .jpeg" does not exist" error.

What is wrong?

Here is my code

Does this work in Expo Go?

Hey, first, great work on your module! I like it!

Can I use this module in Expo Go, or do I need an development build?

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.