Converted from SafeTensor checkpoint to Diffusers format Original:
https://civitai.com/models/579632?modelVersionId=1472080
1from diffusers import StableDiffusionXLPipeline
2import torch
3
4# Load the pipeline
5pipeline = StableDiffusionXLPipeline.from_pretrained(
6 "your-username/your-repo-name",
7 torch_dtype=torch.float16,
8 use_safetensors=True
9)
10pipeline = pipeline.to("cuda")
11
12# Generate an image
13prompt = "a beautiful landscape, masterpiece, best quality"
14negative_prompt = 'low quality, blurry, distorted'
15image = pipeline(
16 prompt,
17 negative_prompt=negative_prompt,
18 num_inference_steps=25,
19 guidance_scale=7.5,
20 width=1024, height=1024
21).images[0]
22
23image.save("generated_image.png")
1# For more control over generation
2image = pipeline(
3 prompt="your prompt here",
4 negative_prompt='low quality, worst quality',
5 num_inference_steps=30,
6 guidance_scale=8.0,
7 width=1024,
8 height=1024,
9 generator=torch.Generator("cuda").manual_seed(42)
10).images[0]
-
Positive prompts: Include 'masterpiece, best quality, very aesthetic'
-
Negative prompts: Use 'lowres, bad anatomy, bad hands, text, error, missing fingers'
-
CFG Scale: 5-7 recommended
-
Resolution: 1024x1024 or 832x1216 for portraits
-
Steps: 20-30 steps usually sufficient
-
Sampler: Euler a, DPM++ 2M, or DPM++ SDE work well
This model was automatically converted from a SafeTensor checkpoint to the Diffusers format for easy use with the 🤗 Diffusers library.
This model is licensed under the CreativeML OpenRAIL-M license. Please ensure you comply with the license terms when using this model.
This model is converted from a community checkpoint. Please ensure you have the right to use and distribute the original model before using this converted version.