Text-to-Image
Diffusers
TensorBoard
Safetensors
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
dreambooth
Instructions to use covalenthq/boredape_diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use covalenthq/boredape_diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("covalenthq/boredape_diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "photo of a bayc nft" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
CK commited on
Commit ·
3c804dd
1
Parent(s): 5fffd79
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,12 +54,25 @@ pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)
|
|
| 54 |
|
| 55 |
prompt = ["a spiderman bayc nft"]
|
| 56 |
neg_prompt = ["realistic,disfigured face,eye patch,disfigured eyes, disfigured, deformed,bad anatomy"] * len(prompt)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
| 59 |
|
| 60 |
with autocast("cuda"), torch.inference_mode():
|
| 61 |
imgs = pipeline(
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
).images
|
| 64 |
|
| 65 |
for img in imgs:
|
|
|
|
| 54 |
|
| 55 |
prompt = ["a spiderman bayc nft"]
|
| 56 |
neg_prompt = ["realistic,disfigured face,eye patch,disfigured eyes, disfigured, deformed,bad anatomy"] * len(prompt)
|
| 57 |
+
num_samples = 3
|
| 58 |
+
guidance_scale = 9
|
| 59 |
+
num_inference_steps = 50
|
| 60 |
+
height = 512
|
| 61 |
+
width = 512
|
| 62 |
|
| 63 |
+
seed = np.random.randint(0, 2**20 - 1)
|
| 64 |
+
print("Seed: {}".format(str(seed)))
|
| 65 |
+
generator = torch.Generator(device='cuda').manual_seed(seed)
|
| 66 |
|
| 67 |
with autocast("cuda"), torch.inference_mode():
|
| 68 |
imgs = pipeline(
|
| 69 |
+
prompt,
|
| 70 |
+
negative_prompt=neg_prompt,
|
| 71 |
+
height=height, width=width,
|
| 72 |
+
num_images_per_prompt=num_samples,
|
| 73 |
+
num_inference_steps=num_inference_steps,
|
| 74 |
+
guidance_scale=guidance_scale,
|
| 75 |
+
generator=generator
|
| 76 |
).images
|
| 77 |
|
| 78 |
for img in imgs:
|