lora_diffusion / README.md
Andyrasika's picture
Update README.md
f3eb465
|
raw
history blame
1.08 kB
metadata
license: creativeml-openrail-m
library_name: diffusers
pipeline_tag: text-to-image

The model is created using the following steps:

  • Find the desired model (checkpoit or lora) on Civitai
  • You can see some conversion scripts in diffusesrs. This time, only the scripts for converting checkpoit and lora are used. It depends on the model type of Civitai. If it is a lora model, you need to specify a basic model
from diffusers import DiffusionPipeline
import torch
pipeline = DiffusionPipeline.from_pretrained(
    "Andyrasika/lora_diffusion"
    ,custom_pipeline = "lpw_stable_diffusion"  
    ,torch_dtype=torch.float16
)
lora = ("/content/lora_model.safetensors",0.8)
pipeline = __load_lora(pipeline=pipeline,lora_path=lora[0],lora_weight=lora[1])
pipeline.to("cuda")
# pipeline.enable_xformers_memory_efficient_attention()
#https://huggingface.co/docs/diffusers/optimization/fp16
pipeline.enable_vae_tiling()
prompt = """
shukezouma,negative space,shuimobysim 
a branch of flower, traditional chinese ink painting
"""
image = pipeline(prompt).images[0]
image