colt12 commited on
Commit
31fd751
·
verified ·
1 Parent(s): 05e0399

Update config.json

Browse files
Files changed (1) hide show
  1. config.json +15 -19
config.json CHANGED
@@ -1,19 +1,15 @@
1
- from diffusers import StableDiffusionPipeline
2
- import torch
3
-
4
- def init():
5
- global model
6
- model_id = "colt12/maxcushion"
7
- model = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
8
- model.to("cuda")
9
-
10
- def inference(model_inputs):
11
- global model
12
- prompt = model_inputs.get('prompt', '')
13
- image = model(prompt).images[0]
14
- # Convert image to bytes
15
- import io
16
- buf = io.BytesIO()
17
- image.save(buf, format='PNG')
18
- byte_im = buf.getvalue()
19
- return {"image_bytes": byte_im}
 
1
+ {
2
+ "architectures": ["UNet2DConditionModel"],
3
+ "_class_name": "StableDiffusionPipeline",
4
+ "_diffusers_version": "0.21.4",
5
+ "feature_extractor": [
6
+ "CLIPFeatureExtractor",
7
+ "openai/clip-vit-base-patch32"
8
+ ],
9
+ "safety_checker": null,
10
+ "scheduler": ["PNDMScheduler"],
11
+ "text_encoder": ["CLIPTextModel", "openai/clip-vit-base-patch32"],
12
+ "tokenizer": ["CLIPTokenizer", "openai/clip-vit-base-patch32"],
13
+ "unet": ["UNet2DConditionModel"],
14
+ "vae": ["AutoencoderKL"]
15
+ }