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

Genshin_Impact_XIAO_Flex2_Lora

Installtion

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

Demo

#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
)
pipe.load_lora_weights("Genshin_Impact_XIAO_Flex2_Lora/my_first_flex2_lora_v1_000002000.safetensors")
pipe.enable_sequential_cpu_offload()

import numpy as np
from PIL import Image
image = pipe(
    prompt="XIAO answer read a book.",
    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.save("xiao_pic.png")


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