在 Kohya 使用多解析度訓練,在 datasets 的配置上可以採用以下規則:
| 解析度 | 說明 |
|---|
| import argparse | |
| import re | |
| import torch | |
| from safetensors.torch import load_file, save_file | |
| import sys | |
| import os | |
| # ============================================================================ | |
| # 輔助函數:鍵和層處理 |
| { | |
| "id": "25ddb7ca-28dd-436d-989c-dd4a5b171975", | |
| "revision": 0, | |
| "last_node_id": 430, | |
| "last_link_id": 1471, | |
| "nodes": [ | |
| { | |
| "id": 68, | |
| "type": "ConditioningSetTimestepRange", | |
| "pos": [ |
| { | |
| "LoRA_type": "LyCORIS/LoCon", | |
| "LyCORIS_preset": "full", | |
| "adaptive_noise_scale": 0, | |
| "additional_parameters": "--log_prefix=sdxl_ --enable_wildcard --keep_tokens_separator=\"___\"", | |
| "async_upload": false, | |
| "block_alphas": "", | |
| "block_dims": "", | |
| "block_lr_zero_threshold": "", | |
| "bucket_no_upscale": true, |
| import os | |
| import sys | |
| import shutil | |
| import argparse | |
| import base64 | |
| import requests | |
| import json | |
| from PIL import Image | |
| from io import BytesIO | |
| from tqdm import tqdm |
| { | |
| "LoRA_type": "LyCORIS/LoCon", | |
| "LyCORIS_preset": "full", | |
| "adaptive_noise_scale": 0, | |
| "additional_parameters": "--log_prefix=xl-locon --enable_wildcard", | |
| "async_upload": false, | |
| "block_alphas": "", | |
| "block_dims": "", | |
| "block_lr_zero_threshold": "", | |
| "bucket_no_upscale": true, |
| import os | |
| import sys | |
| from PIL import Image | |
| import cv2 | |
| import numpy as np | |
| import math | |
| import shutil | |
| from typing import NamedTuple, Tuple | |
| import argparse | |
| from prettytable import PrettyTable |
| FROM nvidia/cuda:12.3.2-runtime-ubuntu22.04 | |
| WORKDIR /app | |
| RUN apt update && apt upgrade -y | |
| RUN apt install -y wget git python3 python3-dev python3-pip python3-venv libgl1 libglib2.0-0 apt-transport-https libgoogle-perftools-dev libgoogle-perftools4 libtcmalloc-minimal4 bc jq | |
| COPY entrypoint.sh /app/entrypoint.sh | |
| RUN chmod +x /app/entrypoint.sh | |
| RUN useradd -m webui | |
| RUN chown -R webui:webui /app \ |
I hereby claim:
To claim this, I am signing this object:
| FROM openresty/openresty:alpine | |
| MAINTAINER Hina Chen <hinablue@gmail.com> | |
| WORKDIR /build | |
| # Install Nginx | |
| RUN apk --update add \ | |
| nginx \ | |
| nginx-mod-http-lua \ | |
| nginx-mod-http-lua-upstream |