This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pretrained_model_name_or_path = "models/animagine-xl-3.1.safetensors" | |
| train_data_dir = "train_data" | |
| output_dir = "models/LoRA" | |
| max_train_steps = 500 | |
| network_module = "networks.lora" | |
| xformers = true | |
| gradient_checkpointing = true | |
| persistent_data_loader_workers = false | |
| max_data_loader_n_workers = 0 | |
| enable_bucket = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "book": "Test", | |
| "pages": [ | |
| { | |
| "page": 0, | |
| "width": 1654, | |
| "height": 1170, | |
| "texts": [ | |
| { | |
| "text": "ใใใซใกใฏใใใๅคฉๆฐใงใใญ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ๅญฆ็ฟใซใฏใhttps://gist.github.com/tori29umai0123/fc51ea86aedc1b1e394b12829d1c95e5ใใฎใใใชๅฝขๅผใฎใใผใฟใปใใใๅฉ็จใใ | |
| # Manga109-sใฎใขใใใผใทใงใณใใผใฟ๏ผhttp://www.manga109.org/ja/annotations.html๏ผใๅ ใซไฝๆ | |
| import os | |
| import glob | |
| import json | |
| import argparse | |
| import torch | |
| from torch.utils.data import Dataset, DataLoader | |
| import torch.nn as nn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import configparser | |
| import copy | |
| import math | |
| import os | |
| import sys | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib as mpl | |
| from scipy.interpolate import PchipInterpolator | |
| from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import time | |
| import socket | |
| import gradio as gr | |
| from llama_cpp import Llama | |
| import datetime | |
| from jinja2 import Template | |
| import configparser | |
| import threading |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| from pathlib import Path | |
| import re | |
| from sentence_transformers import SentenceTransformer | |
| import faiss | |
| from llama_cpp import Llama | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| from pathlib import Path | |
| import re | |
| from langchain_core.prompts import ChatPromptTemplate | |
| from langchain.chains import create_retrieval_chain | |
| from langchain.chains.combine_documents import create_stuff_documents_chain | |
| from langchain_community.vectorstores import FAISS | |
| from langchain_community.llms import LlamaCpp | |
| from langchain.prompts import PromptTemplate | |
| from langchain_core.documents import Document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from concurrent.futures import ThreadPoolExecutor | |
| from PIL import Image, ImageFilter | |
| from PIL import Image, ImageFilter | |
| def apply_blur_to_image(image_path, output_path, blur_radius): | |
| """ๆๅฎใใใ็ปๅใซใใฉใผๅนๆใ้ฉ็จใใๆๅฎใใใใในใซไฟๅญใใ""" | |
| try: | |
| image = Image.open(image_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #็ท็ปใใ็ปๅใใใ็ท็ปใๅใ้คใในใฏใชใใใ็ท็ปใๅใ้คใใใ็ปๅ๏ผimage_dir๏ผใใใใฐๅใใ็ท็ปๅ ฅๅไธ่ฆใ | |
| from PIL import Image, ImageFilter, ImageOps | |
| from collections import defaultdict | |
| from skimage import color as sk_color | |
| from tqdm import tqdm | |
| from skimage.color import deltaE_ciede2000, rgb2lab | |
| import cv2 | |
| import numpy as np | |
| import os |