xingpng commited on
Commit
06f525c
1 Parent(s): f0a91fd
Files changed (2) hide show
  1. .idea/workspace.xml +60 -0
  2. app.py +2 -2
.idea/workspace.xml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="06aeb431-3965-40d3-8215-f4952b265951" name="Changes" comment="" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="Git.Settings">
14
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
+ </component>
16
+ <component name="ProjectColorInfo">{
17
+ &quot;associatedIndex&quot;: 3
18
+ }</component>
19
+ <component name="ProjectId" id="2lXbtoHh4jfSGOb5uKSr0Ro0FlJ" />
20
+ <component name="ProjectViewState">
21
+ <option name="hideEmptyMiddlePackages" value="true" />
22
+ <option name="showLibraryContents" value="true" />
23
+ </component>
24
+ <component name="PropertiesComponent">{
25
+ &quot;keyToString&quot;: {
26
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
27
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
28
+ &quot;last_opened_file_path&quot;: &quot;/Users/xingpeng/Desktop/project/hub/HF/space/CSGO&quot;,
29
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
30
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
31
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
32
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
33
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
34
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
35
+ }
36
+ }</component>
37
+ <component name="SharedIndexes">
38
+ <attachedChunks>
39
+ <set>
40
+ <option value="bundled-js-predefined-1d06a55b98c1-91d5c284f522-JavaScript-PY-241.15989.155" />
41
+ <option value="bundled-python-sdk-babbdf50b680-7c6932dee5e4-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-241.15989.155" />
42
+ </set>
43
+ </attachedChunks>
44
+ </component>
45
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
46
+ <component name="TaskManager">
47
+ <task active="true" id="Default" summary="Default task">
48
+ <changelist id="06aeb431-3965-40d3-8215-f4952b265951" name="Changes" comment="" />
49
+ <created>1725329585964</created>
50
+ <option name="number" value="Default" />
51
+ <option name="presentableId" value="Default" />
52
+ <updated>1725329585964</updated>
53
+ <workItem from="1725329587130" duration="12866000" />
54
+ </task>
55
+ <servers />
56
+ </component>
57
+ <component name="TypeScriptGeneratedFilesManager">
58
+ <option name="version" value="3" />
59
+ </component>
60
+ </project>
app.py CHANGED
@@ -136,7 +136,7 @@ def run_for_examples(content_image_pil,style_image_pil,target, prompt, scale_c,
136
  scale_c=scale_c,
137
  scale_s=scale_s,
138
  guidance_scale=7.0,
139
- num_samples=3,
140
  num_inference_steps=50,
141
  seed=42,
142
  target=target,
@@ -156,7 +156,7 @@ def image_grid(imgs, rows, cols):
156
  for i, img in enumerate(imgs):
157
  grid.paste(img, box=(i % cols * w, i // cols * h))
158
  return grid
159
- @spaces.GPU(duration=300)
160
  def create_image(content_image_pil,
161
  style_image_pil,
162
  prompt,
 
136
  scale_c=scale_c,
137
  scale_s=scale_s,
138
  guidance_scale=7.0,
139
+ num_samples=2,
140
  num_inference_steps=50,
141
  seed=42,
142
  target=target,
 
156
  for i, img in enumerate(imgs):
157
  grid.paste(img, box=(i % cols * w, i // cols * h))
158
  return grid
159
+ @spaces.GPU(duration=200)
160
  def create_image(content_image_pil,
161
  style_image_pil,
162
  prompt,