remove txt2img code
Browse files
api/core/controllers/text2image.py
CHANGED
|
@@ -1,17 +1,6 @@
|
|
| 1 |
from diffusers import DiffusionPipeline as Pipe
|
| 2 |
import torch
|
| 3 |
|
| 4 |
-
class Converter:
|
| 5 |
-
import io
|
| 6 |
-
from PIL import Image
|
| 7 |
-
|
| 8 |
-
img = Image.open(fh, mode='r')
|
| 9 |
-
roi_img = img.crop(box)
|
| 10 |
-
|
| 11 |
-
img_byte_arr = io.BytesIO()
|
| 12 |
-
roi_img.save(img_byte_arr, format='PNG')
|
| 13 |
-
img_byte_arr = img_byte_arr.getvalue()
|
| 14 |
-
|
| 15 |
class Generador:
|
| 16 |
def img_to_bytes(image) -> bytes:
|
| 17 |
import io
|
|
|
|
| 1 |
from diffusers import DiffusionPipeline as Pipe
|
| 2 |
import torch
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
class Generador:
|
| 5 |
def img_to_bytes(image) -> bytes:
|
| 6 |
import io
|