GithubHelp home page GithubHelp logo

sd-style-photo's Introduction

Text-to-Image and Image-to-Image with ControlNet Generation for Stable Diffusion

This project uses the Stable Diffusion API to generate images from text prompts and apply styles to images. It provides a user interface with two tabs: "Create Image" and "Style Image".

Create Image

In the "Create Image" tab, you can input a positive prompt and a negative prompt to generate an image. You can also adjust the number of steps for the image generation process. After clicking the "Generate" button, the generated image will be displayed.

Style Image

In the "Style Image" tab, you can upload an image and apply a style to it. The available styles are fetched from the Stable Diffusion API. You can also adjust the denoising strength and the number of steps for the image-to-image process. Additionally, you can select a ControlNet module and model to further refine the image-to-image process. After clicking the "Convert" button, the styled image will be displayed.

Dependencies

This project requires the following dependencies:

  • requests
  • gradio
  • python-dotenv

To install dependencies:

pip install -r requirements.txt

Usage

To run the project, simply execute the script using a Python interpreter:

python style-photo.py

This will launch the Gradio interface in your web browser. You can then interact with the interface to generate images from text prompts and apply styles to images.

Notes

  • The url variable in the script should be set to the address of your Stable Diffusion API instance.
  • The controlnetModule and controlnetModel variables in the "Style Image" tab can be adjusted to use different ControlNet modules and models.
  • The denoising_strength and img2imgSteps variables in the "Style Image" tab can be adjusted to control the denoising strength and number of steps for the image-to-image process.

sd-style-photo's People

Contributors

mrankitvish avatar

Watchers

 avatar

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.