YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
requirements: diffusers, transformers, accelerate, safetensors, torch
Google Colab'da: pip install diffusers transformers accelerate safetensors
from diffusers import StableDiffusionPipeline import torch
model_id = "runwayml/stable-diffusion-v1-5" # o'zingga mos modelni kirit device = "cuda" if torch.cuda.is_available() else "cpu"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16 if device=="cuda" else torch.float32) pipe = pipe.to(device)
prompt = ("Tinker Bell-inspired fairy, photorealistic 3D, sitting on a bed, soft morning light through window, " "delicate translucent wings with filigree patterns, green lace lingerie, dreamy cinematic lighting, high detail skin texture, shallow depth of field, 85mm, filmic color grading, ultra-detailed, 8k") negative = "blurry, deformed, extra limbs, bad anatomy, lowres, watermark, text, jpeg artifacts, mutated hands"
image = pipe(prompt=prompt, negative_prompt=negative, guidance_scale=8.0, num_inference_steps=30, height=1536, width=1024).images[0]
image.save("tinkerbell_result.png") print("Saved: tinkerbell_result.png")