YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Chinese_idol_Flex2_lora

Installtion

pip install -U diffusers transformers torch sentencepiece peft controlnet-aux moviepy protobuf

Original Demo

By Flex2

#import os
#os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

#### git clone https://huggingface.co/ostris/Flex.2-preview

import torch
from diffusers import AutoPipelineForText2Image
from diffusers.utils import load_image

#name_or_path = "ostris/Flex.2-preview"
name_or_path = "Flex.2-preview"
dtype = torch.bfloat16

pipe = AutoPipelineForText2Image.from_pretrained(
    name_or_path,
    custom_pipeline=name_or_path,
    torch_dtype=dtype
)
#### OR pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000003500.safetensors") 3500 ~ 4500
pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000004500.safetensors")
pipe.enable_model_cpu_offload()

import numpy as np
from PIL import Image
image = pipe(
    prompt="a young Asian male singer with fair skin and black, slightly messy hair, performing on stage. He wears a white, slightly wrinkled, long-sleeved shirt with a black tie and a black emblem on the left chest. He holds a black microphone in his right hand and a black headset in his left. The background is dark with colorful, out-of-focus bokeh lights in green, purple, and yellow. His expression is confident, with a slight smile.",
    inpaint_image=Image.fromarray(np.zeros((1024, 1024, 3)).astype(np.uint8)),
    inpaint_mask=Image.fromarray(np.ones((1024, 1024, 3), dtype=np.uint8) * 255),
    control_image=Image.fromarray(np.zeros((1024, 1024, 3)).astype(np.uint8)),
    control_strength=0.5,
    control_stop=0.33,
    height=1024,
    width=1024,
    guidance_scale=3.5,
    num_inference_steps=50,
    generator=torch.Generator("cpu").manual_seed(477)
).images[0]

image/jpeg

a young Asian male singer with fair skin and black, slightly tousled hair. He is wearing a black school blazer with a white shirt and a blue striped tie. The blazer has a crest on the left chest pocket. He has a black earpiece in his left ear and is mid-singing, with his mouth slightly open and eyes looking forward. The background is a soft blue gradient with subtle light and shadow patterns, suggesting a stage setting. The overall image has a professional, polished look typical of concert or music show photography. The lighting is even, highlighting his face and upper body.

image/jpeg

a young Asian male with pale skin and short, dark brown hair, slightly tousled. He is wearing a black formal suit jacket with a white dress shirt and a navy blue striped tie. His eyes are closed, and he has a serene, slightly tilted head with a subtle smile. He has black earbuds in his ears. The background is blurred, featuring green and white colors, suggesting an outdoor setting. The suit has a small, white embroidered emblem on the left chest. The image has a soft, natural light, highlighting his youthful and elegant appearance. The overall style is modern and polished.

image/jpeg

Used as Flux Lora on Wang Leehom (็Ž‹ๅŠ›ๅฎ)

  • Source Image

image/webp

  • Target Grid Image

image/jpeg

  • Target Poster Grid Image

image/jpeg

Other Style Demo

sudo apt-get update && sudo apt-get install git-lfs

git clone https://huggingface.co/svjack/Flux_Anime_Landscape_Lora
git clone https://huggingface.co/svjack/Genshin_Impact_VENTI_Flex2_Lora
git clone https://huggingface.co/svjack/Genshin_Impact_XIAO_Flex2_Lora
git clone https://huggingface.co/svjack/Genshin_Impact_ZHONGLI_Flex2_Lora

Anime

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000004500.safetensors")
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
#pipe.enable_sequential_cpu_offload()
pipe.enable_model_cpu_offload()

prompt = "anime style ,a young Asian male singer with fair skin and black, slightly messy hair, performing on stage. He wears a white, slightly wrinkled, long-sleeved shirt with a black tie and a black emblem on the left chest. He holds a black microphone in his right hand and a black headset in his left. The background is dark with colorful, out-of-focus bokeh lights in green, purple, and yellow. His expression is confident, with a slight smile."

image = pipe(prompt,
             num_inference_steps=50,
             guidance_scale=3.5,
            ).images[0]

image/png

Venti

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000004500.safetensors")
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
pipe.load_lora_weights("Genshin_Impact_VENTI_Flex2_Lora/my_first_flex2_lora_v1_000001750.safetensors")
pipe.enable_sequential_cpu_offload()
#pipe.enable_model_cpu_offload()

prompt = "anime style, VENTI ,a young Asian male singer with fair skin and black, slightly messy hair, performing on stage. He wears a white, slightly wrinkled, long-sleeved shirt with a black tie and a black emblem on the left chest. He holds a black microphone in his right hand and a black headset in his left. The background is dark with colorful, out-of-focus bokeh lights in green, purple, and yellow. His expression is confident, with a slight smile."

image = pipe(prompt,
             num_inference_steps=50,
             guidance_scale=3.5,
            ).images[0]

image/png

Xiao

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000004500.safetensors")
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
pipe.load_lora_weights("Genshin_Impact_XIAO_Flex2_Lora/my_first_flex2_lora_v1_000002000.safetensors")
pipe.enable_sequential_cpu_offload()
#pipe.enable_model_cpu_offload()

prompt = "anime style, XIAO ,a young Asian male singer with fair skin and black, slightly tousled hair. He is wearing a black school blazer with a white shirt and a blue striped tie. The blazer has a crest on the left chest pocket. He has a black earpiece in his left ear and is mid-singing, with his mouth slightly open and eyes looking forward. The background is a soft blue gradient with subtle light and shadow patterns, suggesting a stage setting. The overall image has a professional, polished look typical of concert or music show photography. The lighting is even, highlighting his face and upper body."

image = pipe(prompt,
             num_inference_steps=50,
             guidance_scale=3.5,
            ).images[0]

image/png

Zhongli

import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Chinese_idol_Flex2_lora/my_first_flex2_lora_v1_000004500.safetensors")
pipe.load_lora_weights("Flux_Anime_Landscape_Lora/my_first_flux_lora_v1_000001500.safetensors")
pipe.load_lora_weights("Genshin_Impact_ZHONGLI_Flex2_Lora/my_first_flex2_lora_v1_000002000.safetensors")
pipe.enable_sequential_cpu_offload()
#pipe.enable_model_cpu_offload()

prompt = "anime style, ZhongLi ,a young Asian male with pale skin and short, dark brown hair, slightly tousled. He is wearing a black formal suit jacket with a white dress shirt and a navy blue striped tie. His eyes are closed, and he has a serene, slightly tilted head with a subtle smile. He has black earbuds in his ears. The background is blurred, featuring green and white colors, suggesting an outdoor setting. The suit has a small, white embroidered emblem on the left chest. The image has a soft, natural light, highlighting his youthful and elegant appearance. The overall style is modern and polished."

image = pipe(prompt,
             num_inference_steps=50,
             guidance_scale=3.5,
            ).images[0]

image/png

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support