Views
No views yet
pip install diffusers transformers accelerate safetensors torch1from diffusers import DiffusionPipeline
2import torch
3
4pipe = DiffusionPipeline.from_pretrained(
5 "Qwen/Qwen-Image",
6 torch_dtype=torch.bfloat16
7).to("cuda")
8
9# Load Anime-Otaku LoRA adapter
10pipe.load_lora_weights("suayptalha/Anime-Otaku-Qwen-Image")
11
12# Recommended prompt format
13prompt = "Anime, a girl with blue hair holding a sword"
14
15# Generate an anime image (1024x1024 recommended)
16image = pipe(prompt, height=1024, width=1024, num_inference_steps=40, guidance_scale=7.5).images[0]
17
18# Save output
19image.save("output.png")Make sure your prompt starts with "Anime, " to match the training data format.
torch_dtype=torch.bfloat16 or torch.float16 for efficient VRAM usage.pipe.enable_attention_slicing()Anime to trigger the image generation.