Run this model with HF Jobs
Run Mohan-diffuser/lora_platypus_sd_15 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Mohan-diffuser/lora_platypus_sd_15. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Mohan-diffuser/lora_platypus_sd_15 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Mohan-diffuser/lora_platypus_sd_15 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Mohan-diffuser/lora_platypus_sd_15 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Mohan-diffuser/lora_platypus_sd_15") prompt = "platypus" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("Mohan-diffuser/lora_platypus_sd_15")
prompt = "platypus"
image = pipe(prompt).images[0]LoRA_platypus

- Prompt
- platypus
Trigger words
You should use platypus to trigger the image generation.
Download model
Download them in the Files & versions tab.
import torch
from diffusers import DiffusionPipeline,DDIMScheduler
import matplotlib.pyplot as plt
# switch to "mps" for apple devices
pipeline = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
pipeline.load_lora_weights("Mohan-diffuser/lora_platypus_sd_15")
pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)
prompt = "platypus"
image = pipeline(prompt).images[0]
Varying The LoRA Scale
gen_images=[]
lora_scales = [0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4]
for lora_scale in lora_scales:
gen_image = pipeline(
prompt="platypus",
guidance_scale=7.5,
num_inference_steps=25,
height=512,
width=512,
cross_attention_kwargs={"scale": lora_scale},
generator=torch.manual_seed(0)
).images[0]
gen_images.append(gen_image)
fig,axes = plt.subplots(1,8,figsize=(20,10))
for i,ax in enumerate(axes):
ax.imshow(gen_images[i])
ax.set_title(f"lora_scale: {lora_scales[i]}")
ax.axis('off')
plt.show()
Effect of different prompts
platypus_prompts = [
"A cyberpunk platypus",
"A steampunk platypus with brass gears and mechanical limbs, intricate Victorian-style machinery, warm tones, highly detailed illustration",
"A platypus swimming in a serene river, soft watercolor painting, pastel colors, gentle brush strokes, dreamy atmosphere",
"Cute cartoon platypus, big expressive eyes, playful pose, bright cheerful colors, whimsical style, 2D animation style",
"A fantasy platypus wearing mystical armor, magical glowing runes on its body, standing on a cliff, dramatic lighting, epic fantasy illustration",
"A cybernetic platypus, robotic enhancements, glowing circuits, sci-fi aesthetic, sleek metallic textures, high detail, digital art",
"A platypus in the wild, painted in classical oil painting style, rich textures, dramatic lighting, realistic yet painterly, Baroque-inspired composition",
"A pop art platypus, vibrant contrasting colors, bold outlines, comic-style halftone patterns, playful modern art",
"A platypus rendered in retro pixel art, 16-bit video game style, colorful small-scale grid, cute and nostalgic",
"A surreal platypus floating in a dreamlike landscape, abstract shapes, vibrant colors, imaginative surrealism, Salvador Dali inspired"
]
gen_images=[]
for prompt in platypus_prompts:
gen_image = pipeline(
prompt=prompt,
guidance_scale=7.5,
num_inference_steps=25,
height=512,
width=512,
cross_attention_kwargs={"scale": 0.9},
generator=torch.manual_seed(42)
).images[0]
gen_images.append(gen_image)
fig,axes = plt.subplots(1,10,figsize=(20,10))
for i,ax in enumerate(axes):
ax.imshow(gen_images[i])
ax.axis('off')
plt.show()
Result
- Downloads last month
- 40
Model tree for Mohan-diffuser/lora_platypus_sd_15
Base model
stable-diffusion-v1-5/stable-diffusion-v1-5