Downloads · 30 days
0
svjack/Flux_Anime_Landscape_Lora
Flux_Anime_Landscape_Lora is a machine learning model from svjack. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- 🙂 This lora focus light up the anime landscape scene. ☀ - Trigger word: anime style
Downloads · 30 days
0
Access
Public
Updated May 29, 2025
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 100%
From the Hugging Face model README
pip install -U diffusers transformers torch sentencepiece peft controlnet-aux moviepy protobuf
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
pipe.enable_sequential_cpu_offload()
prompt = "anime style ,high quality nature video featuring a red panda balancing on a bamboo stem while a bird lands on it's head, on the background there is a waterfall"
image = pipe(prompt,
num_inference_steps=50,
guidance_scale=3.5,
).images[0]
image.save("ani0.png")
from IPython import display
display.Image("ani0.png", width=512, height=512)

prompt = "anime style, Sunlight filters through clouds onto a cherry blossom-filled meadow, where a blue-haired youth in an indigo coat stands by a vermilion bridge, holding a book as petals drift past his smile. The scene blends dynamic nature with human stillness, using pink, red and blue hues to create harmony, while symbolic elements like blossoms and books add depth."
image = pipe(prompt,
num_inference_steps=50,
guidance_scale=3.5,
).images[0]
image.save("ani1.png")
from IPython import display
display.Image("ani1.png", width=512, height=512)


Image Input (xiang_image.jpg)

import time
import torch
import os
from tqdm import tqdm
from PIL import Image
from src_inference.pipeline import FluxPipeline
from src_inference.lora_helper import set_single_lora
# 初始化基础模型
base_path = "black-forest-labs/FLUX.1-dev"
pipe = FluxPipeline.from_pretrained(base_path, torch_dtype=torch.bfloat16)
# 设置OmniConsistency LoRA
set_single_lora(pipe.transformer,
"OmniConsistency/OmniConsistency.safetensors",
lora_weights=[1], cond_size=512)
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
# 启用CPU offload节省显存
pipe.enable_sequential_cpu_offload()
image_path1 = "xiang_image.jpg"
subject_images = []
spatial_image = [Image.open(image_path1).convert("RGB")]
width, height = 1024, 1024
style_prompt = "anime style, A young man with black hair and glasses sits outdoors in a white T-shirt, surrounded by lush green foliage. The natural backdrop contrasts with his relaxed posture, creating a serene vibe."
image = pipe(
style_prompt,
height=height,
width=width,
guidance_scale=3.5,
num_inference_steps=25,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(5),
spatial_images=spatial_image,
subject_images=subject_images,
cond_size=512,
).images[0]
image.save("im0.png")
from IPython import display
display.Image("im0.png", width=512, height=512)
