Leimingkun commited on
Commit
9e0a8d1
β€’
1 Parent(s): 835dcb7

pillow_heif

Browse files
Files changed (2) hide show
  1. app.py +15 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -11,6 +11,10 @@ from diffusers import (
11
  StableDiffusionXLPipeline,
12
  )
13
  from ip_adapter import StyleStudio_Adapter
 
 
 
 
14
 
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
  dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
@@ -162,6 +166,7 @@ Advanced usage:<br>
162
  2. Choose different guidance and steps.
163
  3. Set the timing for the Teacher Model's participation.
164
  4. Feel free to discontinue using the Cross-Modal AdaIN and the Teacher Model for result comparison.
 
165
  """
166
 
167
  article = r"""
@@ -171,13 +176,22 @@ article = r"""
171
  1. As the value of end_fusion <b>increases</b>, the style gradually diminishes.
172
  Therefore, it is suggested to set end_fusion to be between <b>1/5 and 1/3</b> of the number of inference steps (num inference steps).
173
  2. If you want to experience style-based CFG, see the details on the <a href="https://github.com/Westlake-AGI-Lab/StyleStudio">GitHub repo</a>.
 
174
 
175
  ---
176
  πŸ“ **Citation**
177
  <br>
178
  If our work is helpful for your research or applications, please cite us via:
179
  ```bibtex
180
-
 
 
 
 
 
 
 
 
181
  ```
182
  πŸ“§ **Contact**
183
  <br>
 
11
  StableDiffusionXLPipeline,
12
  )
13
  from ip_adapter import StyleStudio_Adapter
14
+ import pillow_heif
15
+
16
+ pillow_heif.register_heif_opener()
17
+ pillow_heif.register_avif_opener()
18
 
19
  device = "cuda" if torch.cuda.is_available() else "cpu"
20
  dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
 
166
  2. Choose different guidance and steps.
167
  3. Set the timing for the Teacher Model's participation.
168
  4. Feel free to discontinue using the Cross-Modal AdaIN and the Teacher Model for result comparison.
169
+ 5. ⏰ We recommend uploading images in <b>JPEG</b> or <b>PNG</b> format.
170
  """
171
 
172
  article = r"""
 
176
  1. As the value of end_fusion <b>increases</b>, the style gradually diminishes.
177
  Therefore, it is suggested to set end_fusion to be between <b>1/5 and 1/3</b> of the number of inference steps (num inference steps).
178
  2. If you want to experience style-based CFG, see the details on the <a href="https://github.com/Westlake-AGI-Lab/StyleStudio">GitHub repo</a>.
179
+ 3. For the purpose of comparing various results, it is possible to do so by switching off the cross-modal AdaIN and the Teacher Model.
180
 
181
  ---
182
  πŸ“ **Citation**
183
  <br>
184
  If our work is helpful for your research or applications, please cite us via:
185
  ```bibtex
186
+ @misc{lei2024stylestudiotextdrivenstyletransfer,
187
+ title={StyleStudio: Text-Driven Style Transfer with Selective Control of Style Elements},
188
+ author={Mingkun Lei and Xue Song and Beier Zhu and Hao Wang and Chi Zhang},
189
+ year={2024},
190
+ eprint={2412.08503},
191
+ archivePrefix={arXiv},
192
+ primaryClass={cs.CV},
193
+ url={https://arxiv.org/abs/2412.08503},
194
+ }
195
  ```
196
  πŸ“§ **Contact**
197
  <br>
requirements.txt CHANGED
@@ -15,4 +15,5 @@ insightface
15
  gradio
16
  controlnet_aux
17
  gdown
18
- peft
 
 
15
  gradio
16
  controlnet_aux
17
  gdown
18
+ peft
19
+ pillow_heif