fix: random seed
Browse files- .idea/workspace.xml +21 -20
- app.py +2 -2
.idea/workspace.xml
CHANGED
|
@@ -31,26 +31,26 @@
|
|
| 31 |
<option name="hideEmptyMiddlePackages" value="true" />
|
| 32 |
<option name="showLibraryContents" value="true" />
|
| 33 |
</component>
|
| 34 |
-
<component name="PropertiesComponent">
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
}
|
| 53 |
-
}
|
| 54 |
<component name="SharedIndexes">
|
| 55 |
<attachedChunks>
|
| 56 |
<set>
|
|
@@ -68,7 +68,8 @@
|
|
| 68 |
<updated>1713919907805</updated>
|
| 69 |
<workItem from="1713919910236" duration="1099000" />
|
| 70 |
<workItem from="1713921043559" duration="495000" />
|
| 71 |
-
<workItem from="1714055653743" duration="
|
|
|
|
| 72 |
</task>
|
| 73 |
<servers />
|
| 74 |
</component>
|
|
|
|
| 31 |
<option name="hideEmptyMiddlePackages" value="true" />
|
| 32 |
<option name="showLibraryContents" value="true" />
|
| 33 |
</component>
|
| 34 |
+
<component name="PropertiesComponent">{
|
| 35 |
+
"keyToString": {
|
| 36 |
+
"ASKED_ADD_EXTERNAL_FILES": "true",
|
| 37 |
+
"Python.app.executor": "Run",
|
| 38 |
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
| 39 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
| 40 |
+
"git-widget-placeholder": "main",
|
| 41 |
+
"kotlin-language-version-configured": "true",
|
| 42 |
+
"last_opened_file_path": "C:/Users/Amir/anaconda3/envs/env",
|
| 43 |
+
"node.js.detected.package.eslint": "true",
|
| 44 |
+
"node.js.detected.package.tslint": "true",
|
| 45 |
+
"node.js.selected.package.eslint": "(autodetect)",
|
| 46 |
+
"node.js.selected.package.tslint": "(autodetect)",
|
| 47 |
+
"nodejs_package_manager_path": "npm",
|
| 48 |
+
"project.structure.last.edited": "Modules",
|
| 49 |
+
"project.structure.proportion": "0.0",
|
| 50 |
+
"project.structure.side.proportion": "0.0",
|
| 51 |
+
"vue.rearranger.settings.migration": "true"
|
| 52 |
}
|
| 53 |
+
}</component>
|
| 54 |
<component name="SharedIndexes">
|
| 55 |
<attachedChunks>
|
| 56 |
<set>
|
|
|
|
| 68 |
<updated>1713919907805</updated>
|
| 69 |
<workItem from="1713919910236" duration="1099000" />
|
| 70 |
<workItem from="1713921043559" duration="495000" />
|
| 71 |
+
<workItem from="1714055653743" duration="2106000" />
|
| 72 |
+
<workItem from="1714065328028" duration="48000" />
|
| 73 |
</task>
|
| 74 |
<servers />
|
| 75 |
</component>
|
app.py
CHANGED
|
@@ -46,7 +46,7 @@ def generate_button_clicked(*args):
|
|
| 46 |
values[key] = DEFAULT_VALUES[key]
|
| 47 |
|
| 48 |
if values["randomize_seed"]:
|
| 49 |
-
values["
|
| 50 |
|
| 51 |
if values["randomize_cfg"]:
|
| 52 |
values["text_cfg_scale"] = round(random.uniform(6.0, 9.0), ndigits=2)
|
|
@@ -64,7 +64,7 @@ def generate_button_clicked(*args):
|
|
| 64 |
if input_image is None:
|
| 65 |
raise gr.Error("Missing Input: input_image")
|
| 66 |
if len(edit_instruction) == 0:
|
| 67 |
-
|
| 68 |
|
| 69 |
GoogleDrive_connection_Path = ""
|
| 70 |
# GoogleDrive_connection_Path = "service_account.json"
|
|
|
|
| 46 |
values[key] = DEFAULT_VALUES[key]
|
| 47 |
|
| 48 |
if values["randomize_seed"]:
|
| 49 |
+
values["seed"] = random.randint(1, 100000)
|
| 50 |
|
| 51 |
if values["randomize_cfg"]:
|
| 52 |
values["text_cfg_scale"] = round(random.uniform(6.0, 9.0), ndigits=2)
|
|
|
|
| 64 |
if input_image is None:
|
| 65 |
raise gr.Error("Missing Input: input_image")
|
| 66 |
if len(edit_instruction) == 0:
|
| 67 |
+
return input_image
|
| 68 |
|
| 69 |
GoogleDrive_connection_Path = ""
|
| 70 |
# GoogleDrive_connection_Path = "service_account.json"
|