hrishikeshagi commited on
Commit
e0846e9
Β·
1 Parent(s): 0b89080

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -35
app.py CHANGED
@@ -1,33 +1,6 @@
1
- # -*- coding: utf-8 -*-
2
- """ImagePromtGenerator.ipynb
3
 
4
- Automatically generated by Colaboratory.
5
 
6
- Original file is located at
7
- https://colab.research.google.com/drive/14IVhWCKpCLQnMrb4wuAqYRM4a6j14Dyt
8
 
9
- # CLIP Interrogator 2.2 by [@pharmapsychotic](https://twitter.com/pharmapsychotic)
10
-
11
- Want to figure out what a good prompt might be to create new images like an existing one? The CLIP Interrogator is here to get you answers!
12
-
13
- <br>
14
-
15
- For Stable Diffusion 1.X choose the **ViT-L** model and for Stable Diffusion 2.0+ choose the **ViT-H** CLIP Model.
16
-
17
- This version is specialized for producing nice prompts for use with Stable Diffusion and achieves higher alignment between generated text prompt and source image. You can try out the old [version 1](https://colab.research.google.com/github/pharmapsychotic/clip-interrogator/blob/v1/clip_interrogator.ipynb) to see how different CLIP models ranks terms.
18
-
19
- You can also run this on HuggingFace and Replicate<br>
20
- [![Generic badge](https://img.shields.io/badge/πŸ€—-Open%20in%20Spaces-blue.svg)](https://huggingface.co/spaces/pharma/CLIP-Interrogator) [![Replicate](https://replicate.com/pharmapsychotic/clip-interrogator/badge)](https://replicate.com/pharmapsychotic/clip-interrogator)
21
-
22
- <br>
23
-
24
- If this notebook is helpful to you please consider buying me a coffee via [ko-fi](https://ko-fi.com/pharmapsychotic) or following me on [twitter](https://twitter.com/pharmapsychotic) for more cool Ai stuff. πŸ™‚
25
-
26
- And if you're looking for more Ai art tools check out my [Ai generative art tools list](https://pharmapsychotic.com/tools.html).
27
- """
28
-
29
-
30
- #@title Setup
31
  import os, subprocess
32
 
33
  def setup():
@@ -104,14 +77,6 @@ io = gr.Interface(
104
  )
105
  io.launch(debug=False, share=True)
106
 
107
- #@title Batch process a folder of images πŸ“ -> πŸ“
108
-
109
- #@markdown This will generate prompts for every image in a folder and either save results
110
- #@markdown to a desc.csv file in the same folder or rename the files to contain their prompts.
111
- #@markdown The renamed files work well for [DreamBooth extension](https://github.com/d8ahazard/sd_dreambooth_extension)
112
- #@markdown in the [Stable Diffusion Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui).
113
- #@markdown You can use the generated csv in the [Stable Diffusion Finetuning](https://colab.research.google.com/drive/1vrh_MUSaAMaC5tsLWDxkFILKJ790Z4Bl?usp=sharing)
114
-
115
  import csv
116
  import os
117
  from IPython.display import clear_output, display
 
 
 
1
 
 
2
 
 
 
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  import os, subprocess
5
 
6
  def setup():
 
77
  )
78
  io.launch(debug=False, share=True)
79
 
 
 
 
 
 
 
 
 
80
  import csv
81
  import os
82
  from IPython.display import clear_output, display