Downloads · 30 days
112
1% of all-time downloads
jimmycarter/flux-training
flux-training is a text-to-image model from jimmycarter. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as other.
This is a LyCORIS adapter derived from black-forest-labs/FLUX.1-schnell.
Downloads · 30 days
112
1% of all-time downloads
All-time downloads
9K
Public
Repo size
629 GB
Likes
8
Public
Click a slice to open those files.
.safetensors6.3 GB · 100%
From the Hugging Face model README
This is a LyCORIS adapter derived from black-forest-labs/FLUX.1-schnell.
The main validation prompt used during training was:
A figurine of a character with green hair, wearing a white shirt, a black vest, and a gray cap, sitting with one hand on their knee and the other hand making a peace sign. The character is wearing a blue pendant and has a gold bracelet. In the background, there are green plants and a tree branch.
3.00.020None421024x1024Note: The validation settings are not necessarily the same as the training settings.
You can find some example images in the following gallery:
<Gallery />The text encoder was not trained. You may reuse the base model text encoder for inference.
{
"algo": "lokr",
"multiplier": 1.0,
"linear_dim": 1000000,
"linear_alpha": 1,
"factor": 2,
"full_matrix": true,
"apply_preset": {
"name_algo_map": {
"transformer_blocks.[0-7]*": {
"algo": "lokr",
"factor": 4,
"linear_dim": 1000000,
"linear_alpha": 1,
"full_matrix": true
},
"transformer_blocks.[8-15]*": {
"algo": "lokr",
"factor": 5,
"linear_dim": 1000000,
"linear_alpha": 1,
"full_matrix": true
},
"transformer_blocks.[16-18]*": {
"algo": "lokr",
"factor": 10,
"linear_dim": 1000000,
"linear_alpha": 1,
"full_matrix": true
},
"single_transformer_blocks.[0-15]*": {
"algo": "lokr",
"factor": 8,
"linear_dim": 1000000,
"linear_alpha": 1,
"full_matrix": true
},
"single_transformer_blocks.[16-23]*": {
"algo": "lokr",
"factor": 5,
"linear_dim": 1000000,
"linear_alpha": 1,
"full_matrix": true
},
"single_transformer_blocks.[24-37]*": {
"algo": "lokr",
"factor": 4,
"linear_dim": 1000000,
"linear_alpha": 1,
"use_scalar": true,
"full_matrix": true
}
},
"use_fnmatch": true
}
}
import torch
from diffusers import DiffusionPipeline
from lycoris import create_lycoris_from_weights
model_id = 'black-forest-labs/FLUX.1-schnell'
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
lora_scale = 1.0
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
wrapper.merge_to()
prompt = "A figurine of a character with green hair, wearing a white shirt, a black vest, and a gray cap, sitting with one hand on their knee and the other hand making a peace sign. The character is wearing a blue pendant and has a gold bracelet. In the background, there are green plants and a tree branch."
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
image = pipeline(
prompt=prompt,
num_inference_steps=20,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
width=1024,
height=1024,
guidance_scale=3.0,
).images[0]
image.save("output.png", format="PNG")