Instructions to use cosmicman/CosmicMan-SDXL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use cosmicman/CosmicMan-SDXL with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("cosmicman/CosmicMan-SDXL", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,8 +32,7 @@ unet = UNet2DConditionModel.from_pretrained(unet_path, torch_dtype=torch.float16
|
|
| 32 |
pipe = StableDiffusionXLPipeline.from_pretrained(base_path, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")
|
| 33 |
pipe.scheduler = EulerDiscreteScheduler.from_pretrained(base_path, subfolder="scheduler", torch_dtype=torch.float16)
|
| 34 |
|
| 35 |
-
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
| 36 |
-
refiner.scheduler = EulerDiscreteScheduler.from_pretrained(base_path, subfolder="scheduler", torch_dtype=torch.float16)
|
| 37 |
|
| 38 |
# Generate image.
|
| 39 |
positive_prompt = "A fit Caucasian elderly woman, her wavy white hair above shoulders, wears a pink floral cotton long-sleeve shirt and a cotton hat against a natural landscape in an upper body shot"
|
|
|
|
| 32 |
pipe = StableDiffusionXLPipeline.from_pretrained(base_path, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")
|
| 33 |
pipe.scheduler = EulerDiscreteScheduler.from_pretrained(base_path, subfolder="scheduler", torch_dtype=torch.float16)
|
| 34 |
|
| 35 |
+
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained(base_path,torch_dtype=torch.float16, use_safetensors=True).to("cuda") # using "base_path" instead of "refiner_path" may have a better result
|
|
|
|
| 36 |
|
| 37 |
# Generate image.
|
| 38 |
positive_prompt = "A fit Caucasian elderly woman, her wavy white hair above shoulders, wears a pink floral cotton long-sleeve shirt and a cotton hat against a natural landscape in an upper body shot"
|