Skip to content

How to ONNX

ForserX edited this page May 4, 2023 · 9 revisions

Checkpoint

Startup

Before starting the generation, it is necessary to convert from the original model to ONNX format. image

  1. Open convert wnd
  2. Drop your (.ckpt/.safetensors/diffusers) model into form.
  3. Check that the parameters are correct. 1 - the format of your model. 2. ONNX
  4. Click to convert.
  5. Wait while the program reports readiness

Struct

File/Folder Useful information
cnet unet for ControlNet
feature_extractor
safety_checker nsfw checker
scheduler
text_encoder
tokenizer
unet
vae_decoder Default model VAE
vae_encoder Default model VAE
model_index.json Base model info
logo.(png/jpg) Optional: Preview pic

All models are forcibly optimized in float16 so that you have enough VRAM to use Textual Inversion/LoRA/LyCORIS/etc...

Generation Mode

Text to Image

image

  1. Setup prompt
  2. Setup negative prompt
  3. (Optional) Set sampler, size, steps count, image count, etc...
  4. (Optional) Set upscaler type and up-value
  5. Click "Make!" button

Image to Image

  1. Execute from "Text to Image" items 1-4 image
  2. Click "From Image"
  3. Set denoising value
  4. Click "Make!" button

Inpaint

  1. Execute from "Text to Image" items 1-4 image
  2. Click "From Image"
  3. (Optional) Set denoising value
  4. Make mask (Paint, Paint.NET, Photoshop, Gimp, etc...)
  5. Drop mask to mask box (*.png file)
  6. Click "Make!" button

Pix2Pix

  1. Execute from "Text to Image" items 1-4 image
  2. Click "From Image"
  3. (Optional) Set denoising value
  4. Enable "Pix2Pix"
  5. Click "Make!" button

ControlNet

  1. Execute from "Text to Image" items 1-4 image
  2. Enable ControlNet
  3. Set mode
  4. Set input pictures
  • Face: models/OpenFaces
  • Pose: models/OpenPose
  • Other: models/controlnet/gen/(mode name)

Generation preset

image

  1. Load image
  2. Set preset type
  3. Make preset

Model Extension

LoRA/LyCORIS

LoRA - Low-Rank Adaptation of Large Language Models LyCORIS - Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion.

Supported formats

Name Format
LoRA 1x1
1x1 + int alpha
3x3
3x3 + int alpha
LyCORIS Conventional LoRA
LoHA

Use

  1. Drop your .safetensors file to models/lora/
  • (Optional) You can make subdirectory

image

  1. Select subdirectory
  2. Select LoRA model
  3. Set LoRA apply weight
  4. Click "Apply"

Textual Inversion

Formats

  • Сoncept
  • String2Token
  • Embeddings Params

Use

  1. Drop your .pt/.safetensors file to models/

image

  1. Select your file
  2. Set TI weight (1-200)
  3. Apply tag to prompt
  4. (Optional) Delete the tag if it is no longer needed.
  5. (Optional) Move tag to negative prompt if you need it