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
#!/usr/bin/env python3 | |
import os, math, glob, time, json, csv, subprocess, random | |
from pathlib import Path | |
import torch | |
from torch import nn | |
from PIL import Image | |
import numpy as np | |
from tqdm import tqdm | |
from diffusers import StableDiffusionXLPipeline, DDPMScheduler, EulerAncestralDiscreteScheduler |
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
#!/usr/bin/env python3 | |
import os, math, glob, time, json, csv, subprocess, random | |
from pathlib import Path | |
import torch | |
from torch import nn | |
from PIL import Image | |
import numpy as np | |
from tqdm import tqdm | |
from diffusers import StableDiffusionXLPipeline, DDPMScheduler, EulerAncestralDiscreteScheduler |
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
#!/usr/bin/env python3 | |
import os, glob | |
from pathlib import Path | |
import torch | |
from PIL import Image | |
import numpy as np | |
from diffusers import AutoencoderKL | |
print("="*80) | |
print("DIAGNÓSTICO DO DATASET") |
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
#!/bin/bash | |
set -e | |
echo "================================================================================" | |
echo "INSTALAÇÃO E TREINAMENTO LORA COM KOHYA SS" | |
echo "================================================================================" | |
cd /workspace | |
# Clonar Kohya SS se não existir |
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
#!/usr/bin/env python3 | |
""" | |
Script simples para treinar LoRA SDXL usando PEFT (Hugging Face) | |
Baseado na documentação oficial e exemplos testados | |
""" | |
import os | |
os.environ["CUDA_VISIBLE_DEVICES"] = "0" | |
import torch | |
import glob |