radames commited on
Commit
33596ca
·
1 Parent(s): 82cad21

fix baseparams

Browse files
server/pipelines/IPcompositionHyperSD15.py CHANGED
@@ -14,6 +14,7 @@ except:
14
 
15
  from config import Args
16
  from pydantic import BaseModel, Field
 
17
  from PIL import Image
18
 
19
  model_id = "runwayml/stable-diffusion-v1-5"
@@ -37,7 +38,7 @@ class Pipeline:
37
  input_mode: str = "image"
38
  page_content: str = page_content
39
 
40
- class InputParams(BaseModel):
41
  prompt: str = Field(
42
  default_prompt,
43
  title="Prompt",
 
14
 
15
  from config import Args
16
  from pydantic import BaseModel, Field
17
+ from util import ParamsModel
18
  from PIL import Image
19
 
20
  model_id = "runwayml/stable-diffusion-v1-5"
 
38
  input_mode: str = "image"
39
  page_content: str = page_content
40
 
41
+ class InputParams(ParamsModel):
42
  prompt: str = Field(
43
  default_prompt,
44
  title="Prompt",
server/pipelines/IPcompositionHyperSDXL.py CHANGED
@@ -15,6 +15,7 @@ except:
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
 
20
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
@@ -39,7 +40,7 @@ class Pipeline:
39
  input_mode: str = "image"
40
  page_content: str = page_content
41
 
42
- class InputParams(BaseModel):
43
  prompt: str = Field(
44
  default_prompt,
45
  title="Prompt",
 
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
 
21
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
 
40
  input_mode: str = "image"
41
  page_content: str = page_content
42
 
43
+ class InputParams(ParamsModel):
44
  prompt: str = Field(
45
  default_prompt,
46
  title="Prompt",
server/pipelines/controlnetDepthFlashSD.py CHANGED
@@ -15,6 +15,7 @@ except:
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
  import math
20
 
@@ -39,7 +40,7 @@ class Pipeline:
39
  input_mode: str = "image"
40
  page_content: str = page_content
41
 
42
- class InputParams(BaseModel):
43
  prompt: str = Field(
44
  default_prompt,
45
  title="Prompt",
 
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
  import math
21
 
 
40
  input_mode: str = "image"
41
  page_content: str = page_content
42
 
43
+ class InputParams(ParamsModel):
44
  prompt: str = Field(
45
  default_prompt,
46
  title="Prompt",
server/pipelines/controlnetDepthHyperSD.py CHANGED
@@ -17,6 +17,7 @@ except:
17
 
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -41,7 +42,7 @@ class Pipeline:
41
  input_mode: str = "image"
42
  page_content: str = page_content
43
 
44
- class InputParams(BaseModel):
45
  prompt: str = Field(
46
  default_prompt,
47
  title="Prompt",
 
17
 
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
+ class InputParams(ParamsModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
server/pipelines/controlnetDepthHyperSDXL.py CHANGED
@@ -18,6 +18,7 @@ except:
18
  import psutil
19
  from config import Args
20
  from pydantic import BaseModel, Field
 
21
  from PIL import Image
22
  import math
23
 
@@ -42,7 +43,7 @@ class Pipeline:
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
- class InputParams(BaseModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
 
18
  import psutil
19
  from config import Args
20
  from pydantic import BaseModel, Field
21
+ from util import ParamsModel
22
  from PIL import Image
23
  import math
24
 
 
43
  input_mode: str = "image"
44
  page_content: str = page_content
45
 
46
+ class InputParams(ParamsModel):
47
  prompt: str = Field(
48
  default_prompt,
49
  title="Prompt",
server/pipelines/controlnetFlashSD.py CHANGED
@@ -15,6 +15,7 @@ except:
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
  import math
20
 
@@ -39,7 +40,7 @@ class Pipeline:
39
  input_mode: str = "image"
40
  page_content: str = page_content
41
 
42
- class InputParams(BaseModel):
43
  prompt: str = Field(
44
  default_prompt,
45
  title="Prompt",
 
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
  import math
21
 
 
40
  input_mode: str = "image"
41
  page_content: str = page_content
42
 
43
+ class InputParams(ParamsModel):
44
  prompt: str = Field(
45
  default_prompt,
46
  title="Prompt",
server/pipelines/controlnetFlashSDXL.py CHANGED
@@ -16,6 +16,7 @@ except:
16
 
17
  from config import Args
18
  from pydantic import BaseModel, Field
 
19
  from PIL import Image
20
  import math
21
 
@@ -41,7 +42,7 @@ class Pipeline:
41
  input_mode: str = "image"
42
  page_content: str = page_content
43
 
44
- class InputParams(BaseModel):
45
  prompt: str = Field(
46
  default_prompt,
47
  title="Prompt",
 
16
 
17
  from config import Args
18
  from pydantic import BaseModel, Field
19
+ from util import ParamsModel
20
  from PIL import Image
21
  import math
22
 
 
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
+ class InputParams(ParamsModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
server/pipelines/controlnetHyperSD.py CHANGED
@@ -17,6 +17,7 @@ except:
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -41,7 +42,7 @@ class Pipeline:
41
  input_mode: str = "image"
42
  page_content: str = page_content
43
 
44
- class InputParams(BaseModel):
45
  prompt: str = Field(
46
  default_prompt,
47
  title="Prompt",
 
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
+ class InputParams(ParamsModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
server/pipelines/controlnetHyperSDXL.py CHANGED
@@ -17,6 +17,7 @@ except:
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -42,7 +43,7 @@ class Pipeline:
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
- class InputParams(BaseModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
 
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
43
  input_mode: str = "image"
44
  page_content: str = page_content
45
 
46
+ class InputParams(ParamsModel):
47
  prompt: str = Field(
48
  default_prompt,
49
  title="Prompt",
server/pipelines/controlnetLoraSD15.py CHANGED
@@ -16,6 +16,7 @@ except:
16
  import psutil
17
  from config import Args
18
  from pydantic import BaseModel, Field
 
19
  from PIL import Image
20
  import math
21
 
@@ -63,7 +64,7 @@ class Pipeline:
63
  input_mode: str = "image"
64
  page_content: str = page_content
65
 
66
- class InputParams(BaseModel):
67
  prompt: str = Field(
68
  default_prompt,
69
  title="Prompt",
 
16
  import psutil
17
  from config import Args
18
  from pydantic import BaseModel, Field
19
+ from util import ParamsModel
20
  from PIL import Image
21
  import math
22
 
 
64
  input_mode: str = "image"
65
  page_content: str = page_content
66
 
67
+ class InputParams(ParamsModel):
68
  prompt: str = Field(
69
  default_prompt,
70
  title="Prompt",
server/pipelines/controlnetLoraSD15QRCode.py CHANGED
@@ -15,6 +15,7 @@ except:
15
  import psutil
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
  import math
20
 
@@ -57,7 +58,7 @@ class Pipeline:
57
  input_mode: str = "image"
58
  page_content: str = page_content
59
 
60
- class InputParams(BaseModel):
61
  prompt: str = Field(
62
  default_prompt,
63
  title="Prompt",
 
15
  import psutil
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
  import math
21
 
 
58
  input_mode: str = "image"
59
  page_content: str = page_content
60
 
61
+ class InputParams(ParamsModel):
62
  prompt: str = Field(
63
  default_prompt,
64
  title="Prompt",
server/pipelines/controlnetLoraSDXL-Lightning.py CHANGED
@@ -19,6 +19,7 @@ except:
19
 
20
  from config import Args
21
  from pydantic import BaseModel, Field
 
22
  from PIL import Image
23
  import math
24
 
@@ -66,7 +67,7 @@ class Pipeline:
66
  input_mode: str = "image"
67
  page_content: str = page_content
68
 
69
- class InputParams(BaseModel):
70
  prompt: str = Field(
71
  default_prompt,
72
  title="Prompt",
 
19
 
20
  from config import Args
21
  from pydantic import BaseModel, Field
22
+ from util import ParamsModel
23
  from PIL import Image
24
  import math
25
 
 
67
  input_mode: str = "image"
68
  page_content: str = page_content
69
 
70
+ class InputParams(ParamsModel):
71
  prompt: str = Field(
72
  default_prompt,
73
  title="Prompt",
server/pipelines/controlnetLoraSDXL.py CHANGED
@@ -17,6 +17,7 @@ except:
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -62,7 +63,7 @@ class Pipeline:
62
  input_mode: str = "image"
63
  page_content: str = page_content
64
 
65
- class InputParams(BaseModel):
66
  prompt: str = Field(
67
  default_prompt,
68
  title="Prompt",
 
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
63
  input_mode: str = "image"
64
  page_content: str = page_content
65
 
66
+ class InputParams(ParamsModel):
67
  prompt: str = Field(
68
  default_prompt,
69
  title="Prompt",
server/pipelines/controlnetMistoLineHyperSDXL.py CHANGED
@@ -17,6 +17,7 @@ except:
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -42,7 +43,7 @@ class Pipeline:
42
  input_mode: str = "image"
43
  page_content: str = page_content
44
 
45
- class InputParams(BaseModel):
46
  prompt: str = Field(
47
  default_prompt,
48
  title="Prompt",
 
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
43
  input_mode: str = "image"
44
  page_content: str = page_content
45
 
46
+ class InputParams(ParamsModel):
47
  prompt: str = Field(
48
  default_prompt,
49
  title="Prompt",
server/pipelines/controlnetPCMSD15.py CHANGED
@@ -15,6 +15,7 @@ except:
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
 
20
  taesd_model = "madebyollin/taesd"
@@ -44,7 +45,7 @@ class Pipeline:
44
  input_mode: str = "image"
45
  page_content: str = page_content
46
 
47
- class InputParams(BaseModel):
48
  prompt: str = Field(
49
  default_prompt,
50
  title="Prompt",
 
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
 
21
  taesd_model = "madebyollin/taesd"
 
45
  input_mode: str = "image"
46
  page_content: str = page_content
47
 
48
+ class InputParams(ParamsModel):
49
  prompt: str = Field(
50
  default_prompt,
51
  title="Prompt",
server/pipelines/controlnetSDTurbo.py CHANGED
@@ -15,6 +15,7 @@ except:
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
 
18
  from PIL import Image
19
  import math
20
 
@@ -58,7 +59,7 @@ class Pipeline:
58
  input_mode: str = "image"
59
  page_content: str = page_content
60
 
61
- class InputParams(BaseModel):
62
  prompt: str = Field(
63
  default_prompt,
64
  title="Prompt",
 
15
 
16
  from config import Args
17
  from pydantic import BaseModel, Field
18
+ from util import ParamsModel
19
  from PIL import Image
20
  import math
21
 
 
59
  input_mode: str = "image"
60
  page_content: str = page_content
61
 
62
+ class InputParams(ParamsModel):
63
  prompt: str = Field(
64
  default_prompt,
65
  title="Prompt",
server/pipelines/controlnetSDXLTurbo.py CHANGED
@@ -16,6 +16,7 @@ except:
16
  import psutil
17
  from config import Args
18
  from pydantic import BaseModel, Field
 
19
  from PIL import Image
20
  import math
21
 
@@ -59,7 +60,7 @@ class Pipeline:
59
  input_mode: str = "image"
60
  page_content: str = page_content
61
 
62
- class InputParams(BaseModel):
63
  prompt: str = Field(
64
  default_prompt,
65
  title="Prompt",
 
16
  import psutil
17
  from config import Args
18
  from pydantic import BaseModel, Field
19
+ from util import ParamsModel
20
  from PIL import Image
21
  import math
22
 
 
60
  input_mode: str = "image"
61
  page_content: str = page_content
62
 
63
+ class InputParams(ParamsModel):
64
  prompt: str = Field(
65
  default_prompt,
66
  title="Prompt",
server/pipelines/controlnetSegmindVegaRT.py CHANGED
@@ -17,6 +17,7 @@ except:
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
 
20
  from PIL import Image
21
  import math
22
 
@@ -61,7 +62,7 @@ class Pipeline:
61
  input_mode: str = "image"
62
  page_content: str = page_content
63
 
64
- class InputParams(BaseModel):
65
  prompt: str = Field(
66
  default_prompt,
67
  title="Prompt",
 
17
  import psutil
18
  from config import Args
19
  from pydantic import BaseModel, Field
20
+ from util import ParamsModel
21
  from PIL import Image
22
  import math
23
 
 
62
  input_mode: str = "image"
63
  page_content: str = page_content
64
 
65
+ class InputParams(ParamsModel):
66
  prompt: str = Field(
67
  default_prompt,
68
  title="Prompt",
server/pipelines/img2imgSegmindVegaRT.py CHANGED
@@ -14,6 +14,7 @@ except:
14
  import psutil
15
  from config import Args
16
  from pydantic import BaseModel, Field
 
17
  from PIL import Image
18
  import math
19
 
@@ -57,7 +58,7 @@ class Pipeline:
57
  input_mode: str = "image"
58
  page_content: str = page_content
59
 
60
- class InputParams(BaseModel):
61
  prompt: str = Field(
62
  default_prompt,
63
  title="Prompt",
 
14
  import psutil
15
  from config import Args
16
  from pydantic import BaseModel, Field
17
+ from util import ParamsModel
18
  from PIL import Image
19
  import math
20
 
 
58
  input_mode: str = "image"
59
  page_content: str = page_content
60
 
61
+ class InputParams(ParamsModel):
62
  prompt: str = Field(
63
  default_prompt,
64
  title="Prompt",
server/pipelines/pix2pixTurbo.py CHANGED
@@ -3,6 +3,7 @@ from torchvision import transforms
3
 
4
  from config import Args
5
  from pydantic import BaseModel, Field
 
6
  from PIL import Image
7
  from pipelines.pix2pix.pix2pix_turbo import Pix2Pix_Turbo
8
  from pipelines.utils.canny_gpu import ScharrOperator
@@ -35,7 +36,7 @@ class Pipeline:
35
  input_mode: str = "image"
36
  page_content: str = page_content
37
 
38
- class InputParams(BaseModel):
39
  prompt: str = Field(
40
  default_prompt,
41
  title="Prompt",
 
3
 
4
  from config import Args
5
  from pydantic import BaseModel, Field
6
+ from util import ParamsModel
7
  from PIL import Image
8
  from pipelines.pix2pix.pix2pix_turbo import Pix2Pix_Turbo
9
  from pipelines.utils.canny_gpu import ScharrOperator
 
36
  input_mode: str = "image"
37
  page_content: str = page_content
38
 
39
+ class InputParams(ParamsModel):
40
  prompt: str = Field(
41
  default_prompt,
42
  title="Prompt",
server/pipelines/txt2img.py CHANGED
@@ -9,6 +9,7 @@ except:
9
 
10
  from config import Args
11
  from pydantic import BaseModel, Field
 
12
  from PIL import Image
13
  from typing import List
14
 
@@ -48,7 +49,7 @@ class Pipeline:
48
  input_mode: str = "text"
49
  page_content: str = page_content
50
 
51
- class InputParams(BaseModel):
52
  prompt: str = Field(
53
  default_prompt,
54
  title="Prompt",
 
9
 
10
  from config import Args
11
  from pydantic import BaseModel, Field
12
+ from util import ParamsModel
13
  from PIL import Image
14
  from typing import List
15
 
 
49
  input_mode: str = "text"
50
  page_content: str = page_content
51
 
52
+ class InputParams(ParamsModel):
53
  prompt: str = Field(
54
  default_prompt,
55
  title="Prompt",
server/pipelines/txt2imgLora.py CHANGED
@@ -10,6 +10,7 @@ except:
10
  import psutil
11
  from config import Args
12
  from pydantic import BaseModel, Field
 
13
  from PIL import Image
14
 
15
  base_model = "wavymulder/Analog-Diffusion"
@@ -55,7 +56,7 @@ class Pipeline:
55
  input_mode: str = "text"
56
  page_content: str = page_content
57
 
58
- class InputParams(BaseModel):
59
  prompt: str = Field(
60
  default_prompt,
61
  title="Prompt",
 
10
  import psutil
11
  from config import Args
12
  from pydantic import BaseModel, Field
13
+ from util import ParamsModel
14
  from PIL import Image
15
 
16
  base_model = "wavymulder/Analog-Diffusion"
 
56
  input_mode: str = "text"
57
  page_content: str = page_content
58
 
59
+ class InputParams(ParamsModel):
60
  prompt: str = Field(
61
  default_prompt,
62
  title="Prompt",
server/pipelines/txt2imgLoraSDXL.py CHANGED
@@ -10,6 +10,7 @@ except:
10
  import psutil
11
  from config import Args
12
  from pydantic import BaseModel, Field
 
13
  from PIL import Image
14
 
15
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
@@ -54,7 +55,7 @@ class Pipeline:
54
  page_content: str = page_content
55
  input_mode: str = "text"
56
 
57
- class InputParams(BaseModel):
58
  prompt: str = Field(
59
  default_prompt,
60
  title="Prompt",
 
10
  import psutil
11
  from config import Args
12
  from pydantic import BaseModel, Field
13
+ from util import ParamsModel
14
  from PIL import Image
15
 
16
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
 
55
  page_content: str = page_content
56
  input_mode: str = "text"
57
 
58
+ class InputParams(ParamsModel):
59
  prompt: str = Field(
60
  default_prompt,
61
  title="Prompt",