Skip to main content

A demo of stable diffusion in napari

Project description

napari-stable-diffusion

License BSD-3 PyPI Python Version tests codecov napari hub

A demo of stable diffusion in napari.


This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

demo image of napari-stable-diffusion of the prompt "a unicorn and a dinosaur eating cookies and drinking tea"

Installation

You can install napari-stable-diffusion via pip:

pip install napari-stable-diffusion

To install latest development version :

pip install git+https://github.com/kephale/napari-stable-diffusion.git

You will also need to sign up with HuggingFace and generate an access token to get access to the Stable Diffusion model we use.

When you have generated your access token you can either permanently set the HF_TOKEN_SD environment variable in your .bashrc or whichever file your OS uses, or you can include it on the command line

HF_TOKEN_SD="hf_aaaAaaaasdadsadsaoaoaoasoidijo" napari

For more information on the Stable Diffusion model itself, please see https://huggingface.co/CompVis/stable-diffusion-v1-4.

Apple M1 specific instructions

To utilize the M1 GPU, the nightly version of PyTorch needs to be installed. Consider using conda or mamba like this:

mamba create -c pytorch-nightly -n napari-stable-diffusion python=3.9 pip pyqt pytorch torchvision
pip install git+https://github.com/kephale/napari-stable-diffusion.git

Next steps

  • Image 2 Image support
  • Inpainting support

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-stable-diffusion" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari-stable-diffusion-0.0.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

napari_stable_diffusion-0.0.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file napari-stable-diffusion-0.0.1.tar.gz.

File metadata

File hashes

Hashes for napari-stable-diffusion-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f089c6253afc95a786318cf8cbedb5f78e738cc09162efe1df91bc811396af3e
MD5 030b6e448aec2afeea4a67760cb11008
BLAKE2b-256 7fae4b1adf4ae8368b9cf66e8ba75989229398e233083220b2b6007bf0cf2378

See more details on using hashes here.

File details

Details for the file napari_stable_diffusion-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_stable_diffusion-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 931b874d23e6a1d45c56a0f088f61771f7e1c84f3c0f8fbcfb938a98c580d2d6
MD5 c65c6d6eb9d1236f9a64edf566c92f14
BLAKE2b-256 b2a8adef4dd542cfe3b3d520a666c3a9d94bef88b4dd2069d165442aa35896b8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page