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:
|