Spaces:
Paused
Paused
Merge branch 'main' of hf.co:spaces/khawir/cg-gen-ai
Browse files- app/api/generate.py +1 -0
- app/core/schemas.py +2 -2
app/api/generate.py
CHANGED
@@ -145,6 +145,7 @@ def image_variations(model: Request, request: ImageVariations, db: Annotated[Ses
|
|
145 |
image.resize((256, 256))
|
146 |
|
147 |
if prompt:
|
|
|
148 |
crud.create_prompt(db=db, user_id=current_user.user_id, prompt=prompt)
|
149 |
else:
|
150 |
request.scale = 1.0
|
|
|
145 |
image.resize((256, 256))
|
146 |
|
147 |
if prompt:
|
148 |
+
prompt = f"best quality, high quality, {prompt}"
|
149 |
crud.create_prompt(db=db, user_id=current_user.user_id, prompt=prompt)
|
150 |
else:
|
151 |
request.scale = 1.0
|
app/core/schemas.py
CHANGED
@@ -62,7 +62,7 @@ class TextImage(Generate):
|
|
62 |
class ImageImage(Generate):
|
63 |
prompt: str
|
64 |
image: str
|
65 |
-
num_inference_steps: int =
|
66 |
guidance_scale: float = 7.5
|
67 |
image_guidance_scale: float = 1.5
|
68 |
|
@@ -74,7 +74,7 @@ class BackgroundRemoval(BaseModel):
|
|
74 |
class ImageVariations(Generate):
|
75 |
image: str
|
76 |
num_samples: int = 4
|
77 |
-
num_inference_steps: int =
|
78 |
prompt: str | None = ""
|
79 |
scale: float = 0.5
|
80 |
guidance_scale: float = 7.5
|
|
|
62 |
class ImageImage(Generate):
|
63 |
prompt: str
|
64 |
image: str
|
65 |
+
num_inference_steps: int = 50
|
66 |
guidance_scale: float = 7.5
|
67 |
image_guidance_scale: float = 1.5
|
68 |
|
|
|
74 |
class ImageVariations(Generate):
|
75 |
image: str
|
76 |
num_samples: int = 4
|
77 |
+
num_inference_steps: int = 50
|
78 |
prompt: str | None = ""
|
79 |
scale: float = 0.5
|
80 |
guidance_scale: float = 7.5
|