Updated: Feb 17, 2025
characterVerified: 2 months ago
SafeTensor
Type | |
Stats | 690 0 |
Reviews | (36) |
Published | Feb 11, 2025 |
Base Model | |
Training | Steps: 1,000 Epochs: 1 |
Hash | AutoV2 5FEC14FCCF |
The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.
IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.
This model is based on the Concept sliders LoRA model trained by FLUX.1D, so that the characters in the generated pictures gradually grow from young to old.
weight: -5.0 to 5.0 (Not limited to this interval, you can try other ranges.)
target_prompt: "male person"
positive_prompt: "male person, very old"
negative_prompt: "male person, very young"
Code used for training: https://github.com/SWHL/flux-sliders
Use this model:
from datetime import datetime
from pathlib import Path
import torch
from diffusers import FluxPipeline
lora_path = "flux-age_sliders_latest.safetensors"
pipe = FluxPipeline.from_pretrained("models/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.to("cuda")
pipe.load_lora_weights(lora_path)
time_stamp = datetime.strftime(datetime.now(), "%Y-%m-%d-%H-%M-%S")
save_dir = Path("outputs") / time_stamp
save_dir.mkdir(parents=True, exist_ok=True)
scales = (-5, -2.5, 0, 2.5, 5)
prompt = "male person"
for scale in scales:
out = pipe(
prompt=prompt,
guidance_scale=3.5,
height=512,
width=512,
num_inference_steps=25,
joint_attention_kwargs={"scale": scale * 1 / 16},
generator=torch.Generator().manual_seed(42),
).images[0]
save_img_path = save_dir / f"{time_stamp}_scale_{scale}.jpg"
out.save(save_img_path)
Enjoy it!
⚠️ Notion:
The current model does not support direct use of comfy.
Since the model has been converted, you need to try the slider scale multiple times to select the range you need.
ComfyUI will be supported later, so stay tuned.