Downloads · 30 days
0
baldesco/lora_food
lora_food is a machine learning model from baldesco. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Apr 18, 2023
Repo size
685 MB
Likes
0
Public
Click a slice to open those files.
.bin497 MB · 79%
From the Hugging Face model README
from diffusers import StableDiffusionPipeline
import torch
# Use fine tunded SD model available in huggingface hub
model_path = "baldesco/lora_food"
# pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16)
pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
pipe.unet.load_attn_procs(model_path)
pipe.to("cuda")
prompt = 'HD professional photo of a club sandwich'
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={"scale": 0.5}).images[0]
display(image)