Instructions to use StonyBrook-CVLab/PixCell-256-Cell-ControlNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use StonyBrook-CVLab/PixCell-256-Cell-ControlNet with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("StonyBrook-CVLab/PixCell-256-Cell-ControlNet", torch_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
|
@@ -76,7 +76,7 @@ uni_emb = uni_emb.unsqueeze(1)
|
|
| 76 |
print("Extracted UNI:", uni_emb.shape)
|
| 77 |
|
| 78 |
# Get unconditional embedding for classifier-free guidance
|
| 79 |
-
uncond =
|
| 80 |
# Generate new samples using the given mask
|
| 81 |
-
samples =
|
| 82 |
```
|
|
|
|
| 76 |
print("Extracted UNI:", uni_emb.shape)
|
| 77 |
|
| 78 |
# Get unconditional embedding for classifier-free guidance
|
| 79 |
+
uncond = pipeline.get_unconditional_embedding(uni_emb.shape[0])
|
| 80 |
# Generate new samples using the given mask
|
| 81 |
+
samples = pipeline(uni_embeds=uni_emb, controlnet_input=mask, negative_uni_embeds=uncond, guidance_scale=2.5, num_images_per_prompt=1).images
|
| 82 |
```
|