sdxl


Namesdxl JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/KoushikNavuluri/stable-diffusion-xl-api/
SummaryReverse engineered API of Stable Diffusion XL 1.0 ( Midjourney Alternative ), A text-to-image generative AI model that creates beautiful 1024x1024 images.
upload_time2023-08-04 05:45:24
maintainer
docs_urlNone
authorKoushik
requires_python>=3.7
licenseMIT
keywords stable diffusion ai midjourney api requests images llm sdxl replicate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Stable Diffusion XL ( API )

   Reverse engineered API of Stable Diffusion XL 1.0 ( Midjourney Alternative ) via https://replicate.com/ , A text-to-image generative AI model that creates beautiful 1024x1024 images.

<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/d1022d40-05f0-4d2d-a37e-8cab7d444bec" width="900" >   

# Table of Contents

- [Stable Diffusion XL ( API )](#stable-diffusion-xl---api--)
  * [Prerequisites](#prerequisites)
  * [Installation](#installation)
  * [Usage](#usage)
  * [Send Prompt to generate image](#send-prompt-to-generate-image)
    + [Output](#output)
  * [Example Images Generated](#example-images-generated)
  * [Advanced Generation using parameters](#advanced-generation-using-parameters)
    + [List of parameters](#list-of-parameters)
  * [CLI Version](#cli-version)
  * [Disclaimer](#disclaimer)
  * [License](#license)

## Prerequisites

To use this API, you need to have the following:

Python installed on your system
requests library installed 
```bash
  pip install requests

```

## Installation

To use the Claude AI Unofficial API, you can either clone the GitHub repository or directly download the Python file.

Terminal :

    pip install sdxl
    
or

Clone the repository:

    git clone https://github.com/KoushikNavuluri/stable-diffusion-xl-api.git

## Usage
Import the claude_api module in your Python script:

    from sdxl import ImageGenerator

* Next, you need to create an instance of the ImageGenerator class:
  
```bash
client = ImageGenerator()
```
## Send Prompt to generate image
```bash
images = sdxl.gen_image(
    "Vibrant, Headshot of a serene, meditating individual surrounded by soft, ambient lighting.")
print(images)
```

### Output
<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/5f362c03-d8f1-462c-873a-40e47bdaea63" width="600" >

## Example Images Generated

<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/eb1976ac-0cf7-4817-9116-bd7384282380" width="200" >

<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/9bcfa7de-338e-48ca-a008-a068236d052c" width="200">

<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/a7ad3bc8-431a-40d3-a43f-aec9426b8f18" width="200" >

<img src="https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/1fd90d12-aaba-4fce-bf94-2077355a5d41" width="200">



## Advanced Generation using parameters

```bash
#Parameters set to their default values
images = sdxl.gen_image(prompt=
    "Vibrant, Headshot of a serene, meditating individual surrounded by soft, ambient lighting.",count=1, width=1024, height=1024, refine="expert_ensemble_refiner", scheduler="DDIM", guidance_scale=7.5, high_noise_frac=0.8, prompt_strength=0.8, num_inference_steps=50)
print(images)
```
### List of parameters

      *   prompt = Input text prompt
      *   width  = Width of output image(max:1024)
      *   height = height of output image(max:1024)
      *   count  = Number of images to output. (minimum: 1; maximum: 4) 
      *   refine = Which refine style to use ( no_refiner or expert_ensemble_refiner or base_image_refiner )
      *   scheduler = scheduler (valid_schedulers = ["DDIM" or "DPMSolverMultistep" or "HeunDiscrete" or "KarrasDPM" or "K_EULER_ANCESTRAL" or "K_EULER" or "PNDM"])
      *   guidance_scale = Scale for classifier-free guidance (minimum: 1; maximum: 50) 
      *   prompt_strength = Prompt strength in image (maximum: 1) 
      *   num_inference_steps = Number of denoising steps (minimum: 1; maximum: 500) 
      *   high_noise_frac = for expert_ensemble_refiner, the fraction of noise to use (maximum: 1)
      
## CLI Version

For cli version you can check example folder in this repository (filename:cli.py)

> How to:

```bash
python main.py "beautiful landscape with two kittens,realistic,4k" --count 1 --width 1024 --height 1024 --refine expert_ensemble_refiner --scheduler DDIM --guidance_scale 7.5 --high_noise_frac 0.6 --prompt_strength 0.9 --num_inference_steps 40

```

## Disclaimer

This project provides an unofficial API for Replicate's Stable Diffusion XL and is not affiliated with or endorsed by Replicate or Stable Diffusion. Use it at your own risk.

## License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License - see the LICENSE file for details.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KoushikNavuluri/stable-diffusion-xl-api/",
    "name": "sdxl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "stable diffusion,ai,midjourney,API,requests,images,llm,sdxl,replicate",
    "author": "Koushik",
    "author_email": "koushikk@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/a0/72/e8e46f1c2de0df7958f5ab37c519e7370b30b5751cc8b70a942bed0653b7/sdxl-1.0.0.tar.gz",
    "platform": null,
    "description": "# Stable Diffusion XL ( API )\r\n\r\n   Reverse engineered API of Stable Diffusion XL 1.0 ( Midjourney Alternative ) via https://replicate.com/ , A text-to-image generative AI model that creates beautiful 1024x1024 images.\r\n\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/d1022d40-05f0-4d2d-a37e-8cab7d444bec\" width=\"900\" >   \r\n\r\n# Table of Contents\r\n\r\n- [Stable Diffusion XL ( API )](#stable-diffusion-xl---api--)\r\n  * [Prerequisites](#prerequisites)\r\n  * [Installation](#installation)\r\n  * [Usage](#usage)\r\n  * [Send Prompt to generate image](#send-prompt-to-generate-image)\r\n    + [Output](#output)\r\n  * [Example Images Generated](#example-images-generated)\r\n  * [Advanced Generation using parameters](#advanced-generation-using-parameters)\r\n    + [List of parameters](#list-of-parameters)\r\n  * [CLI Version](#cli-version)\r\n  * [Disclaimer](#disclaimer)\r\n  * [License](#license)\r\n\r\n## Prerequisites\r\n\r\nTo use this API, you need to have the following:\r\n\r\nPython installed on your system\r\nrequests library installed \r\n```bash\r\n  pip install requests\r\n\r\n```\r\n\r\n## Installation\r\n\r\nTo use the Claude AI Unofficial API, you can either clone the GitHub repository or directly download the Python file.\r\n\r\nTerminal :\r\n\r\n    pip install sdxl\r\n    \r\nor\r\n\r\nClone the repository:\r\n\r\n    git clone https://github.com/KoushikNavuluri/stable-diffusion-xl-api.git\r\n\r\n## Usage\r\nImport the claude_api module in your Python script:\r\n\r\n    from sdxl import ImageGenerator\r\n\r\n* Next, you need to create an instance of the ImageGenerator class:\r\n  \r\n```bash\r\nclient = ImageGenerator()\r\n```\r\n## Send Prompt to generate image\r\n```bash\r\nimages = sdxl.gen_image(\r\n    \"Vibrant, Headshot of a serene, meditating individual surrounded by soft, ambient lighting.\")\r\nprint(images)\r\n```\r\n\r\n### Output\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/5f362c03-d8f1-462c-873a-40e47bdaea63\" width=\"600\" >\r\n\r\n## Example Images Generated\r\n\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/eb1976ac-0cf7-4817-9116-bd7384282380\" width=\"200\" >\r\n\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/9bcfa7de-338e-48ca-a008-a068236d052c\" width=\"200\">\r\n\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/a7ad3bc8-431a-40d3-a43f-aec9426b8f18\" width=\"200\" >\r\n\r\n<img src=\"https://github.com/KoushikNavuluri/stable-diffusion-xl-api/assets/103725723/1fd90d12-aaba-4fce-bf94-2077355a5d41\" width=\"200\">\r\n\r\n\r\n\r\n## Advanced Generation using parameters\r\n\r\n```bash\r\n#Parameters set to their default values\r\nimages = sdxl.gen_image(prompt=\r\n    \"Vibrant, Headshot of a serene, meditating individual surrounded by soft, ambient lighting.\",count=1, width=1024, height=1024, refine=\"expert_ensemble_refiner\", scheduler=\"DDIM\", guidance_scale=7.5, high_noise_frac=0.8, prompt_strength=0.8, num_inference_steps=50)\r\nprint(images)\r\n```\r\n### List of parameters\r\n\r\n      *   prompt = Input text prompt\r\n      *   width  = Width of output image(max:1024)\r\n      *   height = height of output image(max:1024)\r\n      *   count  = Number of images to output. (minimum: 1; maximum: 4) \r\n      *   refine = Which refine style to use ( no_refiner or expert_ensemble_refiner or base_image_refiner )\r\n      *   scheduler = scheduler (valid_schedulers = [\"DDIM\" or \"DPMSolverMultistep\" or \"HeunDiscrete\" or \"KarrasDPM\" or \"K_EULER_ANCESTRAL\" or \"K_EULER\" or \"PNDM\"])\r\n      *   guidance_scale = Scale for classifier-free guidance (minimum: 1; maximum: 50) \r\n      *   prompt_strength = Prompt strength in image (maximum: 1) \r\n      *   num_inference_steps = Number of denoising steps (minimum: 1; maximum: 500) \r\n      *   high_noise_frac = for expert_ensemble_refiner, the fraction of noise to use (maximum: 1)\r\n      \r\n## CLI Version\r\n\r\nFor cli version you can check example folder in this repository (filename:cli.py)\r\n\r\n> How to:\r\n\r\n```bash\r\npython main.py \"beautiful landscape with two kittens,realistic,4k\" --count 1 --width 1024 --height 1024 --refine expert_ensemble_refiner --scheduler DDIM --guidance_scale 7.5 --high_noise_frac 0.6 --prompt_strength 0.9 --num_inference_steps 40\r\n\r\n```\r\n\r\n## Disclaimer\r\n\r\nThis project provides an unofficial API for Replicate's Stable Diffusion XL and is not affiliated with or endorsed by Replicate or Stable Diffusion. Use it at your own risk.\r\n\r\n## License\r\nThis project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License - see the LICENSE file for details.\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Reverse engineered API of Stable Diffusion XL 1.0 ( Midjourney Alternative ), A text-to-image generative AI model that creates beautiful 1024x1024 images.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/KoushikNavuluri/stable-diffusion-xl-api/"
    },
    "split_keywords": [
        "stable diffusion",
        "ai",
        "midjourney",
        "api",
        "requests",
        "images",
        "llm",
        "sdxl",
        "replicate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "809750be0d2ea23991dea595f4c33031a1f14fe94975a434b1b69177ac3e2654",
                "md5": "905009bb72a7b44aa4b6ecd769e29eb6",
                "sha256": "0e6086719567126c1ac3bba6e3f07d7bedfc1d602c758b0b5960c6a786d53e4b"
            },
            "downloads": -1,
            "filename": "sdxl-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "905009bb72a7b44aa4b6ecd769e29eb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5282,
            "upload_time": "2023-08-04T05:45:22",
            "upload_time_iso_8601": "2023-08-04T05:45:22.757867Z",
            "url": "https://files.pythonhosted.org/packages/80/97/50be0d2ea23991dea595f4c33031a1f14fe94975a434b1b69177ac3e2654/sdxl-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a072e8e46f1c2de0df7958f5ab37c519e7370b30b5751cc8b70a942bed0653b7",
                "md5": "650e466cd9de04dcfcdf151904951f5d",
                "sha256": "389be1a73ce368f8e3c402900b543223130cf485338e8e1977ab99d760cd5e79"
            },
            "downloads": -1,
            "filename": "sdxl-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "650e466cd9de04dcfcdf151904951f5d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5137,
            "upload_time": "2023-08-04T05:45:24",
            "upload_time_iso_8601": "2023-08-04T05:45:24.587136Z",
            "url": "https://files.pythonhosted.org/packages/a0/72/e8e46f1c2de0df7958f5ab37c519e7370b30b5751cc8b70a942bed0653b7/sdxl-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-04 05:45:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KoushikNavuluri",
    "github_project": "stable-diffusion-xl-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sdxl"
}
        
Elapsed time: 0.09480s