File size: 6,466 Bytes
39b1f8b c1a2d1e 4b2f485 c1a2d1e 0755c1e 4b2f485 0755c1e 39b1f8b c1a2d1e d4cfdb2 9bdc017 c1a2d1e ac6f015 30490e2 d4cfdb2 c1a2d1e ba44f93 4e5cc5a fcee8ee c1a2d1e fcee8ee 646841a c1a2d1e 4e5cc5a fcee8ee 4e5cc5a c1a2d1e fcee8ee 4e5cc5a a7bd2c9 c1a2d1e fcee8ee 4e5cc5a 45b629a fcee8ee 646841a c1a2d1e 646841a c1a2d1e fcee8ee c1a2d1e fcee8ee 519302a fcee8ee c1a2d1e 646841a c1a2d1e d4cfdb2 4b2f485 d4cfdb2 e8b8dcc a79dda5 b969a4a 519302a 0ae45cb c1a2d1e d4cfdb2 4e5cc5a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
---
license: apache-2.0
language:
- en
library_name: diffusers
pipeline_tag: text-to-image
tags:
- stable-diffusion
- stable-diffusion-xl
- sdxl
- SD-XL 0.9
- tutorial
- NathMath
---
### sdxl-0.9-usage
- This repo is a tutorial intended to help beginners use the new released model, stable-diffusion-xl-0.9 in ComfyUI, with both the base and refiner models together to achieve a magnificent quality of image generation.
- With usable demo interfaces for ComfyUI to use the models (see below)!
- After test, it is also useful on SDXL-1.0!
### Usage
- Here is a full tutorial to use stable-diffusion-xl-0.9 FROM ZERO!
- 1. - Go to Github and find the latest version of ComfyUI, which is a cutting-edge GUI interface for you to flexibly use all kinds of diffusion models.
- Note that in the link below, it provides both a standalone zip (includes a prepared python environment), and a source version.
- We highly recommend the first approach because we are all lazy buddies.
- Link: https://github.com/comfyanonymous/ComfyUI

- 2. - Extract all files into your disk if you have chosen the standalone version of this ComfyUI, or install all the dependences to create a essential python environment.
- Note that files extracted may not necessarilty be like the image shown below.

- 3. - Get into the folder or the environment you have just created when you have finished the last step.
- Next, what you can find includes those two ".bat" files named "run_cpu.bat" and "run_nvidia_gpu.bat" respectively.
- Then, choose the suitable option and click it, which means, to use CUDA (if you have NVDIA GPUs) or not, and double click to run the script.
- Note that with the application of xformers, you do not need to load all of your models simultaneously, but those gargantuan weights are going to be temporarily stored in RAM and move back and force when interfereing.

- 4. - Download the latest version of stable-diffusion-xl-base-0.9 and stable-diffusion-xl-refiner-0.9 from the official repo on huggingaface.
- It is appreciated that your availability of the model has become unprecedentedly effortless now, so hurry up and get on.
- Note that for generation use, you do not need to download all model components, but only the two "safetensors" from the repo, which are respectively "sd_xl_base_0.9.safetensors" and "sd_xl_refiner_0.9.safetensors".
- Link: https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9
- Link: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-0.9
- 5. - Move your "base" and "refiner" models into the ComfyUI's subfolder, like "...\ComfyUI\models\checkpoints\", where "..." means your root folder of your ComfyUI environment.
- Click the file folder of THIS REPO and find some files named "sdxl-0.9-...-.json", which is a demo environment I have created for testing and using the stable-diffusion-xl-0.9 in ComfyUI.
- Note that the 3-digit number in the file name represents the version of my demo, and always, you should download the latest one owning the biggest number.
- Link: https://huggingface.co/NathMath/sdxl-0.9-usage/tree/main

- 6. - When you have loaded into the ComfyUI, it will display this default interface shown below:

- Then, find out the "load" button on a floating panel, click, and choose the ".json" file download from THIS REPO, it will quickly load a friendly interface to use the stable-diffusion-xl-0.9 series.

- Things will become easy soon.
- As labels of all components are shown explicitly in interface, you can find enterpoints and panels by their names.
- Then, load "base" and "refiner" models, set relevant parameters, and type your favorite prompts to start your exciting journey.
- Note that it will automatically save TWO images of EACH queue, respectively before applying with the refiner, and after.
- 7. - Congratulations, you have sucessfully learned how to use sdxl with FULL MODELS.
### Tips
- Positive prompts and Negative prompts in both input box are ought to be identical, but you can freely try whatever you want.
- The output quality of the stable-diffusion-xl-0.9 models highly depends on your prompts and parameter settings, so try to adjust them to achieve a better quality.
Note that these pretrained models (have not been fine tuned yet) need to be fed with enough details about your PAINTING STYLE, so try to provide sufficient information to ensure the output quality.
- Although ComfyUI's model moving technique (move models to VRAM when using and move back to RAM after) can significantly reduce the required VRAM use, please note,
possibly, if your models are combined with FP16 and FP32, there could be a round-off error when converting data between these two formats. The main reason why it happens may
mainly due to the internal codes, and because of this, you'd better RESTART the interface to reload models from your disk every 200 times, for example, to maintain precise weights and eusure best image quality.
- Different from previous diffusion models, this stable-diffusion-xl-0.9 is naturally designed for high resolution image generation, so
in order to achieve a decent quality, please use a relatively higher resolution, for recommendation, 1024 * 1024.
- This is not the final version of this repo. I will frequently update demos for further applications and advanced functions, so if you are interested, please like it.
- Need to be updated...
### Q&A
- Please feel free to leave any questions in the community of this repo, and I will soon answer them if I am able to solve. |