Generación de imágenes con Stable Diffusion

1

Generación de imágenes con Stable Diffusion Online

2

¿Cómo funciona text-to-Image: difussion?

3

Stable Diffusion con Google Colab y DreamStudio

Quiz: Generación de imágenes con Stable Diffusion

Generación de imágenes desde AUTOMATIC 11111

4

Instalación de AUTOMATIC 1111

5

AUTOMATIC 1111: interfaz web de Stable Diffusion

Quiz: Generación de imágenes desde AUTOMATIC 11111

Mejora de prompts para Stable Diffusion

6

Prompt tuning con Stable Diffusion

7

Prompt tuning con Stable Diffusion: práctica

Quiz: Mejora de prompts para Stable Diffusion

Inpainting y outpainting con Stable Diffusion

8

Stable Diffusion: Inpainting

9

Instalación de PaintHua

10

Stable Diffusion: Outpainting con PaintHua

Quiz: Inpainting y outpainting con Stable Diffusion

Funciones avanzadas de Stable Diffusion

11

Upscale: escalado de imágenes

12

Image-to-Image

13

Depth-to-Image

14

Merge models: combinar modelos de difussion

15

Qué es Control Net de Stable Difussion y cómo utilizarlo.

Quiz: Funciones avanzadas de Stable Diffusion

DreamBooth: fine tuning de modelos de difusión

16

¿Cómo funciona DreamBooth?

17

DreamBooth: fine-tuning

Quiz: DreamBooth: fine tuning de modelos de difusión

Implicaciones éticas y económicas de imágenes con inteligencia artificial

18

Sesgos y bias en modelos de generación de imágenes

19

¿Cómo afecta la generación de imágenes con IA a otras profesiones?

20

Impacto de arte y diseño con IA: entrevista con Daniel Torres Burriel

21

Perspectiva de artistas y diseñadoras: entrevista con Amelia Amórtegui

Quiz: Implicaciones éticas y económicas de imágenes con inteligencia artificial

Conclusión

22

¿Qué esperar de Stable Diffusion y el open source en el futuro?

You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
9 Hrs
35 Min
35 Seg

AUTOMATIC 1111: interfaz web de Stable Diffusion

5/23
Resources

What is Automatic 1111 and how is it used?

Automatic 1111 is a graphical interface for running the Stable Diffusion model or any other diffusion-based model. This tool is widely used and is quickly updated with new versions of Stability AI models. In this course, we will use Automatic 1111 to facilitate working with these models.

To begin, we need to access the official Automatic 1111 repository on GitHub, where we will find the interface and can clone the repository via git. The repository contains a README file with details on how to use the interface, available features, and an installation guide for different operating systems.

How to install Automatic 1111?

Installation of Automatic 1111 is straightforward, especially if you have an NVIDIA graphics card, as AMD is not recommended. The basic steps vary depending on your operating system:

  1. Windows:

    • Install Python 3.10.
    • Clone the Automatic 1111 repository.
    • Download the CKPT file of the models and place it in the 'Models' folder.
    • Run the .bat file.
  2. Linux/UNIX:

    • Install a Python 3.10 environment.
    • Run the webui.sh script to launch the graphical interface.

Both processes require downloading the CKPT file, which is a trained model that we store locally for use with Automatic 1111.

How to configure models in Automatic 1111?

Once the repository is cloned and the installation is configured, it is crucial to understand how to manage Stable Diffusion models:

  1. Downloading models:

    • Head to Hugging Face to search for models as Stable Diffusion 2.0.
    • Download the appropriate CKPT file for your use.
  2. Model Placement:

    • CKPT files should be placed in the appropriate model folder, e.g. models/stable diffusion.
    • Make sure that each model has its corresponding YAML configuration file.

How to use the Automatic 1111 graphical interface?

Once installed and configured, you can run the GUI from the terminal if you are on a UNIX system or directly through the executable file on Windows:

  • Running from the terminal:

    • Go to the folder where webui.sh is located and run:
      ./webui.sh
  • Interaction with the interface:

    • Automatic 1111 will load the models and allow you to generate images from text.
    • You can configure several options, such as the number of iterations, sampler type, image dimensions, among others.

Through this interface, you can make multiple adjustments to improve the quality of the generated images and experiment with different prompts. A local URL is provided to access the graphical interface from a browser.

What are the advantages of using Automatic 1111?

Automatic 1111 is a powerful tool for users interested in image generation through diffusion, because:

  • Ease of interaction: it offers a user-friendly interface that allows handling models without having to deal directly with complex commands.
  • Breadth of functions: Supports a wide variety of diffusion models and allows customizing multiple generation parameters.
  • Constant updates: Keeps up to date with the latest versions of Stable Diffusion models and other emerging technologies in the field of artificial intelligence.

Final recommendations

Once you become familiar with Automatic 1111, you will explore a world of possibilities in image creation, from written language to digital art. Remember to consult Hugging Face for free models and to tailor your tools to your creative needs. To improve your understanding, we recommend you delve into prompts adjustment techniques and try different settings to achieve the best results.

Automate, experiment and discover the infinite potential Automatic 1111 offers for digital creativity.

Contributions 24

Questions 2

Sort by:

Want to see more contributions, questions and answers from the community?

Hola Chic@s 😃!

Aqui les comparto mi primer prompt con AUTOMATIC 1111: interfaz web de Stable Diffusion 😉

Recomendación: Prueben los samplers DDIM y Karras, entre 30 y 40 sampling steps. La relación entre velocidad/calidad es bastante buena.

Hubiera sido más útil para la mayoría de los mortales que mostraran como se instala en windows.

Prompt: A cinematic shot of two futuristic androids fighting in a dark alley

Por si llegan a tener el error:

RuntimeError: Cannot add middleware after an application has started

La solución es actualizar fast api

Linux

/usr/local/bin/python -m pip install --upgrade fastapi==0.90.1

Windows

.\venv\Scripts\python.exe -m pip install --upgrade fastapi==0.90.1

Colab

!pip install --upgrade fastapi==0.90.1

Información resumida de esta clase
#EstudiantesDePlatzi

  • Es buena idea leer el archivo readme de Automatic 1111

  • NVIDIA parece funcionar mejor

-Esta interfaz es muy amigable

  • Las imágenes son de muy buena calidad

  • También me permite definir Prompts negativos

De Chat GPT:

En resumen, un archivo .ckpt es un archivo utilizado para almacenar y guardar los pesos y parámetros de un modelo de redes neuronales entrenado, permitiendo la reutilización y recuperación del modelo en un punto específico del entrenamiento.

por favor coloque en los recursos la extension yamel

Buenas tardes yo logre correr la aplicacion pero cuando ejecuto para generar la imagen me indica:
RuntimeError:“LayerNomKemelImpl” not implemented for half

Me aparecia el errro "out of memory error: CUDA out of memory", por lo qu estuve leyendo es que no hay suficiente GPU, logre superar este error utilizando "--xformers --upcast-sampling --precision full --medvram --no-half-vae" el la linea de comando de argumentos del archivo .bat de automatic1111, despues de esto me corrio sin problema ¿Pero alguien sabe a nivel tecnico este copmando que hace? ¿Reduce la calidad?![](https://static.platzi.com/media/user_upload/image-a0f1ec48-ed46-4ea8-ac23-eb0fbd61b94b.jpg)

El curso de Git y GitHub es altamente recomendable.

Puedes agregar la opción --skip-torch-cuda-test al final del comando ./webui.sh de la siguiente manera:


./webui.sh --skip-torch-cuda-test

Esto debería evitar que se ejecute el test de CUDA de PyTorch y permitir que el script se ejecute sin errores.

Por si a alguien más le sucede el error "NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check." Parece ser un problems de la version 2.1. Así que quedense con la 2.0. Ref: <https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/6923>

![](

En un tiempo ComfyUI va a ser el estándar, por lo que aunado a automatic1111 sería bueno que le echen el ojo (Es más complicado de instalar, pero puedes instalar custom templates de la comunidad y otras cosas locas). Les dejo un tutorial que me sirvió bastante <https://youtu.be/5dBAIhx28ow>

Para los que tengan computadores con poca VRAM, les recomiendo usar Fooocus, pueden usarlo localmente o en Google Colab y tiene una interfaz y funciones muy similares, les recomiendo activar el modo avanzado, ya que allí sé encuentran las funciones más interesantes ya sea para configurar los estilos o los hiperparámetros

“¡Fascinante!” es tener StableDiffusion en tu equipo local.

como puedo usar AUTOMATIC 1111 en google colab?

Para poder usarlo online les dejo este recurso, hacemos uso de Google colas.

Tutorial
Oficial Colabs

Descargue y lo configure en mi Mac y se demora resto, lo mejor es utilizar servicios web…

Mi laptop tiene Intel ® UHD Graphics, servirá?

Es mucho más amigable