Skip to content

Instantly share code, notes, and snippets.

View appliedintelligencelab's full-sized avatar

Applied Intelligence Lab appliedintelligencelab

View GitHub Profile
@appliedintelligencelab
appliedintelligencelab / dataset.toml
Created August 22, 2024 18:21
Kohya SS' Flux dataset config
[general]
shuffle_caption = false
caption_extension = '.txt'
keep_tokens = 1
# This is a DreamBooth-style dataset
[[datasets]]
resolution = 512
batch_size = 1
keep_tokens = 1
@appliedintelligencelab
appliedintelligencelab / train.sh
Created August 22, 2024 18:20
Kohya SS' Flux training script
accelerate launch --mixed_precision bf16 --num_cpu_threads_per_process 1 flux_train_network.py --pretrained_model_name_or_path /home/hal/assets/models/unet/flux1-dev.sft --clip_l /home/hal/assets/models/clip/clip_l.safetensors --t5xxl /home/hal/assets/models/clip/t5xxl_fp16.safetensors --ae /home/hal/assets/models/vae/ae.sft --cache_latents_to_disk --save_model_as safetensors --sdpa --persistent_data_loader_workers --max_data_loader_n_workers 2 --seed 42 --gradient_checkpointing --mixed_precision bf16 --save_precision bf16 --network_module networks.lora_flux --network_dim 4 --optimizer_type adamw8bit --learning_rate 1e-4 --network_train_unet_only --cache_text_encoder_outputs --cache_text_encoder_outputs_to_disk --fp8_base --highvram --max_train_epochs 16 --save_every_n_epochs 4 --dataset_config dataset.toml --output_dir /home/hal/assets/training-output/hnia --output_name flux-lora-hnia --timestep_sampling sigmoid --model_prediction_type raw --guidance_scale 1.0 --loss_type l2 --optimizer_type adafactor --opti
@appliedintelligencelab
appliedintelligencelab / workflow-alien.json
Created October 17, 2023 01:59
ComfyUI workflow with vid2vid AnimateDiff to create alien-like girls
{
"last_node_id": 107,
"last_link_id": 229,
"nodes": [
{
"id": 5,
"type": "PrimitiveNode",
"pos": [
1145,
469
@appliedintelligencelab
appliedintelligencelab / webui-user.ps1
Created September 29, 2023 20:50
Powershell script to start Stable Diffusion Web UI (change first line)
$fullPath = "C:\Users\appli\Apps\stable-diffusion-webui\webui.py"
$path = Split-Path $fullPath -Parent
$file = Split-Path $fullPath -leaf
$Env:COMMANDLINE_ARGS = "--xformers --autolaunch --no-half-vae"
$Env:CUDA_VISIBLE_DEVICES = "0"
cd "$path"
.\venv\Scripts\activate
@appliedintelligencelab
appliedintelligencelab / ndel.bat
Created September 26, 2023 12:14
Batch file to delete every nth file matching the spec
@echo off
::: ndel - Deletes every nth file matching the spec
::: syntax: ndel.bat FILESPEC [skipcount] [sortorder]
::: FILESPEC - Files to be searched through
::: skipcount - number of files to skip (optional - default 3)
::: sortorder - File order (see: DIR for options - default N (name))
:: With no arguments show the above usage text
if "%~1"=="" findstr "^:::" "%~f0"&GOTO:EOF
set find=%1
{
"last_node_id": 87,
"last_link_id": 180,
"nodes": [
{
"id": 59,
"type": "Reroute",
"pos": [
-150.35178124999982,
644.4360633544919
@appliedintelligencelab
appliedintelligencelab / sdxl-pixel-art-workflow.json
Created August 3, 2023 15:26
SDXL Pixel Art workflow for ComfyUI
{
"last_node_id": 47,
"last_link_id": 63,
"nodes": [
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
-54,
37
@appliedintelligencelab
appliedintelligencelab / sdxl-compact-workflow.json
Last active August 2, 2023 17:43
SDXL compact workflow for ComfyUI
{
"last_node_id": 56,
"last_link_id": 51,
"nodes": [
{
"id": 19,
"type": "SaveImage",
"pos": [
1282.60009765625,
108
@appliedintelligencelab
appliedintelligencelab / stable_diffusion_sdxl_on_google_colab.ipynb
Last active September 10, 2024 21:03
stable_diffusion_sdxl_on_google_colab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@appliedintelligencelab
appliedintelligencelab / styles.csv
Created June 20, 2023 22:27
Stable Diffusion styles
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
name,prompt,negative_prompt,
____*Negative Prompts Only____,,,,
Default_Negative,,"canvas frame, (high contrast:1.2), (over saturated:1.2), (glossy:1.1), cartoon, 3d, ((disfigured)), ((bad art)), ((b&w)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, 3d render",
Default_Negative (sfw),,"NSFW, Cleavage, Pubic Hair, Nudity, Naked, Au naturel, Watermark, Text, censored, deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fuse