johnmullan commited on
Commit
62b1068
1 Parent(s): c86bde1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -15
README.md CHANGED
@@ -42,30 +42,28 @@ pip install invisible_watermark transformers accelerate safetensors
42
 
43
  Running the pipeline (if you don't swap the scheduler it will run with the default **EulerDiscreteScheduler** in this example we are swapping it to **EulerAncestralDiscreteScheduler**:
44
  ```py
45
- import torch
46
- from torch import autocast
47
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
48
- model = "hotshotco/SDXL-512"
49
  pipe = StableDiffusionXLPipeline.from_pretrained(
50
- model,
51
- torch_dtype=torch.float16,
52
- use_safetensors=True,
53
- variant="fp16"
54
- )
55
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
56
- pipe.to('cuda')
57
  prompt = "a woman laughing"
58
  negative_prompt = ""
 
59
  image = pipe(
60
- prompt,
61
- negative_prompt=negative_prompt,
62
  width=512,
63
  height=512,
64
- guidance_scale=12,
65
- target_size=(1024,1024),
66
- original_size=(4096,4096),
67
  num_inference_steps=50
68
- ).images[0]
 
69
  image.save("woman_laughing.png")
70
  ```
71
 
 
42
 
43
  Running the pipeline (if you don't swap the scheduler it will run with the default **EulerDiscreteScheduler** in this example we are swapping it to **EulerAncestralDiscreteScheduler**:
44
  ```py
 
 
45
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
46
+
47
  pipe = StableDiffusionXLPipeline.from_pretrained(
48
+ "hotshotco/SDXL-512",
49
+ use_safetensors=True,
50
+ ).to('cuda')
51
+
 
52
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
53
+
54
  prompt = "a woman laughing"
55
  negative_prompt = ""
56
+
57
  image = pipe(
58
+ prompt,
59
+ negative_prompt=negative_prompt,
60
  width=512,
61
  height=512,
62
+ target_size=(1024, 1024),
63
+ original_size=(4096, 4096),
 
64
  num_inference_steps=50
65
+ ).images[0]
66
+
67
  image.save("woman_laughing.png")
68
  ```
69