File size: 4,541 Bytes
335e0cd
 
 
 
 
 
 
 
 
 
 
3c9d7a8
335e0cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd282aa
49aea13
 
 
 
 
335e0cd
 
 
 
 
 
 
f0dc184
 
e124958
 
856121c
 
 
 
f0dc184
 
 
 
 
 
856121c
f0dc184
 
856121c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
license: other
license_name: flux-1-dev-non-commercial-license
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
language:
- en
library_name: diffusers
pipeline_tag: text-to-image
---
# FLUX.1 Merged Models - Several different Schnell:Dev ratios

This repository includes merged models from black-forest-labs/FLUX.1-dev and black-forest-labs/FLUX.1-schnell, in different ratios.  The licenses of both models apply to these merged models.

Inspired by: https://huggingface.co/sayakpaul/FLUX.1-merged

## Motivation

The goal is to create modeld which balance generation speed - allowing near-Dev generations in more like 4-16 generations.

## Results

<img src="./images/astronaut_grid_688x512.png">
<img src="./images/hacker_grid_688x512.png">
<img src="./images/astronaut_grid_880x656.png">
<img src="./images/sign_grid_880x656.png">
<img src="./images/astronaut_grid_880x656_saved_models.png">
<img src="./images/sign_grid_880x656_saved_models.png">

Based on these results, I saved and uploaded models for the ratios 10:1, 4:1, and 2.5:1.

I recommend the following number of generation steps for these models:
| Model  |  Steps |
|--------|--------|
| 10:1   | 4-8    |
| 4:1    | 8-16(+)|
| 2.5:1  | 8-16+  |

## Procedure

I modified sayakpaul's merge code to do merges at various ratios (weights), rather than simply averaging the two 1:1, and generated a series of images with those models, and the originals. See [merge_compare.py](./merege_compare.py).

I first did a series of ratios ranging from mostly Schnell to mostly Dev. Based on those results, I did more tests with larger images in ratios favoring Schnell more.

From these tests, I saved and uploaded a few of my favorite ratios, namely 10:1, 4:1, and 2.5:1. Then I did some additional generations* using those models, see [infer.py](./infer.py).

Single-file safetensor models are available on CivitAI (upload in progress, no link available yet).

*And here they are. All images generated at 1280x1024, with CFG=3.5. The test/grid images were done with seed=0, and the images of the two women with seed=42 (best of a batch of 4).

Prompt1: "Impressionistic tableau medium shot painting with soft, blended brushstrokes and muted colors complemented by sporadic vibrant highlights.", Prompt2: "Impressionistic tableau painting with soft brushstrokes and muted colors, accented by vibrant highlights, of a tranquil courtyard surrounded by wildflowers. Madison, a 19-year-old woman with light dirty blond hair and bubblegum-pink highlights in a ponytail, brown eyes, and soft facial features, stands beside Amelia, a tall mid-20s woman with deep auburn hair in a messy bun, summer sky-blue eyes, and pronounced cheekbones. Together, they exude harmony and intrigue, their contrasting features complementing each other."

10:1, 6 steps:
<img src="./images/flowers_10_1.png">

4:1, 10 steps:
<img src="./images/flowers_4_1.png">

2.51:1, 12 steps:
<img src="./images/flowers_2.5_1.png">

Prompt: A macro photograph of a small, armored creature making its way across a vibrant green leaf. Its shell is a spiral, swirling pattern of protective plating, while its body is soft and slimy, with a pair of antennae on its head. Sturdy claws grip the leaf as it moves. A tiny, beady eye peers out from beneath the shell.

10:1, 6 steps:
<img src="./images/armadillo_10_1.png">

4:1, 10 steps:
<img src="./images/armadillo_4_1.png">

2.51:1, 12 steps:
<img src="./images/armadillo_2.5_1.png">

Prompt: A surreal image of a pink, multi-headed bird-like creature basking in warm, golden light. Its main body is slender and elongated, with soft feathers, while five additional heads sprout from its shoulders, each with its own long neck and beak. The heads seem to move in a slow, underwater motion. A soft focus blur of reeds and water lilies fills the background.

10:1, 6 steps:
<img src="./images/flamingo_10_1.png">

4:1, 10 steps:
<img src="./images/flamingo_4_1.png">

2.51:1, 12 steps:
<img src="./images/flamingo_2.5_1.png">

Prompt: A photograph of a large, winged canine perched atop a snow-capped mountain peak. Its body is covered in thick, gray fur, while its wings and talons are feathered and sharp. The wingspan is impressive, at least 10 feet wide. The eyes burn with a fierce gaze, surveying the kingdom below. A breathtaking mountain vista stretches out to the horizon.

10:1, 6 steps:
<img src="./images/wolf_10_1.png">

4:1, 10 steps:
<img src="./images/wolf_4_1.png">

2.51:1, 12 steps:
<img src="./images/wolf_2.5_1.png">