Skip to content

SingleApi

Internet, programming, artificial intelligence

Menu
  • Home
  • About
  • My Account
  • Registration
Menu

StableDiffusion – intro

Posted on July 14, 2024

My beginnings with Stable Diffusion in Python made me to test different models. I test models from HuggingFace, and recently from Civitai. Models are pretrained or in form of LORAs, the last one I prefer more because of flexibility and possibility of merging them into one pipeline. Still I’m far from get the correct results, but I’m on it for 2 days or so.

Two parameters are very important to understand:
The guidance scale is a parameter that controls how closely the generated image adheres to the text prompt.
– Higher values (e.g., 7.5 or 15.0) make the image more closely match the prompt, but may result in less creative or diverse outputs.
– Lower values (e.g., 1.0 or 2.0) allow for more creative freedom but may produce images less related to the prompt.

Inference Steps -this parameter determines the number of denoising steps in the diffusion process.
– More steps (e.g., 50 or 100) generally result in higher quality images but take longer to generate.
– Fewer steps (e.g., 20 or 30) are faster but may produce lower quality or less detailed images.

I started to use 3 schedulers so far:
LCMScheduler (Latent Consistency Model Scheduler):

  • Designed for faster inference with fewer steps.
  • Can produce good quality images with as few as 4-8 inference steps.
  • Trades some quality for significantly faster generation times.

EulerAncestralDiscreteScheduler:

  • Based on the Euler method with ancestral sampling.
  • Often produces high-quality results with a good balance of detail and coherence.
  • Generally requires more steps than LCM but fewer than some other schedulers.

DPMSolverMultistepScheduler:

  • Uses dynamic programming to solve the diffusion ODE.
  • Can produce high-quality results in fewer steps compared to some other schedulers.
  • Often provides a good balance between speed and quality.

Other schedulers I have read that can be good solution are: DDIMScheduler (Denoising Diffusion Implicit Models), PNDMScheduler (Pseudo Numerical Methods for Diffusion Models), UniPCMultistepScheduler.

The choice of scheduler can significantly impact both the speed of generation and the quality of the output. LCM is often the fastest but may sacrifice some quality, while schedulers like EulerAncestral and DPMSolver often provide a good balance. The best choice can depend on your specific use case and the model we’re using.

What I had a problem also was aspect, by default images were generated as squares 512 x 512, or 1024 x 1024, but on some topics on Reddit I found probably obsoleted rank of resolutions:
SD 1.5 1:1, 512*512
SD 1.5 3:2 768*512
XL 1:1 1024*1024
XL 3.2 1216*832
XL 4:3 1152*896
XL 16:9 1344*768
XL 21:9 1536*640

Probably with time I will get some for Stable Diffusion 3 (if recent problems with tripods will be fixed).

Next day I will probably test ComfyUI, though in my tests I don’t need the UI.

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • Docker Desktop MCP toolkit
  • Hunyuan 3D 2.1, nVidia PartPacker, Sparc3D
  • HiDream
  • Jules
  • IntelliJ IDEA with free AI

Recent Comments

  • adrian on Kokoro TTS Model, LLM Apps Curated List
  • adrian on Repo Prompt and Ollama
  • adrian on A Content Creation Assistant

Archives

  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • November 2023
  • May 2022
  • March 2022
  • January 2022
  • August 2021
  • November 2020
  • September 2020
  • April 2020
  • February 2020
  • January 2020
  • November 2019
  • May 2019
  • February 2019

Categories

  • AI
  • Apple Intelligence
  • Claude
  • Cursor
  • DeepSeek
  • Gemini
  • Google
  • Graphics
  • IntelliJ
  • Java
  • LLM
  • Made in Poland
  • MCP
  • Meta
  • Open Source
  • OpenAI
  • Programming
  • Python
  • Repo Prompt
  • Technology
  • Uncategorized
  • Work

agents ai apple apps automation blender cheatsheet china claude comfyui deepseek docker draw things flux gemini google hidream hobby huggingface hugging face java langchain langchain4j llama llm mcp meta mlx movies news nvidia ollama openai personal thoughts quarkus release repo prompt speech-to-speech spring stable diffusion tts whisper work

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Terms & Policies

  • Privacy Policy
©2025 SingleApi | Design: Newspaperly WordPress Theme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT