Comments (4)
I made a simple colab example just now, you can try it out here: paint-with-words colab
Originally posted by @shreydan in #4 (comment)
You can confirm the above hf_model_path
change on the colab mentioned here by editing the cell that has the img = paint_with_words(
(first cell after the 'Run Model' heading)
We can also explicitly set the seed
parameter here as well, to make comparisons between the 2 models easier.
Original version using SD v1.4
New version using SD v1.5
from paint-with-words-sd.
This is documented in the README already:
You can see that pww_load_tools
takes a hf_model_path
and/or local_model_path
here:
paint-with-words-sd/paint_with_words/paint_with_words.py
Lines 89 to 93 in 4c95a11
pww_load_tools
is called by paint_with_words
, which can also be passed hf_model_path
and/or local_model_path
, with hf_model_path
defaulting to "CompVis/stable-diffusion-v1-4"
paint-with-words-sd/paint_with_words/paint_with_words.py
Lines 213 to 238 in 4c95a11
So it looks like it may be even easier than the README suggests, and you should just be able to pass "runwayml/stable-diffusion-v1-5"
directly into the hf_model_path
parameter of paint_with_words
as it's called in the 'Basic Usage' section:
Something like this would presumably work:
img = paint_with_words(
color_context=color_context,
color_map_image=color_map_image,
input_prompt=input_prompt,
num_inference_steps=30,
guidance_scale=7.5,
device="cuda:0",
+ hf_model_path="runwayml/stable-diffusion-v1-5"
)
from paint-with-words-sd.
You can see that
pww_load_tools
takes ahf_model_path
and/orlocal_model_path
here:
One advantage of this method that you can also change the scheduler, which might be desirable for performance or quality issues. (I found recently that the model I'm using often has blatant graphical issues even with a large step count on LMS, but EulerAncestralDiscreteScheduler or EulerDiscreteScheduler do much better. Just don't forget to import your scheduler of choice from diffusers. (Something the example currently doesn't show.)
from paint-with-words-sd.
Nice note @hiss-remi , ill add this feature as well.
from paint-with-words-sd.
Related Issues (20)
- Is it it possible that some of the features in this research paper could be implemented?
- Suggestion about the tool to generate mask image? HOT 2
- SMB World 1-1 Segmentation Map and Key. HOT 1
- About porting to the diffusers pipeline HOT 1
- Question: How is this project going? HOT 1
- inj_forward() got an unexpected keyword argument 'attention_mask' HOT 3
- Parsing of Color values going wrong HOT 1
- I am trying to run this on Stable Diffusion 2.1 but I keep getting black images HOT 3
- inj_forward() got an unexpected keyword argument 'encoder_hidden_states' HOT 2
- having trouble getting cuda installed with this
- Found another implementation
- Will the Gradio demo look something like this? HOT 2
- AUTOMATIC1111 extension of PwW + ControlNet HOT 2
- Using with lora HOT 1
- Confliction of A1111 extension of PwW+Control to the original extension of ControlNet HOT 28
- Commas, Periods and Tokens HOT 1
- Incredibly High VRAM Usage
- diffusers multicontrolnet pipeline with paint with words HOT 3
- Paint with words with Lora? HOT 2
- text and control input align HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paint-with-words-sd.