Skip to content

Commit

Permalink
rename kdpm2 to dpm2
Browse files Browse the repository at this point in the history
  • Loading branch information
R3gm committed Jun 16, 2024
1 parent 343a220 commit c894f04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The goal of this project is to make Stable Diffusion more accessible, simple and

**Installation:**
```
pip install stablepy==0.3.0
pip install stablepy==0.4.0
```

**Usage:**
Expand All @@ -15,7 +15,7 @@ To use the project, simply create a new instance of the `Model_Diffusers` class.

Once you have created a new instance of the `Model_Diffusers` class, you can call the `model()` method to generate an image. The `model()` method takes several arguments, including the prompt, the number of steps, the guidance scale, the sampler, the image width, the image height, the path to the upscaler model (if using), etc.

**Demo:**
**Interactive tutorial:**

See [stablepy_demo.ipynb](https://github.com/R3gm/stablepy/blob/main/stablepy_demo.ipynb)

Expand All @@ -26,7 +26,7 @@ See [stablepy_demo.ipynb](https://github.com/R3gm/stablepy/blob/main/stablepy_de

**Examples:**

The following code examples show how to use the project to generate a text-to-image and an ControlNet diffusion:
The following code examples show how to use the project to generate a text-to-image and a ControlNet diffusion:

```python
from stablepy import Model_Diffusers
Expand Down Expand Up @@ -65,6 +65,7 @@ images, path_images = model(
prompt='highly detailed portrait of an underwater city, with towering spires and domes rising up from the ocean floor',
num_steps = 30,
image_resolution = 768,
preprocessor_name = "Canny",
guidance_scale = 7.5,
seed = 567,
FreeU = True,
Expand All @@ -77,10 +78,19 @@ images, path_images = model(

images[1]
```

**Documentation:**

In process
**📖 News:**

🔥 Version 0.4.0: New Update Details

- IP Adapter with the variants FaceID and Instant-Style
- New samplers
- Appropriate support for SDXL safetensors models
- ControlNet for SDXL: OpenPose, Canny, Scribble, SoftEdge, Depth, LineArt, and SDXL_Tile_Realistic
- New variant prompt weight with emphasis
- ControlNet pattern for SD1.5 and SDXL
- ControlNet Canny now needs the `preprocessor_name="Canny"`
- Similarly, ControlNet MLSD requires the `preprocessor_name="MLSD"`
- Task names like "sdxl_canny" have been changed to "sdxl_canny_t2i" to refer to the T2I adapter that uses them.

**Contributing:**

Expand Down
8 changes: 4 additions & 4 deletions stablepy/diffusers_vanilla/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
"DPM++ 3M Karras": (DPMSolverMultistepScheduler, {"solver_order": 3, "use_karras_sigmas": True}),
"DPM++ SDE": (DPMSolverSDEScheduler, {"use_karras_sigmas": False}),
"DPM++ SDE Karras": (DPMSolverSDEScheduler, {"use_karras_sigmas": True}),
"KDPM2": (KDPM2DiscreteScheduler, {}),
"KDPM2 Karras": (KDPM2DiscreteScheduler, {"use_karras_sigmas": True}),
"KDPM2 a": (KDPM2AncestralDiscreteScheduler, {}),
"KDPM2 a Karras": (KDPM2AncestralDiscreteScheduler, {"use_karras_sigmas": True}),
"DPM2": (KDPM2DiscreteScheduler, {}),
"DPM2 Karras": (KDPM2DiscreteScheduler, {"use_karras_sigmas": True}),
"DPM2 a": (KDPM2AncestralDiscreteScheduler, {}),
"DPM2 a Karras": (KDPM2AncestralDiscreteScheduler, {"use_karras_sigmas": True}),
"Euler": (EulerDiscreteScheduler, {}),
"Euler a": (EulerAncestralDiscreteScheduler, {}),
"Euler trailing": (EulerDiscreteScheduler, {"timestep_spacing": "trailing", "prediction_type": "sample"}),
Expand Down

0 comments on commit c894f04

Please sign in to comment.