LanHarmony commited on
Commit
a05a4de
1 Parent(s): 59ebd8c

introduce control net

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -42,6 +42,16 @@ Since Visual ChatGPT is a text language model, Visual ChatGPT must use tools to
42
  The thoughts and observations are only visible for Visual ChatGPT, Visual ChatGPT should remember to repeat important information in the final response for Human.
43
  Thought: Do I need to use a tool? {agent_scratchpad}"""
44
 
 
 
 
 
 
 
 
 
 
 
45
  from diffusers import StableDiffusionPipeline
46
  from diffusers import StableDiffusionInpaintPipeline
47
  from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
@@ -55,15 +65,7 @@ from langchain.llms.openai import OpenAI
55
  from langchain.vectorstores import Weaviate
56
  import re
57
  import gradio as gr
58
- import subprocess
59
 
60
- def execute_cmd(cmd):
61
- output = subprocess.check_output(cmd, shell=True)
62
- return output
63
-
64
- execute_cmd('ln -s ControlNet/ldm ./ldm')
65
- execute_cmd('ln -s ControlNet/cldm ./cldm')
66
- execute_cmd('ln -s ControlNet/annotator ./annotator')
67
 
68
  def cut_dialogue_history(history_memory, keep_last_n_words=500):
69
  tokens = history_memory.split()
 
42
  The thoughts and observations are only visible for Visual ChatGPT, Visual ChatGPT should remember to repeat important information in the final response for Human.
43
  Thought: Do I need to use a tool? {agent_scratchpad}"""
44
 
45
+ import subprocess
46
+
47
+ def execute_cmd(cmd):
48
+ output = subprocess.check_output(cmd, shell=True)
49
+ return output
50
+
51
+ 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
 
65
  from langchain.vectorstores import Weaviate
66
  import re
67
  import gradio as gr
 
68
 
 
 
 
 
 
 
 
69
 
70
  def cut_dialogue_history(history_memory, keep_last_n_words=500):
71
  tokens = history_memory.split()