Instructions to use je-suis-tm/marisa_abela_lora_flux_nf4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use je-suis-tm/marisa_abela_lora_flux_nf4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("je-suis-tm/marisa_abela_lora_flux_nf4") prompt = "Training With QLoRA: Marisa Abela with dark hair pulled back in a low ponytail meets the viewer's gaze directly. She exudes a sophisticated edge in a black leather jacket detailed with gold stitching. The image employs a minimalist aesthetic, placing the focus entirely on the subject. A clean, white background provides a neutral canvas, eliminating distractions. Soft, even lighting creates a calm and serene atmosphere. The overall style is elegant and understated, highlighting the woman's features and the jacket's details with a simple, yet impactful presentation. The composition prioritizes clarity and a sense of quiet confidence." image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Marisa Abela Lora Flux NF4

- Prompt
- Training With QLoRA: Marisa Abela with dark hair pulled back in a low ponytail meets the viewer's gaze directly. She exudes a sophisticated edge in a black leather jacket detailed with gold stitching. The image employs a minimalist aesthetic, placing the focus entirely on the subject. A clean, white background provides a neutral canvas, eliminating distractions. Soft, even lighting creates a calm and serene atmosphere. The overall style is elegant and understated, highlighting the woman's features and the jacket's details with a simple, yet impactful presentation. The composition prioritizes clarity and a sense of quiet confidence.

- Prompt
- Training Without QLoRA: Marisa Abela with dark hair pulled back in a low ponytail meets the viewer's gaze directly. She exudes a sophisticated edge in a black leather jacket detailed with gold stitching. The image employs a minimalist aesthetic, placing the focus entirely on the subject. A clean, white background provides a neutral canvas, eliminating distractions. Soft, even lighting creates a calm and serene atmosphere. The overall style is elegant and understated, highlighting the woman's features and the jacket's details with a simple, yet impactful presentation. The composition prioritizes clarity and a sense of quiet confidence.

- Prompt
- Testing With QLoRA: Marisa Abela wears low cut spaghetti strap summer dress and smiles at camera

- Prompt
- Testing Without QLoRA: Marisa Abela wears low cut spaghetti strap summer dress and smiles at camera

- Prompt
- Testing With QLoRA: Marisa Abela, cyberpunk, night city, black hole, singularity, apocalypse, nihilism, cthuru, Krysten Ritter goth black bangs dark makeup, soft lights, depth of field, full length shot, photorealistic, cinematic, octane render, unreal engine, hyper detailed, volumetric lighting, hdr

- Prompt
- Testing Without QLoRA: Marisa Abela, cyberpunk, night city, black hole, singularity, apocalypse, nihilism, cthuru, Krysten Ritter goth black bangs dark makeup, soft lights, depth of field, full length shot, photorealistic, cinematic, octane render, unreal engine, hyper detailed, volumetric lighting, hdr
All files are also archived in https://github.com/je-suis-tm/huggingface-archive in case this gets censored.
The QLoRA fine-tuning process of marisa_abela_lora_flux_nf4 takes inspiration from this post (https://huggingface.co/blog/flux-qlora). The training was executed on a local computer with 1000 steps and the same parameters as the link mentioned above, which took around 6 hours on 8GB VRAM 4060. The peak VRAM usage was around 7.7GB. To avoid running low on VRAM, both transformers and text_encoder were quantized. All the images generated here are using the below parameters
- Height: 512
- Width: 512
- Guidance scale: 5
- Num inference steps: 20
- Max sequence length: 512
- Seed: 0
Usage
import torch
from diffusers import FluxPipeline, FluxTransformer2DModel
from transformers import T5EncoderModel
text_encoder_4bit = T5EncoderModel.from_pretrained(
"hf-internal-testing/flux.1-dev-nf4-pkg", subfolder="text_encoder_2",torch_dtype=torch.float16,)
transformer_4bit = FluxTransformer2DModel.from_pretrained(
"hf-internal-testing/flux.1-dev-nf4-pkg", subfolder="transformer",torch_dtype=torch.float16,)
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16,
transformer=transformer_4bit,text_encoder_2=text_encoder_4bit)
pipe.load_lora_weights("je-suis-tm/marisa_abela_lora_flux_nf4",
weight_name='pytorch_lora_weights.safetensors')
prompt="Marisa Abela wears low cut spaghetti strap summer dress and smiles at camera"
image = pipe(
prompt,
height=512,
width=512,
guidance_scale=5,
num_inference_steps=20,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(0),
).images[0]
image.save("marisa_abela_lora_flux_nf4.png")
Trigger words
You should use Marisa Abela to trigger the image generation.
Download model
Download them in the Files & versions tab.
- Downloads last month
- 4
Model tree for je-suis-tm/marisa_abela_lora_flux_nf4
Base model
black-forest-labs/FLUX.1-dev