linux-ai-ml-envLinux Python environment for running Stable Diffusion models and PyTorch CUDA examples
1.0.0science=0 Package not present on quarterly.This port was created during this quarter. It will be in the next quarterly branch but not the current one.
This port provides a Linux Python environment tailored for running Stable Diffusion models on NVIDIA GPUs. It includes:
- A preconfigured Python environment with dependencies for Stable Diffusion and PyTorch examples.
- PyTorch examples.
- Sample scripts for running Stable Diffusion model and PyTorch examples.
¦ ¦ ¦ ¦
Manual pages:
FreshPorts has no man page information for this port.
To utilize CUDA support for PyTorch, both https://github.com/shkhln 's
compatibility library preloading and Linux compatibility layer usage are
required, as demonstrated in the provided demonstration scripts.
To play with Stable Diffusion copy it to a user-writable directory, edit at will
and launch it via ai-ml-env-python:
cp /usr/local/share/ai-ml-env/stable-diffusion-sample.py ~/
ai-ml-env-python stable-diffusion-sample.py
This will download data packages into ~/.cache/huggingface/hub/ during the
first-time run.
The port also provides Pytorch examples from the official GitHub repository.
To run and modify these examples, copy them to a user-writable directory
and then launch the entry point script via ai-ml-env-bash:
cp -r /usr/local/share/ai-ml-env/pytorch-examples ~/pytorch-examples
cd ~/pytorch-examples && ai-ml-env-bash ./run_python_examples.sh
You can then run
ai-ml-env-bash ./run_python_examples.sh clean
to remove downloaded data or just remove the whole directory to clean up
everything.