{ "cells": [ { "cell_type": "markdown", "id": "dc8d5cc9", "metadata": {}, "source": [ "# Transformers - stable diffusion example\n", "Transformers provides APIs and tools to easily download and train state-of-the-art pretrained models. \n", "Credits: Huggingface documentation and examples \n", "https://github.com/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb" ] }, { "cell_type": "code", "execution_count": null, "id": "62c4cd92", "metadata": { "scrolled": true }, "outputs": [], "source": [ "# install dependencies\n", "!pip install diffusers==0.11.1\n", "!pip install transformers scipy ftfy accelerate" ] }, { "cell_type": "code", "execution_count": 2, "id": "e1b62c09", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a025122b2cbb4aefa1522972e999e70a", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading (…)ain/model_index.json: 0%| | 0.00/541 [00:00" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Display the image\n", "image" ] }, { "cell_type": "code", "execution_count": null, "id": "4dc5239e", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.9" } }, "nbformat": 4, "nbformat_minor": 5 }