Final-One / styles /Cubism /README.md
aanchal77's picture
Upload folder using huggingface_hub
9625a1c verified
|
Raw
History Blame Contribute Delete
1.14 kB
metadata
license: mit
base_model: runwayml/stable-diffusion-v1-5
tags:
  - stable-diffusion
  - text-to-image
  - diffusers
  - lora
  - style
  - art

LoRA for Style: Cubism

A LoRA fine-tuned to generate images in the Cubism style. Use the trigger phrase in cubism style in your prompts.

This LoRA was trained on the WikiArt dataset for 1000 steps.

How to Use

This LoRA is designed to be used with the diffusers library.

import torch
from diffusers import StableDiffusionPipeline
from peft import PeftModel

# --- 1. Load the base model ---
base_model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16).to("cuda")

# --- 2. Load the LoRA adapter ---
repo_id = "aanchal77/Final-One"
lora_path_in_repo = "styles/Cubism"
pipe.unet = PeftModel.from_pretrained(pipe.unet, repo_id, subfolder=lora_path_in_repo)

# --- 3. Generate an image ---
prompt = f"A futuristic cityscape in cubism style"
image = pipe(prompt, num_inference_steps=20, guidance_scale=7.5).images[0]
image.save("generated_image.png")