MCPcopy Create free account
hub / github.com/IceClear/StableSR / main

Function main

scripts/generate_vqgan_data.py:151–434  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149
150
151def main():
152 parser = argparse.ArgumentParser()
153
154 parser.add_argument(
155 "--init-img",
156 type=str,
157 nargs="?",
158 help="path to the input image",
159 default="/mnt/lustre/jywang/dataset/ImageSR/RealSRSet/"
160 )
161
162 parser.add_argument(
163 "--outdir",
164 type=str,
165 nargs="?",
166 help="dir to write results to",
167 default="outputs/sr-samples"
168 )
169
170 parser.add_argument(
171 "--skip_grid",
172 action='store_true',
173 help="do not save a grid, only individual samples. Helpful when evaluating lots of samples",
174 )
175
176 parser.add_argument(
177 "--skip_save",
178 action='store_true',
179 help="do not save indiviual samples. For speed measurements.",
180 )
181
182 parser.add_argument(
183 "--ddim_steps",
184 type=int,
185 default=50,
186 help="number of ddim sampling steps",
187 )
188 parser.add_argument(
189 "--ddpm_steps",
190 type=int,
191 default=1000,
192 help="number of ddpm sampling steps",
193 )
194
195 parser.add_argument(
196 "--plms",
197 action='store_true',
198 help="use plms sampling",
199 )
200 parser.add_argument(
201 "--fixed_code",
202 action='store_true',
203 help="if enabled, uses the same starting code across all samples ",
204 )
205
206 parser.add_argument(
207 "--ddim_eta",
208 type=float,

Callers 1

Calls 13

PLMSSamplerClass · 0.90
DDIMSamplerClass · 0.90
RealESRGANDatasetClass · 0.90
loadMethod · 0.80
load_model_from_configFunction · 0.70
space_timestepsFunction · 0.70
register_scheduleMethod · 0.45
ema_scopeMethod · 0.45
get_inputMethod · 0.45
q_sampleMethod · 0.45
sampleMethod · 0.45
decode_first_stageMethod · 0.45

Tested by

no test coverage detected