BiliSakura commited on
Commit
99b4552
·
verified ·
1 Parent(s): 0c5f308

Add files using upload-large-folder tool

Browse files
README.md CHANGED
@@ -7,8 +7,15 @@ tags:
7
  - controlnet
8
  - diffusers
9
  - text-to-image
 
 
 
 
10
  ---
11
 
 
 
 
12
  # DiffusionSat Custom Pipelines
13
 
14
  Custom community pipelines for loading DiffusionSat checkpoints directly with `diffusers.DiffusionPipeline.from_pretrained()`.
@@ -56,47 +63,8 @@ pipe = pipe.to("cuda")
56
  image = pipe(
57
  "satellite image of farmland",
58
  metadata=None, # Optional
 
 
59
  num_inference_steps=30,
60
  ).images[0]
61
- ```
62
-
63
- ### 2. ControlNet Pipeline
64
-
65
- Use `pipeline_diffusionsat_controlnet.py` for ControlNet generation.
66
-
67
- ```python
68
- import torch
69
- from diffusers import DiffusionPipeline, ControlNetModel
70
- from diffusers.utils import load_image
71
-
72
- # 1. Load ControlNet
73
- controlnet = ControlNetModel.from_pretrained(
74
- "path/to/ckpt/diffusionsat/controlnet",
75
- torch_dtype=torch.float16
76
- )
77
-
78
- # 2. Load Pipeline with ControlNet
79
- pipe = DiffusionPipeline.from_pretrained(
80
- "path/to/ckpt/diffusionsat",
81
- controlnet=controlnet,
82
- custom_pipeline="./pipeline_diffusionsat_controlnet.py", # Path to this file
83
- torch_dtype=torch.float16,
84
- trust_remote_code=True,
85
- )
86
- pipe = pipe.to("cuda")
87
-
88
- # 3. Prepare Control Image
89
- control_image = load_image("path/to/conditioning_image.png")
90
-
91
- # 4. Generate
92
- # metadata: Target image metadata (optional)
93
- # cond_metadata: Conditioning image metadata (optional)
94
-
95
- image = pipe(
96
- "satellite image of farmland",
97
- image=control_image,
98
- metadata=None,
99
- cond_metadata=None,
100
- num_inference_steps=30,
101
- ).images[0]
102
- ```
 
7
  - controlnet
8
  - diffusers
9
  - text-to-image
10
+ widget:
11
+ - prompt: satellite image of farmland
12
+ output:
13
+ url: demo_images/readme_text2img.jpeg
14
  ---
15
 
16
+ > [!NOTE]
17
+ > If you encounter pipeline loading failure or unexpected output, please contact bili_sakura@zju.edu.cn.
18
+
19
  # DiffusionSat Custom Pipelines
20
 
21
  Custom community pipelines for loading DiffusionSat checkpoints directly with `diffusers.DiffusionPipeline.from_pretrained()`.
 
63
  image = pipe(
64
  "satellite image of farmland",
65
  metadata=None, # Optional
66
+ height=256,
67
+ width=256,
68
  num_inference_steps=30,
69
  ).images[0]
70
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
demo_images/readme_text2img.jpeg ADDED
scheduler/scheduler_config.json CHANGED
@@ -6,7 +6,7 @@
6
  "beta_start": 0.00085,
7
  "clip_sample": false,
8
  "num_train_timesteps": 1000,
9
- "prediction_type": "epsilon",
10
  "set_alpha_to_one": false,
11
  "skip_prk_steps": true,
12
  "steps_offset": 1,
 
6
  "beta_start": 0.00085,
7
  "clip_sample": false,
8
  "num_train_timesteps": 1000,
9
+ "prediction_type": "v_prediction",
10
  "set_alpha_to_one": false,
11
  "skip_prk_steps": true,
12
  "steps_offset": 1,