from diffusers import StableDiffusionPipeline import torch # بارگذاری مدل pipe = StableDiffusionPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16 ) pipe = pipe.to("cuda") # اگر کارت گرافیک داری # Prompt دقیق prompt = """ A middle-aged man with light tan skin and short graying hair, standing far in a gym, in front of a low shelf filled with rows of supplement bags. From the left end of the shelf, two MuscleTech protein bags are visible: one is held in the man's right hand as he examines it, the other remains on the shelf. Dim mobile-like lighting, blurred background, cinematic depth of field, full body visible, natural color. """ # تولید تصویر image = pipe(prompt, guidance_scale=7.5).images[0] # ذخیره تصویر image.save("gym_man_muscletech.png") Mehr sehen