CoolFace
Modelpublic

alpaca-labs/sneakers-flux

sourceHugging Faceotherupdated 1y agoView on Hugging Face
0likes9downloads
Model Card

flux-training

This is a standard PEFT LoRA derived from black-forest-labs/FLUX.1-dev.

The main validation prompt used during training was:

High-end product photo of TOK sneakers with a white upper, black accents, and a brown sole. The sneakers are placed on a light oak wooden surface with a smooth matte finish. The background is a soft, warm beige gradient wall that adds depth without distraction. Lighting is clean and diffused, highlighting the shoe’s texture and contours, with natural shadows for realism. The overall composition is minimal, polished, and ideal for e-commerce or in-store promotional use

Validation settings

  • —CFG: 3.0
  • —CFG Rescale: 0.0
  • —Steps: 20
  • —Sampler: None
  • —Seed: 42
  • —Resolution: 1024x1024

Note: 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.

Training settings

  • —Training epochs: 62
  • —Training steps: 3000
  • —Learning rate: 8e-05
  • —Max grad norm: 2.0
  • —Effective batch size: 1
  • —Micro-batch size: 1
  • —Gradient accumulation steps: 1
  • —Number of GPUs: 1
  • —Prediction type: flow-matching (flux parameters=['shift=3', 'fluxguidancevalue=1.0', 'fluxloratarget=all'])
  • —Rescaled betas zero SNR: False
  • —Optimizer: adamw_bf16
  • —Precision: Pure BF16
  • —Quantised: Yes: int8-quanto
  • —Xformers: Not used
  • —LoRA Rank: 768
  • —LoRA Alpha: None
  • —LoRA Dropout: 0.1
  • —LoRA initialisation style: default

Datasets

subject

  • —Repeats: 5
  • —Total number of images: 8
  • —Total number of aspect buckets: 1
  • —Resolution: 1.0 megapixels
  • —Cropped: False
  • —Crop style: None
  • —Crop aspect: None
  • —Used for regularisation data: No

Inference

python
import torch
from diffusers import DiffusionPipeline

model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'alpaca-labs/sneakers-flux'
pipeline = DiffusionPipeline.from_pretrained(model_id)
pipeline.load_lora_weights(adapter_id)

prompt = "High-end product photo of TOK sneakers with a white upper, black accents, and a brown sole. The sneakers are placed on a light oak wooden surface with a smooth matte finish. The background is a soft, warm beige gradient wall that adds depth without distraction. Lighting is clean and diffused, highlighting the shoe’s texture and contours, with natural shadows for realism. The overall composition is minimal, polished, and ideal for e-commerce or in-store promotional use"

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")