Fantasy-Studio / Paint-by-Example

Paint by Example: Exemplar-based Image Editing with Diffusion Models
https://arxiv.org/abs/2211.13227
Other
1.08k stars 96 forks source link

What is {:06} means #22

Open QixingJiang opened 1 year ago

QixingJiang commented 1 year ago

Thank you for your outstanding contribution to community! I noticed that in main.py, line 621:
"filename": "{epoch:06}-{step:09}", and line 553: "filename": "{epoch:06}", I wonder if it's missing "format", or what is the meaning of this {:06}?

99991 commented 1 year ago

This is Python's syntax for formatting strings. You can read more about it in the Documentation. In this example, the integer epoch will be left-padded with zeros to a length of 6:

"{epoch:06}".format(epoch=12)
'000012'