Installation
pip install diffusersplus
Usage
Stable Diffusion Text2Image Generate:
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="stable-txt2img",
stable_model_id="dreamlike-art/dreamlike-anime-1.0",
scheduler_name="DDIM"
)
output = model(
prompt="A photo of a anime character",
negative_prompt="bad",
num_images_per_prompt=1,
num_inference_steps=30,
guidance_scale=7.0,
guidance_rescale=0.0,
generator_seed=0,
height=512,
width=512,
)
Stable Diffusion Image2Image Generate:
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="stable-img2img", stable_model_id="dreamlike-art/dreamlike-anime-1.0", scheduler_name="DDIM"
)
output = model(
image_path="../data/image.png",
prompt="A photo of a cat.",
negative_prompt="bad",
num_images_per_prompt=1,
num_inference_steps=50,
guidance_scale=7.0,
strength=0.5,
generator_seed=0,
resize_type="center_crop_and_resize",
crop_size=512,
height=512,
width=512,
)
### Stable Diffusion Upscale:
```python
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="stable-upscale", stable_model_id="stabilityai/stable-diffusion-x4-upscaler", scheduler_name="DDIM"
)
output = model(
image_path="../data/image.png",
prompt="A photo of a anime character.",
negative_prompt="bad",
resize_type="center_crop_and_resize",
noise_level=20,
num_images_per_prompt=1,
num_inference_steps=20,
guidance_scale=7.0,
generator_seed=0,
)
Controlnet:
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="controlnet",
stable_model_id="dreamlike-art/dreamlike-anime-1.0",
controlnet_model_id="lllyasviel/sd-controlnet-canny",
scheduler_name="DDIM",
)
output = model(
image_path="../data/image.png",
prompt="A photo of cat.",
negative_prompt="bad",
height=512,
width=512,
preprocess_type="Canny",
resize_type="center_crop_and_resize",
guess_mode=False,
num_images_per_prompt=1,
num_inference_steps=50,
guidance_scale=7.0,
controlnet_conditioning_scale=0.2,
generator_seed=0,
)
Controlnet Inpaint
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="controlnet-inpaint",
stable_model_id="dreamlike-art/dreamlike-anime-1.0",
controlnet_model_id="lllyasviel/sd-controlnet-canny",
scheduler_name="DDIM",
)
output = model(
image_path="../data/image.png",
mask_path="../data/mask_image.png",
prompt="A photo of a cat.",
negative_prompt="bad",
height=512,
width=512,
preprocess_type="Canny",
resize_type="center_crop_and_resize",
strength=0.5,
guess_mode=False,
num_images_per_prompt=1,
num_inference_steps=50,
guidance_scale=7.0,
controlnet_conditioning_scale=1.0,
generator_seed=0,
)
Controlnet Image2Image
from diffusersplus.automodel import diffusion_pipeline
model = diffusion_pipeline(
task_id="controlnet-img2img",
stable_model_id="dreamlike-art/dreamlike-anime-1.0",
controlnet_model_id="lllyasviel/sd-controlnet-canny",
scheduler_name="DDIM",
)
output = model(
image_path="../data/image.png",
prompt="A photo of a cat.",
negative_prompt="bad",
height=512,
width=512,
preprocess_type="Canny",
resize_type="center_crop_and_resize",
guess_mode=False,
num_images_per_prompt=1,
num_inference_steps=20,
guidance_scale=7.0,
controlnet_conditioning_scale=1.0,
strength=0.5,
generator_seed=0,
)
Metadata
Release files for diffusersplus 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffusersplus-0.0.1.tar.gz | 18.0 kB | Without provenance | Details for diffusersplus-0.0.1.tar.gz |
Release files / diffusersplus-0.0.1.tar.gz
| Download URL | diffusersplus-0.0.1.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abb95817ac7b215b7e8a4ab43177f7791556fe5bc4fa051de4c26d03ce5d83df
|
|
BLAKE2b-256 checksum How to use checksums |
5376916788c0fabe67855b99f20e0c8a40d6e01cbc9e097493c0757ddd6fa88f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for diffusersplus 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.