Borcherding's picture
Add generated example (#3)
61b60fe verified
|
raw
history blame
4.01 kB
---
tags:
- text-to-image
- lora
- diffusers
- template:diffusion-lora
widget:
- text: >-
HuggingFaceIcons a yellow smiley face sun with a book in its hands,
surrounded by planets and stars in a dark background.
output:
url: images/example_8lqdj7555.png
- text: >-
HuggingFaceIcons a blue icey brrr face emoji with hands holding itself,
chilly surrounded by snow and ice, made of ice going brr.
output:
url: images/example_5v4kiodrg.png
- text: >-
HuggingFaceIcons a lava smiley face with fire in its hands, surrounded by a
black background.
output:
url: images/example_e1z75r8vh.png
base_model: black-forest-labs/FLUX.1-dev
instance_prompt: autumnProxy
license: apache-2.0
---
# FLUX.1-dev-LoRA-AutumnSpringTrees
<Gallery />
## Model description
# FLUX.1-dev-LoRA-HuggingFaceIcons-v0.1 LoRA
A LoRA fine-tune for FLUX.1 [dev] that specializes in generating HuggingFace/SmolLM emoji icons. Trained using Fluxgym, by cocktail peanut: https://github.com/cocktailpeanut/fluxgym utilizing SmolLM's Model Card and other HF emojis.
## Overview
This LoRA enhances FLUX.1 [dev]&#39;s ability to generate Hugging Face Emoji Icon's for utility in new projects on hugging face. Use the trigger word &#x60;HuggingFaceIcons&#x60; to activate the Hugging Face Icon specific capabilities.
## Installation
First, ensure you have FLUX.1 [dev] installed:
```python
# Install
pip install -U diffusers
# Loading with Diffusers
import torch
from diffusers import FluxPipeline
# Load base model
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
# Load and apply LoRA weights
pipe.load_lora_weights("Borcherding/FLUX.1-dev-LoRA-HuggingFaceIcons-v0.1")
# Generate image
prompt = "HuggingFaceIcons a yellow smiley face sun with a book in its hands, surrounded by planets and stars in a dark background."
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=50,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("autumn-scene.png")
# Unload LoRA weights if needed
pipe.unload_lora_weights()
# Optional: Merge LoRA weights permanently
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Borcherding/FLUX.1-dev-LoRA-HuggingFaceIcons-v0.1")
pipe.merge_lora_weights()
pipe.save_pretrained("FLUX.1-dev-LoRA-HuggingFaceIcons-v0.1")
```
# Trigger Word
Use trigger word "HuggingFaceIcons" in your prompts to activate the hugging face icon LoRA.
Best results achieved when placing the trigger word at the start of the prompt
Prompt Examples
&quot;HuggingFaceIcons a yellow smiley face emoji with its hands on its face, set against a black background. It is an animated emoji, with a cheerful expression and bright colors.&quot;
&quot;HuggingFaceIcons a yellow smiley face emoji watering a potted plant with a blue watering can. The plant is in a pot and the background is white.&quot;
&quot;HuggingFaceIcons a yellow smiley face sun with a book in its hands, surrounded by planets and stars in a dark background.&quot;
Specialized Features
a yellow smiley face emoji
with its hands holding a
whereing a jetpack
# Limitations
This is a LoRA for FLUX.1 [dev] and requires the base model to function
Focus on Hugging Face Icons.
Trained on a small dataset.
Inherits base limitations from FLUX.1 [dev]
License
This LoRA falls under the same licensing terms as FLUX.1 [dev]. Please refer to the base model&#39;s license for usage terms.
Credits
Base model: FLUX.1 [dev] by Black Forest Labs
LoRA training and development: [Borcherding at BorchInk]
## Trigger words
You should use `HuggingFaceIcons` to trigger the image generation.
## Download model
Weights for this model are available in Safetensors format.
[Download](/Borcherding/FLUX.1-dev-LoRA-HuggingFaceIcons-v0.1/tree/main) them in the Files & versions tab.