Skip to content

venetanji/rndfd

Repository files navigation

Showcase app for react-native-diffusers.js: Generate images on your mobile device using the diffusers.js library.

Getting Started

Note: Make sure you have completed the React Native - Environment Setup

Step 1: Start the Metro Server

To start Metro, run the following command from the root of your React Native project:

yarn install
yarn start

Step 2: Start your Application

Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:

For Android

# using npm
npm run android

# OR using Yarn
yarn android

For iOS

# using npm
npm run ios

# OR using Yarn
yarn ios

Step 3: First run

During the first run the app will download an optimized model from huggingface. This will take a few minutes. Subsequent runs will be faster. The LCM model used in this can be found here: https://huggingface.co/venetanji/ds8lcm (Dreamshaper 8 LCM).

Session handling

Make sure to call .release() on the pipeline once the app closes.