fixing issues
Browse files
App/Generate/database/Modal.py
CHANGED
@@ -12,7 +12,10 @@ class ModalImageGenerator:
|
|
12 |
)
|
13 |
|
14 |
async def generate_image(
|
15 |
-
self,
|
|
|
|
|
|
|
16 |
) -> Dict[str, Any]:
|
17 |
params = {
|
18 |
"ip_adapter_weight": ip_adapter_weight,
|
|
|
12 |
)
|
13 |
|
14 |
async def generate_image(
|
15 |
+
self,
|
16 |
+
prompt: str,
|
17 |
+
reference_image_url: str = "https://image.lexica.art/full_webp/d6ddd5c5-060c-4aba-b9d0-cf0e02dc65bd",
|
18 |
+
ip_adapter_weight: float = 0.4,
|
19 |
) -> Dict[str, Any]:
|
20 |
params = {
|
21 |
"ip_adapter_weight": ip_adapter_weight,
|
App/Generate/generatorRoutes.py
CHANGED
@@ -22,7 +22,13 @@ import uuid
|
|
22 |
|
23 |
async def update_scene(model_scene, reference_image_url=None, ip_adapter_weight=0.4):
|
24 |
await model_scene.generate_scene_data(reference_image_url, ip_adapter_weight)
|
25 |
-
await model_scene.update(
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
async def from_dict_generate(data: Story):
|
|
|
22 |
|
23 |
async def update_scene(model_scene, reference_image_url=None, ip_adapter_weight=0.4):
|
24 |
await model_scene.generate_scene_data(reference_image_url, ip_adapter_weight)
|
25 |
+
await model_scene.update(
|
26 |
+
**{
|
27 |
+
k: v
|
28 |
+
for k, v in model_scene.__dict__.items()
|
29 |
+
if k not in ["reference_image_url", "ip_adapter_weight"]
|
30 |
+
}
|
31 |
+
)
|
32 |
|
33 |
|
34 |
async def from_dict_generate(data: Story):
|