Commit
·
8589b87
1
Parent(s):
d36b774
Update README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,24 @@ dataset_info:
|
|
22 |
download_size: 166034308
|
23 |
dataset_size: 166170790.0
|
24 |
---
|
25 |
-
#
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
download_size: 166034308
|
23 |
dataset_size: 166170790.0
|
24 |
---
|
25 |
+
# Images of Parti Prompts for "if-v-1.0"
|
26 |
|
27 |
+
Code that was used to get the results:
|
28 |
+
|
29 |
+
```py
|
30 |
+
from diffusers import DiffusionPipeline
|
31 |
+
import torch
|
32 |
+
|
33 |
+
pipe_low = DiffusionPipeline.from_pretrained("DeepFloyd/IF-I-XL-v1.0", safety_checker=None, watermarker=None, torch_dtype=torch.float16, variant="fp16")
|
34 |
+
pipe_low.enable_model_cpu_offload()
|
35 |
+
|
36 |
+
pipe_up = DiffusionPipeline.from_pretrained("DeepFloyd/IF-II-L-v1.0", safety_checker=None, watermarker=None, text_encoder=pipe_low.text_encoder, torch_dtype=torch.float16, variant="fp16")
|
37 |
+
pipe_up.enable_model_cpu_offload()
|
38 |
+
|
39 |
+
prompt = "" # a parti prompt
|
40 |
+
generator = torch.Generator("cuda").manual_seed(0)
|
41 |
+
|
42 |
+
prompt_embeds, negative_prompt_embeds = pipe_low.encode_prompt(prompt)
|
43 |
+
images = pipe_low(prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_prompt_embeds, num_inference_steps=100, generator=generator, output_type="pt").images
|
44 |
+
images = pipe_up(prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_prompt_embeds, image=images, num_inference_steps=100, generator=generator).images[0]
|
45 |
+
```
|