Views
No views yet
High-end product photo of TOK sneakers with a white upper, black accents, and a brown sole. The sneakers are placed on a light oak wooden surface with a smooth matte finish. The background is a soft, warm beige gradient wall that adds depth without distraction. Lighting is clean and diffused, highlighting the shoe’s texture and contours, with natural shadows for realism. The overall composition is minimal, polished, and ideal for e-commerce or in-store promotional use3.00.020None421024x10241import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'alpaca-labs/sneakers-flux'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "High-end product photo of TOK sneakers with a white upper, black accents, and a brown sole. The sneakers are placed on a light oak wooden surface with a smooth matte finish. The background is a soft, warm beige gradient wall that adds depth without distraction. Lighting is clean and diffused, highlighting the shoe’s texture and contours, with natural shadows for realism. The overall composition is minimal, polished, and ideal for e-commerce or in-store promotional use"
10
11pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
12image = pipeline(
13 prompt=prompt,
14 num_inference_steps=20,
15 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
16 width=1024,
17 height=1024,
18 guidance_scale=3.0,
19).images[0]
20image.save("output.png", format="PNG")