Spaces:
Running
on
Zero
Running
on
Zero
app
Browse files- .idea/workspace.xml +60 -0
- 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 |
+
"associatedIndex": 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 |
+
"keyToString": {
|
26 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
27 |
+
"git-widget-placeholder": "main",
|
28 |
+
"last_opened_file_path": "/Users/xingpeng/Desktop/project/hub/HF/space/CSGO",
|
29 |
+
"node.js.detected.package.eslint": "true",
|
30 |
+
"node.js.detected.package.tslint": "true",
|
31 |
+
"node.js.selected.package.eslint": "(autodetect)",
|
32 |
+
"node.js.selected.package.tslint": "(autodetect)",
|
33 |
+
"nodejs_package_manager_path": "npm",
|
34 |
+
"vue.rearranger.settings.migration": "true"
|
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=
|
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=
|
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,
|