Coder Social home page Coder Social logo

pierrunoyt / stable-diffusion-3-web-ui Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 18 KB

This is a web-based user interface for generating images using the Stability AI API. It allows users to enter a text prompt, select an output format and aspect ratio, and generate an image based on the provided parameters.

License: MIT License

HTML 38.51% JavaScript 35.00% CSS 26.50%

stable-diffusion-3-web-ui's Introduction

Here's the updated README file with the new features and changes:

Stability AI Image Generator

This is a web-based user interface for generating images using the Stability AI API. It allows users to enter a text prompt, select various parameters such as output format, aspect ratio, negative prompt, seed, and style preset, and generate an image based on the provided parameters.

Features

  • Generate images based on text prompts
  • Select output format (PNG, JPEG, or WebP)
  • Choose aspect ratio for the generated image
  • Specify a negative prompt to exclude certain elements from the generated image
  • Set a seed value for reproducible results
  • Choose from a curated list of style presets to guide the image generation
  • Display the generated image in the web interface with a download option
  • Show loading indicator while the image is being generated
  • Display error messages if the image generation fails

Prerequisites

To run this project, you need:

  • A web browser (Chrome, Firefox, Safari, etc.)
  • An API key from Stability AI

Getting Started

  1. Clone the repository or download the source code files.

  2. Open the script.js file in a text editor and replace 'YOUR_API_KEY' with your actual Stability AI API key:

const apiKey = 'YOUR_API_KEY';
  1. Open the index.html file in a web browser.

  2. Fill in the form with the following details:

    • Prompt: Enter a text description for the image you want to generate.
    • Aspect Ratio: Choose the aspect ratio for the generated image.
    • Negative Prompt: Specify elements or styles to exclude from the generated image (optional).
    • Seed: Enter a seed value for reproducible results (optional, default is 0 for random seed).
    • Style Preset: Select a style preset to guide the image generation (optional).
    • Output Format: Select the desired output format (PNG, JPEG, or WebP).
  3. Click the "Generate Image" button to send the request to the Stability AI API.

  4. The generated image will be displayed in the web interface, along with a download option.

File Structure

  • index.html: The main HTML file that contains the structure of the web interface.
  • styles.css: The CSS file that defines the styles for the web interface.
  • script.js: The JavaScript file that handles the form submission and communicates with the Stability AI API.

Dependencies

This project uses the following dependencies:

  • Axios: A promise-based HTTP client for making API requests.

API Reference

This project uses the Stability AI API to generate images. Specifically, it sends requests to the /v2beta/stable-image/generate/sd3 endpoint. For more information about the API and its usage, please refer to the Stability AI API documentation.

License

This project is open-source and available under the MIT License.

Acknowledgements

  • Stability AI for providing the image generation API.
  • Axios for simplifying HTTP requests.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Contact

If you have any questions or need further assistance, please contact [email protected].


stable-diffusion-3-web-ui's People

Contributors

pierrunoyt avatar

Stargazers

 avatar  avatar  avatar  avatar JARVISMindEngineer avatar

Watchers

 avatar

stable-diffusion-3-web-ui's Issues

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.