lcybuaa commited on
Commit
19981c9
·
verified ·
1 Parent(s): a2dd30d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -4
README.md CHANGED
@@ -18,14 +18,21 @@ pip install diffusers transformers accelerate scipy safetensors
18
  Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to EulerDiscreteScheduler):
19
 
20
  ```python
 
21
  from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
 
22
  model_id = "lcybuaa/Text2Earth"
23
- # Maybe you can use the Euler scheduler here instead
24
  scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
25
- pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16, safety_checker=None)
 
26
  pipe = pipe.to("cuda")
27
  prompt = "Seven green circular farmlands are neatly arranged on the ground"
28
- image = pipe(prompt).images[0]
29
-
 
 
 
 
30
  image.save("circular.png")
31
  ```
 
18
  Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to EulerDiscreteScheduler):
19
 
20
  ```python
21
+ import torch
22
  from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
23
+
24
  model_id = "lcybuaa/Text2Earth"
25
+ # Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to DPMSolverMultistepScheduler):
26
  scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
27
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, scheduler=scheduler,
28
+ custom_pipeline="pipeline_text2earth_diffusion", safety_checker=None)
29
  pipe = pipe.to("cuda")
30
  prompt = "Seven green circular farmlands are neatly arranged on the ground"
31
+ image = pipe(prompt,
32
+ height=256,
33
+ width=256,
34
+ num_inference_steps=50,
35
+ guidance_scale=4.0).images[0]
36
+
37
  image.save("circular.png")
38
  ```