Instructions to use strangerzonehf/Flux-Super-Realism-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use strangerzonehf/Flux-Super-Realism-LoRA 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("strangerzonehf/Flux-Super-Realism-LoRA") prompt = "Super Realism, Woman in a red jacket, snowy, in the style of hyper-realistic portraiture, caninecore, mountainous vistas, timeless beauty, palewave, iconic, distinctive noses --ar 72:101 --stylize 750 --v 6" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Tried to load lora weights and failed in doing so
Here is my code:
~~
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, max_memory={0:"21GB"},device_map='balanced')
pipe.load_lora_weights("alvdansen/pola-photo-flux",)
pipe.load_lora_weights('alvdansen/pola-photo-flux', weight_name='pola_photo_araminta_k.safetensors', adapter_name='lora')
pipe.set_adapters('lora')
pipe.fuse_lora(adapter_names=['lora'])
prompt = "realistic photo of man wearing fit-slim neckline-round_neck sweater, fit-oversize long_sleeve_shirt, waist-high fit-baggy length-cropped jeans, dress_shoes. Man is outside in city. Avoid artifacts around eyes and hands"
image = pipe(prompt,
num_inference_steps=28,
guidance_scale=3.5,
width=1024, height=1024
).images[0]
image.save(f"example2.png")
~~
What am i doing wrong?
same here, it just doesnt work
The adapter you mentioned, alvdansen/pola-photo-flux, does not belong to my repository. However, even though I tried to load the custom LoRA in my Space, it worked perfectly!
I think you should try again.
[ or ] Use
https://huggingface.co/spaces/prithivMLmods/FLUX-LoRA-DLC
