Text-to-Image
Diffusers
Safetensors
PixArtSigmaPipeline
stable-diffusion
stable-diffusion-diffusers
full
pixart
pixart sigma
Instructions to use TensorFamily/SigmaJourney with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use TensorFamily/SigmaJourney with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("TensorFamily/SigmaJourney", dtype=torch.bfloat16, device_map="cuda") prompt = "A blonde sexy girl, wearing glasses at latex shirt and a blue beanie with a tattoo, blue and white, highly detailed, sublime, extremely beautiful, sharp focus, refined, cinematic, intricate, elegant, dynamic, rich deep colors, bright color, shining light, attractive, cute, pretty, background full, epic composition, dramatic atmosphere, radiant, professional, stunning" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,16 +54,19 @@ widget:
|
|
| 54 |
|
| 55 |
```python
|
| 56 |
import torch
|
| 57 |
-
from diffusers import DiffusionPipeline
|
| 58 |
-
|
| 59 |
|
| 60 |
|
| 61 |
model_id = "toilaluan/SigmaJourney"
|
| 62 |
-
prompt = "An astronaut is riding a horse through the jungles of Thailand."
|
| 63 |
negative_prompt = "malformed, disgusting, overexposed, washed-out"
|
| 64 |
|
| 65 |
-
pipeline = DiffusionPipeline.from_pretrained(
|
| 66 |
-
pipeline.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
image = pipeline(
|
| 68 |
prompt=prompt,
|
| 69 |
negative_prompt='blurry, cropped, ugly',
|
|
@@ -71,9 +74,8 @@ image = pipeline(
|
|
| 71 |
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
| 72 |
width=1024,
|
| 73 |
height=1024,
|
| 74 |
-
guidance_scale=
|
| 75 |
-
guidance_rescale=0.0,
|
| 76 |
).images[0]
|
| 77 |
-
image.save("output.png", format="
|
| 78 |
```
|
| 79 |
|
|
|
|
| 54 |
|
| 55 |
```python
|
| 56 |
import torch
|
| 57 |
+
from diffusers import DiffusionPipeline, EulerAncestralDiscreteScheduler
|
| 58 |
+
from diffusers.models import PixArtTransformer2DModel
|
| 59 |
|
| 60 |
|
| 61 |
model_id = "toilaluan/SigmaJourney"
|
|
|
|
| 62 |
negative_prompt = "malformed, disgusting, overexposed, washed-out"
|
| 63 |
|
| 64 |
+
pipeline = DiffusionPipeline.from_pretrained("PixArt-alpha/PixArt-Sigma-XL-2-1024-MS", torch_dtype=torch.float16)
|
| 65 |
+
pipeline.transformer = PixArtTransformer2DModel.from_pretrained(model_id, subfolder="transformer", torch_dtype=torch.float16)
|
| 66 |
+
pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(pipeline.scheduler.config)
|
| 67 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'cpu')
|
| 68 |
+
|
| 69 |
+
prompt = "On the left, there is a red cube. On the right, there is a blue sphere. On top of the red cube is a dog. On top of the blue sphere is a cat"
|
| 70 |
image = pipeline(
|
| 71 |
prompt=prompt,
|
| 72 |
negative_prompt='blurry, cropped, ugly',
|
|
|
|
| 74 |
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
| 75 |
width=1024,
|
| 76 |
height=1024,
|
| 77 |
+
guidance_scale=5.5,
|
|
|
|
| 78 |
).images[0]
|
| 79 |
+
image.save("output.png", format="JPEG")
|
| 80 |
```
|
| 81 |
|