Spaces:
Runtime error
Runtime error
Asko Relas commited on
Commit Β·
8c1e8e8
1
Parent(s): df8e76b
fix
Browse files- .idea/.gitignore +0 -0
- .idea/diffusers-fast-inpaint.iml +12 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- .idea/workspace.xml +38 -0
- app.py +7 -4
.idea/.gitignore
ADDED
|
File without changes
|
.idea/diffusers-fast-inpaint.iml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<module type="PYTHON_MODULE" version="4">
|
| 3 |
+
<component name="NewModuleRootManager">
|
| 4 |
+
<content url="file://$MODULE_DIR$" />
|
| 5 |
+
<orderEntry type="inheritedJdk" />
|
| 6 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
| 7 |
+
</component>
|
| 8 |
+
<component name="PyDocumentationSettings">
|
| 9 |
+
<option name="format" value="PLAIN" />
|
| 10 |
+
<option name="myDocStringFormat" value="Plain" />
|
| 11 |
+
</component>
|
| 12 |
+
</module>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<settings>
|
| 3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
| 4 |
+
<version value="1.0" />
|
| 5 |
+
</settings>
|
| 6 |
+
</component>
|
.idea/modules.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectModuleManager">
|
| 4 |
+
<modules>
|
| 5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/diffusers-fast-inpaint.iml" filepath="$PROJECT_DIR$/.idea/diffusers-fast-inpaint.iml" />
|
| 6 |
+
</modules>
|
| 7 |
+
</component>
|
| 8 |
+
</project>
|
.idea/vcs.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="VcsDirectoryMappings">
|
| 4 |
+
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
| 5 |
+
</component>
|
| 6 |
+
</project>
|
.idea/workspace.xml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ChangeListManager">
|
| 4 |
+
<list default="true" id="30839ef6-dc02-4fb4-a184-2db39cfd122f" name="Changes" comment="">
|
| 5 |
+
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
| 6 |
+
</list>
|
| 7 |
+
<option name="SHOW_DIALOG" value="false" />
|
| 8 |
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
| 9 |
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
| 10 |
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
| 11 |
+
</component>
|
| 12 |
+
<component name="Git.Settings">
|
| 13 |
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
| 14 |
+
</component>
|
| 15 |
+
<component name="ProjectId" id="39TEjpLMFZs4CSNrnyUtXLBRJix" />
|
| 16 |
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
| 17 |
+
<component name="ProjectViewState">
|
| 18 |
+
<option name="hideEmptyMiddlePackages" value="true" />
|
| 19 |
+
<option name="showLibraryContents" value="true" />
|
| 20 |
+
</component>
|
| 21 |
+
<component name="PropertiesComponent">
|
| 22 |
+
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
| 23 |
+
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
| 24 |
+
<property name="dart.analysis.tool.window.visible" value="false" />
|
| 25 |
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
| 26 |
+
</component>
|
| 27 |
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
| 28 |
+
<component name="TaskManager">
|
| 29 |
+
<task active="true" id="Default" summary="Default task">
|
| 30 |
+
<changelist id="30839ef6-dc02-4fb4-a184-2db39cfd122f" name="Changes" comment="" />
|
| 31 |
+
<created>1770711798338</created>
|
| 32 |
+
<option name="number" value="Default" />
|
| 33 |
+
<option name="presentableId" value="Default" />
|
| 34 |
+
<updated>1770711798338</updated>
|
| 35 |
+
</task>
|
| 36 |
+
<servers />
|
| 37 |
+
</component>
|
| 38 |
+
</project>
|
app.py
CHANGED
|
@@ -39,7 +39,7 @@ MODELS = {
|
|
| 39 |
"Playground v2.5": "playgroundai/playground-v2.5-1024px-aesthetic",
|
| 40 |
"Juggernaut XL Lightning": "RunDiffusion/Juggernaut-XL-Lightning",
|
| 41 |
"Pixel Party XL": "pixelparty/pixel-party-xl",
|
| 42 |
-
"Fluently XL v3
|
| 43 |
}
|
| 44 |
|
| 45 |
# Models that require special UNet loading (value is base model to use)
|
|
@@ -49,9 +49,9 @@ UNET_MODELS = {
|
|
| 49 |
|
| 50 |
# Models that are single safetensors files (value is the repo, filename, and base model)
|
| 51 |
SINGLE_FILE_MODELS = {
|
| 52 |
-
"Fluently XL v3
|
| 53 |
-
"repo_id": "fluently/Fluently-XL-v3
|
| 54 |
-
"filename": "FluentlyXL-v3
|
| 55 |
"base": "stabilityai/stable-diffusion-xl-base-1.0",
|
| 56 |
},
|
| 57 |
}
|
|
@@ -206,6 +206,9 @@ def fill_image(prompt, negative_prompt, image, model_selection, paste_back, guid
|
|
| 206 |
|
| 207 |
if paste_back:
|
| 208 |
image = image.convert("RGBA")
|
|
|
|
|
|
|
|
|
|
| 209 |
cnet_image.paste(image, (0, 0), binary_mask)
|
| 210 |
else:
|
| 211 |
cnet_image = image
|
|
|
|
| 39 |
"Playground v2.5": "playgroundai/playground-v2.5-1024px-aesthetic",
|
| 40 |
"Juggernaut XL Lightning": "RunDiffusion/Juggernaut-XL-Lightning",
|
| 41 |
"Pixel Party XL": "pixelparty/pixel-party-xl",
|
| 42 |
+
"Fluently XL v3": "fluently/Fluently-XL-v3",
|
| 43 |
}
|
| 44 |
|
| 45 |
# Models that require special UNet loading (value is base model to use)
|
|
|
|
| 49 |
|
| 50 |
# Models that are single safetensors files (value is the repo, filename, and base model)
|
| 51 |
SINGLE_FILE_MODELS = {
|
| 52 |
+
"Fluently XL v3": {
|
| 53 |
+
"repo_id": "fluently/Fluently-XL-v3",
|
| 54 |
+
"filename": "FluentlyXL-v3.safetensors",
|
| 55 |
"base": "stabilityai/stable-diffusion-xl-base-1.0",
|
| 56 |
},
|
| 57 |
}
|
|
|
|
| 206 |
|
| 207 |
if paste_back:
|
| 208 |
image = image.convert("RGBA")
|
| 209 |
+
# Resize generated image to match original source size if needed
|
| 210 |
+
if image.size != source.size:
|
| 211 |
+
image = image.resize(source.size)
|
| 212 |
cnet_image.paste(image, (0, 0), binary_mask)
|
| 213 |
else:
|
| 214 |
cnet_image = image
|