update flux

This commit is contained in:
Artiprocher
2025-11-21 16:04:50 +08:00
parent 96daa30bcc
commit 0b7dd55ff3
22 changed files with 87 additions and 45 deletions

View File

@@ -6,8 +6,8 @@ from PIL import Image
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -4,8 +4,8 @@ from PIL import Image
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -5,8 +5,8 @@ from PIL import Image
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -5,8 +5,8 @@ from modelscope import snapshot_download
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig, Contr
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -6,8 +6,8 @@ from modelscope import dataset_snapshot_download
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -10,8 +10,8 @@ import numpy as np
# Please install the following packages.
# pip install facexlib insightface onnxruntime
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -3,8 +3,8 @@ from diffsynth.pipelines.flux_image import FluxImagePipeline, ModelConfig
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -13,8 +13,8 @@ else:
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -11,8 +11,8 @@ else:
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -5,8 +5,8 @@ import numpy as np
vram_config = {
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"offload_dtype": torch.float8_e4m3fn,
"offload_device": "cpu",
"onload_dtype": torch.float8_e4m3fn,
"onload_device": "cpu",
"preparing_dtype": torch.float8_e4m3fn,

View File

@@ -1,4 +1,5 @@
import os, shutil, multiprocessing, time
NUM_GPUS = 7
def script_is_processed(output_path, script):
@@ -63,7 +64,7 @@ def run_train_multi_GPU(script_path):
def run_train_single_GPU(script_path):
tasks = filter_unprocessed_tasks(script_path)
processes = [multiprocessing.Process(target=run_tasks_on_single_GPU, args=(script_path, tasks, i, 8)) for i in range(8)]
processes = [multiprocessing.Process(target=run_tasks_on_single_GPU, args=(script_path, tasks, i, NUM_GPUS)) for i in range(NUM_GPUS)]
for p in processes:
p.start()
for p in processes: