import torch
from diffusers import DiffusionPipeline
model_id = 'black-forest-labs/FLUX.1-dev'
adapter_id = 'markury/gleam-logo-flux'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
pipeline.load_lora_weights(adapter_id)
prompt = "A photo-realistic image of a cat"## Optional: quantise the model to save on vram.## Note: The model was quantised during training, and so it is recommended to do the same 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=20,
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.0,
).images[0]
image.save("output.png", format="PNG")
Exponential Moving Average (EMA)
SimpleTuner generates a safetensors variant of the EMA weights and a pt file.
The safetensors file is intended to be used for inference, and the pt file is for continuing finetuning.
The EMA model may provide a more well-rounded result, but typically will feel undertrained compared to the full model as it is a running decayed average of the model weights.
Runs of markury gleam-logo-flux on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About gleam-logo-flux huggingface.co Model
gleam-logo-flux huggingface.co is an AI model on huggingface.co that provides gleam-logo-flux's model effect (), which can be used instantly with this markury gleam-logo-flux model. huggingface.co supports a free trial of the gleam-logo-flux model, and also provides paid use of the gleam-logo-flux. Support call gleam-logo-flux model through api, including Node.js, Python, http.
gleam-logo-flux huggingface.co is an online trial and call api platform, which integrates gleam-logo-flux's modeling effects, including api services, and provides a free online trial of gleam-logo-flux, you can try gleam-logo-flux online for free by clicking the link below.
markury gleam-logo-flux online free url in huggingface.co:
gleam-logo-flux is an open source model from GitHub that offers a free installation service, and any user can find gleam-logo-flux on GitHub to install. At the same time, huggingface.co provides the effect of gleam-logo-flux install, users can directly use gleam-logo-flux installed effect in huggingface.co for debugging and trial. It also supports api for free installation.