Spaces:
Runtime error
Runtime error
LanHarmony
commited on
Commit
•
80c33e5
1
Parent(s):
a7d5cd6
introduce control net
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
VISUAL_CHATGPT_PREFIX = """Visual ChatGPT is designed to be able to assist with a wide range of text and visual related tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. Visual ChatGPT is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
|
2 |
|
3 |
Visual ChatGPT is able to process and understand large amounts of text and image. As a language model, Visual ChatGPT can not directly read images, but it has a list of tools to finish different visual tasks. Each image will have a file name formed as "image/xxx.png", and Visual ChatGPT can invoke different tools to indirectly understand pictures. When talking about images, Visual ChatGPT is very strict to the file name and will never fabricate nonexistent files. When using tools to generate new image files, Visual ChatGPT is also known that the image may not be the same as user's demand, and will use other visual question answering tools or description tools to observe the real image. Visual ChatGPT is able to use tools in a sequence, and is loyal to the tool observation outputs rather than faking the image content and image file name. It will remember to provide the file name from the last tool observation, if a new image is generated.
|
@@ -52,6 +54,12 @@ execute_cmd('ln -s ControlNet/ldm ./ldm')
|
|
52 |
execute_cmd('ln -s ControlNet/cldm ./cldm')
|
53 |
execute_cmd('ln -s ControlNet/annotator ./annotator')
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
from diffusers import StableDiffusionPipeline
|
56 |
from diffusers import StableDiffusionInpaintPipeline
|
57 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
VISUAL_CHATGPT_PREFIX = """Visual ChatGPT is designed to be able to assist with a wide range of text and visual related tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. Visual ChatGPT is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
|
4 |
|
5 |
Visual ChatGPT is able to process and understand large amounts of text and image. As a language model, Visual ChatGPT can not directly read images, but it has a list of tools to finish different visual tasks. Each image will have a file name formed as "image/xxx.png", and Visual ChatGPT can invoke different tools to indirectly understand pictures. When talking about images, Visual ChatGPT is very strict to the file name and will never fabricate nonexistent files. When using tools to generate new image files, Visual ChatGPT is also known that the image may not be the same as user's demand, and will use other visual question answering tools or description tools to observe the real image. Visual ChatGPT is able to use tools in a sequence, and is loyal to the tool observation outputs rather than faking the image content and image file name. It will remember to provide the file name from the last tool observation, if a new image is generated.
|
|
|
54 |
execute_cmd('ln -s ControlNet/cldm ./cldm')
|
55 |
execute_cmd('ln -s ControlNet/annotator ./annotator')
|
56 |
|
57 |
+
# prepare the folder to store images
|
58 |
+
try:
|
59 |
+
os.mkdir('./image')
|
60 |
+
except OSError as error:
|
61 |
+
print(error)
|
62 |
+
|
63 |
from diffusers import StableDiffusionPipeline
|
64 |
from diffusers import StableDiffusionInpaintPipeline
|
65 |
from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
|