Polygon-Mini

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

The main validation prompt used during training was:

Sandeep standing beside a cat

Validation settings

  • CFG: 3.5
  • CFG Rescale: 0.0
  • Steps: 30
  • Sampler: FlowMatchEulerDiscreteScheduler
  • Seed: 42
  • Resolution: 1024
  • Skip-layer guidance:

Note: The validation settings are not necessarily the same as the training settings.

You can find some example images in the following gallery:

Prompt
unconditional (blank prompt)
Negative Prompt
'
Prompt
A photograph of Sandeep Nailwal standing proudly with his arms crossed
Negative Prompt
'
Prompt
A depth-of-field photograph showing Sandeep Nailwal in focus, wearing a Polygon Coin brand t-shirt
Negative Prompt
'
Prompt
A promotional photograph of a scissors with purple packaging adorning the Polygon logo, the text "Sandeep's Willy Cutter" is written on the packaging
Negative Prompt
'
Prompt
A 1960s Indian style poster advertisement for the Polygon Chain, showing the $POL Polygon coin above the Taj Mahal
Negative Prompt
'
Prompt
Vitalik Buterin standing proudly with his arms crossed, wearing traditional indian sikh clothes
Negative Prompt
'
Prompt
Movie Poster of Vitalik Buterin and Sandeep Nailwal standing back to back and staring at the viewer with a grin, the title text 'Race to the Bottom' is written in a stylized movie font, the background depicts red forex trading charts
Negative Prompt
'
Prompt
Sandeep standing beside a cat
Negative Prompt
'

The text encoder was not trained. You may reuse the base model text encoder for inference.

Training settings

  • Training epochs: 3533

  • Training steps: 10600

  • Learning rate: 0.0001

    • Learning rate schedule: constant_with_warmup
    • Warmup steps: 50
  • Max grad norm: 1.0

  • Effective batch size: 8

    • Micro-batch size: 4
    • Gradient accumulation steps: 1
    • Number of GPUs: 2
  • Gradient checkpointing: True

  • Prediction type: flow-matching (extra parameters=['shift=3', 'flux_guidance_mode=constant', 'flux_guidance_value=1.0', 'flow_matching_loss=compatible', 'flux_lora_target=all+ffs'])

  • Optimizer: adamw_bf16

  • Trainable parameter precision: Pure BF16

  • Caption dropout probability: 0.0%

  • LoRA Rank: 64

  • LoRA Alpha: None

  • LoRA Dropout: 0.1

  • LoRA initialisation style: default

Datasets

Polygon-Mini

  • Repeats: 0
  • Total number of images: ~24
  • Total number of aspect buckets: 1
  • Resolution: 1.048576 megapixels
  • Cropped: True
  • Crop style: center
  • Crop aspect: square
  • Used for regularisation data: No

Inference

import torch
from diffusers import DiffusionPipeline

model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'EoghanH/Polygon-Mini'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
pipeline.load_lora_weights(adapter_id)

prompt = "Sandeep standing beside a cat"


## Optional: quantise the model to save on vram.
## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
#from optimum.quanto import quantize, freeze, qint8
#quantize(pipeline.transformer, weights=qint8)
#freeze(pipeline.transformer)
    
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
image = pipeline(
    prompt=prompt,
    num_inference_steps=30,
    generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
    width=1024,
    height=1024,
    guidance_scale=3.5,
).images[0]
image.save("output.png", format="PNG")
Downloads last month
744
Inference Providers NEW
Examples

Model tree for EoghanH/Polygon-Mini

Adapter
(22630)
this model