Views
No views yet
pulire-tdm-lora-v1 concept using the a photo of <pulire-tdm> towel dispenser machine trigger.
It was trained on the base model prodypanda/pulire-towel-dispenser-concept-v1.a photo of <pulire-tdm> towel dispenser machine1from diffusers import StableDiffusionPipeline, AutoencoderKL
2import torch
3
4# 1. Load the base model pipeline
5base_model_id = "prodypanda/pulire-towel-dispenser-concept-v1"
6# Optional: Load a specific VAE if needed
7# vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse", torch_dtype=torch.float16)
8# pipe = StableDiffusionPipeline.from_pretrained(base_model_id, vae=vae, torch_dtype=torch.float16)
9pipe = StableDiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16)
10pipe.to("cuda")
11
12# 2. Load the LoRA adapter weights
13lora_adapter_id = "prodypanda/pulire-tdm-lora-v1"
14pipe.load_lora_weights(lora_adapter_id)
15# Optional: Specify subfolders if weights are organized that way in the repo
16# pipe.load_lora_weights(lora_adapter_id, subfolder="unet", weight_name="pytorch_lora_weights.safetensors")
17# if text_encoder LoRA exists:
18# pipe.load_lora_weights(lora_adapter_id, subfolder="text_encoder", weight_name="pytorch_lora_weights.safetensors")
19
20
21# 3. Generate images!
22prompt = "a photo of <pulire-tdm> towel dispenser machine in a vibrant jungle"
23negative_prompt = "low quality, blurry, unrealistic"
24
25# Adjust LoRA weight (optional, 0.0-1.0) - requires Diffusers >= 0.17.0
26# image = pipe(prompt, negative_prompt=negative_prompt, cross_attention_kwargs={"scale": 0.8}).images[0]
27
28image = pipe(prompt, negative_prompt=negative_prompt).images[0]
29image.save("output_lora.png")
30
31# To unload LoRA and use the base model again:
32# pipe.unload_lora_weights()






