File size: 1,801 Bytes
46e61b9 aed2622 624c209 12c201c 06236bc 46e61b9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
---
license: creativeml-openrail-m
base_model: ptx0/pixart-900m-1024-ft-large
tags:
- stable-diffusion
- stable-diffusion-diffusers
- text-to-image
- diffusers
- full
- pixart
- pixart sigma
inference: false
library_name: diffusers
pipeline_tag: text-to-image
---
# realMODE PixArt Sigma 900M v1
## Inference
### ComfyUI
- Download model file `transformer/diffusion_pytorch_model.safetensors` and put into `ComfyUI/models/checkpoints`
- Use ExtraModels node: https://github.com/city96/ComfyUI_ExtraModels?tab=readme-ov-file#pixart
![image/png](https://cdn-uploads.huggingface.co/production/uploads/643c7e91b409fef15e0bd11b/MJfTShin1fYOOCo4mTv2-.png)
```python
import torch
from diffusers import DiffusionPipeline, EulerAncestralDiscreteScheduler
from diffusers.models import PixArtTransformer2DModel
model_id = "anyMODE/realMODE_900M"
negative_prompt = "malformed, disgusting, overexposed, washed-out"
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipeline.transformer = PixArtTransformer2DModel.from_pretrained(model_id, subfolder="transformer", torch_dtype=torch.float16)
pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(pipeline.scheduler.config)
pipeline.to('cuda' if torch.cuda.is_available() else 'cpu')
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"
image = pipeline(
prompt=prompt,
negative_prompt='blurry, cropped, ugly',
num_inference_steps=30,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
width=1024,
height=1024,
guidance_scale=5.5,
).images[0]
image.save("output.png", format="JPEG")
``` |